Always auto-rerun from beginning with split

pull/1720/head
Piero Toffanin 2023-11-13 13:40:55 -05:00
rodzic 8376f24f08
commit eed840c9bb
2 zmienionych plików z 5 dodań i 2 usunięć

Wyświetl plik

@ -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

4
run.py
Wyświetl plik

@ -38,8 +38,8 @@ if __name__ == '__main__':
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