Fix type check in hyper-parameters argparser integration

This commit is contained in:
allegroai 2020-01-22 11:03:56 +02:00
parent 1e011e10a2
commit af0b8f4c70

View File

@ -111,7 +111,8 @@ class _Arguments(object):
if parsed_args:
for k, v in parsed_args.__dict__.items():
if k not in task_defaults:
if type(v) == None:
# do not change this comparison because isinstance(type(v), type(None)) === False
if type(v) == type(None):
task_defaults[k] = ''
elif type(v) in (str, int, float, bool, list):
task_defaults[k] = v