Skip to content

Commit

Permalink
Fix a bug related to backward compatability -- 'unconstrained' argume…
Browse files Browse the repository at this point in the history
…nt vs. 'no_cond'.
  • Loading branch information
sigal-raab committed Nov 21, 2022
1 parent 34c8a51 commit aa3b05a
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions utils/parser_util.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,9 @@ def parse_and_load_from_model(parser):
if a in model_args.keys():
setattr(args, a, model_args[a])

elif 'cond_mode' in model_args and model_args['cond_mode'] == 'no_cond': # backward compitability
setattr(args, 'unconstrained', True)
elif 'cond_mode' in model_args: # backward compitability
unconstrained = (model_args['cond_mode'] == 'no_cond')
setattr(args, 'unconstrained', unconstrained)

else:
print('Warning: was not able to load [{}], using default value [{}] instead.'.format(a, args.__dict__[a]))
Expand Down

0 comments on commit aa3b05a

Please sign in to comment.