Skip to content

Commit fc6199a

Browse files
committed
add max parallel to hyperband example
1 parent f675e38 commit fc6199a

2 files changed

Lines changed: 5 additions & 2 deletions

File tree

examples/configs/mlp_smac.yaml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,9 @@ hydra:
1010
n_trials: 10
1111
budget_variable: epochs
1212
sweeper_kwargs:
13+
# When using Hyperband, we can use max_parallel 1
14+
# In this case, every bracket will be run in parallel
15+
max_parallelization: 1
1316
optimizer_kwargs:
1417
smac_facade:
1518
_target_: smac.facade.multi_fidelity_facade.MultiFidelityFacade

tests/test_runs/test_smac.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ def test_smac_hyperband_termination():
4242
"hydra.run.dir=mlp_smac_hyperband",
4343
"hydra.sweep.dir=mlp_smac_hyperband",
4444
"hydra.sweeper.n_trials=20",
45-
"+hydra.sweeper.sweeper_kwargs.max_parallelization=1",
45+
"hydra.sweeper.sweeper_kwargs.max_parallelization=1",
4646
]
4747
).decode("utf-8")
4848
assert Path("mlp_smac_hyperband").exists(), "Run directory not created"
@@ -81,7 +81,7 @@ def test_smac_hyperband_optimizer_termination():
8181
"hydra.run.dir=mlp_smac_hyperband",
8282
"hydra.sweep.dir=mlp_smac_hyperband",
8383
"hydra.sweeper.n_trials=24",
84-
"+hydra.sweeper.sweeper_kwargs.max_parallelization=1",
84+
"hydra.sweeper.sweeper_kwargs.max_parallelization=1",
8585
]
8686
).decode("utf-8")
8787
assert Path("mlp_smac_hyperband").exists(), "Run directory not created"

0 commit comments

Comments
 (0)