Skip to content

Commit

Permalink
bugfix: utils.py correctly handles image_name
Browse files Browse the repository at this point in the history
previously, when called from the command line, utils.py would always add
the default images when image_name was set. don't do that
  • Loading branch information
billbrod committed Nov 6, 2020
1 parent faf0f62 commit 6e7eb1a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions foveated_metamers/utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -484,10 +484,10 @@ def generate_metamer_paths(model_name, increment=False, extra_iter=None,
except ValueError:
# then it's a list of strings, and we keep it as is
new_args[k] = v
if 'image_name' in new_args.keys():
new_args['image_name'].extend(images)
else:
if 'image_name' not in new_args.keys():
new_args['image_name'] = images
elif 'image_name' in new_args.keys() and images and not all([v is None for v in image_kwargs.values()]):
raise Exception("Must set either image_name or its components (ref_image, size, preproc)!")
if not save_path and not print_output:
raise Exception("Either --save or --print must be true!")
if save_path and not save_path.endswith('.txt'):
Expand Down

0 comments on commit 6e7eb1a

Please sign in to comment.