Skip to content

Commit 2e63e7f

Browse files
committed
use cpu_budget default -1 to mean unlimited
Signed-off-by: Jack Luar <[email protected]>
1 parent 22e3bd0 commit 2e63e7f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/AutoTuner/src/autotuner/distributed.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -441,8 +441,8 @@ def parse_arguments():
441441
"--cpu_budget",
442442
type=int,
443443
metavar="<int>",
444-
default=None,
445-
help="CPU Hours",
444+
default=-1,
445+
help="CPU Hours (-1 means no limit.)",
446446
)
447447
parser.add_argument(
448448
"--jobs",
@@ -516,7 +516,7 @@ def parse_arguments():
516516
args.timeout = round(args.timeout * 3600)
517517

518518
# Calculate timeout based on cpu_budget
519-
if args.cpu_budget is not None:
519+
if args.cpu_budget != -1:
520520
args.timeout = round(args.cpu_budget / os.cpu_count() * 3600)
521521
args.timeout_per_trial = round(
522522
args.cpu_budget / (args.jobs * args.resources_per_trial) * 3600

0 commit comments

Comments
 (0)