Skip to content

Commit

Permalink
Always auto-rerun from beginning with split
Browse files Browse the repository at this point in the history
  • Loading branch information
pierotofy committed Nov 13, 2023
1 parent 8376f24 commit eed840c
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
3 changes: 3 additions & 0 deletions opendm/arghelpers.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,6 +65,9 @@ def find_rerun_stage(opts_json, args, rerun_stages, processopts):
if not ('rerun_is_set' in args or 'rerun_from_is_set' in args or 'rerun_all_is_set' in args):
args_diff = compare_args(opts_json, args, rerun_stages)
if args_diff:
if 'split_is_set' in args:
return processopts[processopts.index('dataset'):], args_diff

try:
stage_idxs = [processopts.index(rerun_stages[opt]) for opt in args_diff.keys() if rerun_stages[opt] is not None]
return processopts[min(stage_idxs):], args_diff
Expand Down
4 changes: 2 additions & 2 deletions run.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,8 +38,8 @@ def odm_version():

opts_json = os.path.join(args.project_path, "options.json")
auto_rerun_stage, opts_diff = find_rerun_stage(opts_json, args, config.rerun_stages, config.processopts)
if auto_rerun_stage is not None:
log.ODM_INFO("Rerunning from: %s" % auto_rerun_stage)
if auto_rerun_stage is not None and len(auto_rerun_stage) > 0:
log.ODM_INFO("Rerunning from: %s" % auto_rerun_stage[0])
args.rerun_from = auto_rerun_stage

# Print args
Expand Down

0 comments on commit eed840c

Please sign in to comment.