Skip to content

Commit a7ab71a

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

File tree

2 files changed

+12
-9
lines changed

2 files changed

+12
-9
lines changed

tools/AutoTuner/src/autotuner/distributed.py

+9-7
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,14 @@
6666

6767
TEMPLATE = """
6868
Expected figures for this experiment.
69-
Wall time: {runtime:.2f} hours
69+
Wall time: {runtime:.5f} hours
7070
Number of Samples:
71-
Samples per minute: {num_samples_per_minute:.2f}
72-
Design runtime of 10 min: {num_samples_10min:.2f}
73-
Design runtime of 1h: {num_samples_1h:.2f}
71+
Samples per minute: {num_samples_per_minute:.5f}
72+
Design runtime of 10 min: {num_samples_10min:.5f}
73+
Design runtime of 1h: {num_samples_1h:.5f}
7474
Number of iterations
75-
Design runtime of 10 min: {num_iterations_10min:.2f}
76-
Design runtime of 1h: {num_iterations_1h:.2f}
75+
Design runtime of 10 min: {num_iterations_10min:.5f}
76+
Design runtime of 1h: {num_iterations_1h:.5f}
7777
"""
7878

7979

@@ -855,7 +855,7 @@ def parse_arguments():
855855
"--cpu_budget",
856856
type=int,
857857
metavar="<int>",
858-
default=int(np.floor(cpu_count() / 2)),
858+
default=None,
859859
help="CPU Hours",
860860
)
861861
parser.add_argument(
@@ -1051,6 +1051,8 @@ def sweep():
10511051

10521052
if __name__ == "__main__":
10531053
args = parse_arguments()
1054+
print(args)
1055+
exit()
10541056

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

tools/AutoTuner/test/smoke_test_timeout.py

+3-2
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)