Skip to content

Commit fb6b5e9

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

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

tools/AutoTuner/src/autotuner/distributed.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -855,8 +855,8 @@ def parse_arguments():
855855
"--cpu_budget",
856856
type=int,
857857
metavar="<int>",
858-
default=None,
859-
help="CPU Hours",
858+
default=-1,
859+
help="CPU Hours (-1 means no limit.)",
860860
)
861861
parser.add_argument(
862862
"--jobs",
@@ -916,7 +916,7 @@ def parse_arguments():
916916
args.timeout = round(args.timeout * 3600)
917917

918918
# Calculate timeout based on cpu_budget
919-
if args.cpu_budget is not None:
919+
if args.cpu_budget != -1:
920920
args.timeout = round(args.cpu_budget / os.cpu_count() * 3600)
921921
args.timeout_per_trial = round(
922922
args.cpu_budget / (args.jobs * args.resources_per_trial) * 3600

0 commit comments

Comments
 (0)