From eed840c9bb6ed6e7239097137ba48bdc0af7738c Mon Sep 17 00:00:00 2001 From: Piero Toffanin Date: Mon, 13 Nov 2023 13:40:55 -0500 Subject: [PATCH] Always auto-rerun from beginning with split --- opendm/arghelpers.py | 3 +++ run.py | 4 ++-- 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/opendm/arghelpers.py b/opendm/arghelpers.py index 4eb70395..d3587601 100644 --- a/opendm/arghelpers.py +++ b/opendm/arghelpers.py @@ -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 diff --git a/run.py b/run.py index 91e9f1c7..ac9615ea 100755 --- a/run.py +++ b/run.py @@ -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