Skip to content

Commit 93342f5

Browse files
mzuennimpsijm
authored andcommitted
run generate before time_limit
1 parent d3c4feb commit 93342f5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

bin/tools.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,9 @@ def build_parser():
773773
timelimitparser.add_argument(
774774
"--timeout", "-t", type=int, help="Override the default timeout. Default: 60."
775775
)
776+
timelimitparser.add_argument(
777+
"--no-generate", "-G", action="store_true", help="Do not run `generate`."
778+
)
776779

777780
# Test
778781
testparser = subparsers.add_parser(
@@ -1154,7 +1157,7 @@ def run_parsed_arguments(args):
11541157

11551158
if action in ["generate"]:
11561159
success &= generate.generate(problem)
1157-
if action in ["all", "constraints", "run"] and not config.args.no_generate:
1160+
if action in ["all", "constraints", "run", "time_limit"] and not config.args.no_generate:
11581161
# Call `generate` with modified arguments.
11591162
old_args = argparse.Namespace(**vars(config.args))
11601163
config.args.jobs = (os.cpu_count() or 1) // 2

0 commit comments

Comments
 (0)