Skip to content

Commit ab656d4

Browse files
committed
use cpu_budget default -1 to mean unlimited
Signed-off-by: Jack Luar <[email protected]>
1 parent 0c8c318 commit ab656d4

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
@@ -443,8 +443,8 @@ def parse_arguments():
443443
"--cpu_budget",
444444
type=int,
445445
metavar="<int>",
446-
default=None,
447-
help="CPU Hours",
446+
default=-1,
447+
help="CPU Hours (-1 means no limit.)",
448448
)
449449
parser.add_argument(
450450
"--jobs",
@@ -518,7 +518,7 @@ def parse_arguments():
518518
args.timeout = round(args.timeout * 3600)
519519

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

0 commit comments

Comments
 (0)