Skip to content

Commit

Permalink
add up to date smac example
Browse files Browse the repository at this point in the history
  • Loading branch information
TheEimer committed Sep 3, 2024
1 parent ffdefd7 commit 71eb7e8
Show file tree
Hide file tree
Showing 6 changed files with 1,547 additions and 1,449 deletions.
30 changes: 30 additions & 0 deletions examples/configs/carps_hebo.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@

defaults:
- _self_
- carps_task: branin
- search_space: branin
- override hydra/sweeper: HyperCARPS


x0: 3
x1: 4

seed: None
budget: None

spurious_var: 3.14

hydra:
sweeper:
n_trials: ${carps_task.n_trials}
sweeper_kwargs:
optimizer_kwargs:
_target_: carps.optimizers.hebo.HEBOOptimizer
_partial_: true
task: ${carps_task}
search_space: ${search_space}

run:
dir: ./tmp/${now:%Y-%m-%d}/${now:%H-%M-%S}
sweep:
dir: ./tmp/${now:%Y-%m-%d}/${now:%H-%M-%S}
46 changes: 46 additions & 0 deletions examples/configs/carps_smac.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@

defaults:
- _self_
- carps_task: branin
- search_space: branin
- override hydra/sweeper: HyperCARPS


x0: 3
x1: 4

seed: None
budget: None

spurious_var: 3.14

hydra:
sweeper:
n_trials: ${carps_task.n_trials}
search_space: ${search_space}
sweeper_kwargs:
optimizer_kwargs:
_target_: carps.optimizers.smac20.SMAC3Optimizer
_partial_: true
task: ${carps_task}
smac_cfg:
smac_class: smac.facade.multi_fidelity_facade.MultiFidelityFacade
scenario:
seed: 0
n_trials: ${carps_task.n_trials}
deterministic: true
n_workers: 1
min_budget: 1
max_budget: 10
smac_kwargs:
dask_client: null
intensifier:
_target_: smac.intensifier.hyperband.Hyperband
_partial_: true
eta: 3


run:
dir: ./tmp/${now:%Y-%m-%d}/${now:%H-%M-%S}
sweep:
dir: ./tmp/${now:%Y-%m-%d}/${now:%H-%M-%S}
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,15 @@ hydra:
optimizer_kwargs:
_target_: carps.optimizers.smac20.SMAC3Optimizer
_partial_: true
n_trials: ${hydra.sweeper.n_trials}
time_budget: 100
task:
n_trials: ${hydra.sweeper.n_trials}
n_workers: 1
n_objectives: 1
smac_cfg:
smac_class: smac.facade.multi_fidelity_facade.MultiFidelityFacade
scenario:
seed: ${seed}
n_trials: 10
n_trials: ${hydra.sweeper.n_trials}
deterministic: true
n_workers: 1
min_budget: 1
Expand Down
7 changes: 7 additions & 0 deletions examples/configs/carps_task/branin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
n_trials: 15
n_objectives: 1
time_budget: null
n_workers: 1
is_multifidelity: false
min_budget: null
max_budget: null
13 changes: 13 additions & 0 deletions examples/configs/search_space/branin.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
seed: 0
hyperparameters:
x0:
type: uniform_float
lower: -5
upper: 10
log: false
x1:
type: uniform_float
lower: 0
upper: 15
log: false
default_value: 2
Loading

0 comments on commit 71eb7e8

Please sign in to comment.