Skip to content

Commit 22e3bd0

Browse files
committed
fix cpu_budget default to be None and reduce timeout fail
Signed-off-by: Jack Luar <[email protected]>
1 parent f49dff3 commit 22e3bd0

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

tools/AutoTuner/src/autotuner/distributed.py

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -74,14 +74,14 @@
7474

7575
TEMPLATE = """
7676
Expected figures for this experiment.
77-
Wall time: {runtime:.2f} hours
77+
Wall time: {runtime:.5f} hours
7878
Number of Samples:
79-
Samples per minute: {num_samples_per_minute:.2f}
80-
Design runtime of 10 min: {num_samples_10min:.2f}
81-
Design runtime of 1h: {num_samples_1h:.2f}
79+
Samples per minute: {num_samples_per_minute:.5f}
80+
Design runtime of 10 min: {num_samples_10min:.5f}
81+
Design runtime of 1h: {num_samples_1h:.5f}
8282
Number of iterations
83-
Design runtime of 10 min: {num_iterations_10min:.2f}
84-
Design runtime of 1h: {num_iterations_1h:.2f}
83+
Design runtime of 10 min: {num_iterations_10min:.5f}
84+
Design runtime of 1h: {num_iterations_1h:.5f}
8585
"""
8686

8787

@@ -441,7 +441,7 @@ def parse_arguments():
441441
"--cpu_budget",
442442
type=int,
443443
metavar="<int>",
444-
default=int(np.floor(cpu_count() / 2)),
444+
default=None,
445445
help="CPU Hours",
446446
)
447447
parser.add_argument(
@@ -667,6 +667,8 @@ def sweep():
667667

668668
if __name__ == "__main__":
669669
args = parse_arguments()
670+
print(args)
671+
exit()
670672

671673
# Read config and original files before handling where to run in case we
672674
# need to upload the files.

tools/AutoTuner/test/smoke_test_timeout.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,15 @@ def setUp(self):
1818
)
1919
self.experiment = f"smoke-test-timeout-{self.platform}"
2020

21-
# 0.01 hour translates to 36 seconds, which will definitely cause failure.
22-
timeout_flags = ["--timeout 0.05", "--timeout_per_trial 0.05"]
21+
# 0.001 hour translates to 3.6 seconds, which will definitely cause failure.
22+
timeout_flags = ["--timeout 0.001", "--timeout_per_trial 0.001"]
2323
self.commands = [
2424
"python3 distributed.py"
2525
f" --design {self.design}"
2626
f" --platform {self.platform}"
2727
f" --experiment {self.experiment}"
2828
f" --config {self.config}"
29+
f" --cpu_budget None"
2930
f" --yes"
3031
f" {flag}"
3132
f" tune --samples 1"

0 commit comments

Comments
 (0)