Skip to content

Commit

Permalink
parse dataset as a SimpleNamespace from job string
Browse files Browse the repository at this point in the history
  • Loading branch information
afoix committed Jul 21, 2024
1 parent 650fcc1 commit 62704af
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion scripts/shapeembed/common_helpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ def params_from_job_str(jobstr):
for p in raw.pop().split('-'):
if p[0:4] == 'beta': ps.model_args.beta = float(p[4:])
ps.model_name = raw.pop()
ps.dataset = raw.pop()
ps.dataset = types.SimpleNamespace(name=raw.pop())
return ps

def find_existing_run_scores(dirname, logger=logging.getLogger(__name__)):
Expand Down
2 changes: 1 addition & 1 deletion scripts/shapeembed/slurm_sweep_shapeembed.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,7 +95,7 @@ def check_model_args(a, b):
if a_yes and b_yes: return a.model_args == b.model_args
return False
for y in ys:
if x.dataset.name == y.dataset \
if x.dataset.name == y.dataset.name \
and x.model_name == y.model_name \
and check_model_args(x, y) \
and x.compression_factor == y.compression_factor \
Expand Down

0 comments on commit 62704af

Please sign in to comment.