From 172c3e44f1bfd326ac320d0d139af59ac0145ee7 Mon Sep 17 00:00:00 2001 From: allegroai <> Date: Thu, 3 Feb 2022 15:30:31 +0200 Subject: [PATCH] Fixed argparser SUPPRESS as default should be resolved at remote execution the same way (i.e. empty string equals SUPPRESS) --- clearml/backend_interface/task/args.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/clearml/backend_interface/task/args.py b/clearml/backend_interface/task/args.py index 053cd6ea..7caf463f 100644 --- a/clearml/backend_interface/task/args.py +++ b/clearml/backend_interface/task/args.py @@ -248,7 +248,10 @@ class _Arguments(object): # with the rest we have to make sure the type is correct matched_actions = self._find_parser_action(parser, k) for parent_parser, current_action in matched_actions: - if current_action and isinstance(current_action, _StoreConstAction): + if current_action and current_action.default == SUPPRESS and not v: + # this value should be kept suppressed, do nothing + v = SUPPRESS + elif current_action and isinstance(current_action, _StoreConstAction): # make the default value boolean # first check if False value const_value = current_action.const if current_action.const is not None else (