Skip to content

Commit

Permalink
TypeError: '<=' not supported between instances of 'int' and 'str'
Browse files Browse the repository at this point in the history
  • Loading branch information
zengsn committed Feb 7, 2020
1 parent 9d3d6dc commit fb34717
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion compare_gan/runner_lib.py
Expand Up @@ -199,7 +199,8 @@ def _get_config_for_step(self, step):
get_step = lambda fn: int(re.findall(r"operative_config-(\d+).gin", fn)[0])
config_steps = [get_step(fn) for fn in saved_configs]
assert config_steps
last_config_step = sorted([s for s in config_steps if s <= step])[-1]
# fix TypeError: '<=' not supported between instances of 'int' and 'str'
last_config_step = sorted([s for s in config_steps if s <= int(step)])[-1]
config_path = os.path.join(
self.model_dir, "operative_config-{}.gin".format(last_config_step))
return _parse_gin_config(config_path)
Expand Down

0 comments on commit fb34717

Please sign in to comment.