Skip to content

Commit

Permalink
Enhance
Browse files Browse the repository at this point in the history
  • Loading branch information
nabenabe0928 committed Nov 8, 2024
1 parent f513932 commit 817ae32
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions package/samplers/smac_sampler/sampler.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@

class SMACSampler(SimpleBaseSampler): # type: ignore
"""
A sampler that uses the default SMAC3.
A sampler that uses SMAC3 v2.2.0.
Please check the API reference for more details:
https://automl.github.io/SMAC3/main/5_api.html
Expand Down Expand Up @@ -98,7 +98,7 @@ class SMACSampler(SimpleBaseSampler): # type: ignore
def __init__(
self,
search_space: dict[str, BaseDistribution],
n_trials: int = 100, # Required for initial design.
n_trials: int = 100,
*,
surrogate_model_type: str = "rf",
acq_func_type: str = "ei_log",
Expand All @@ -111,7 +111,6 @@ def __init__(
init_design_n_configs_per_hyperparameter: int = 10,
init_design_max_ratio: float = 0.25,
) -> None:
# https://github.com/automl/SMAC3/blob/v2.2.0/smac/initial_design/abstract_initial_design.py#L40-L42
super().__init__(search_space)
self._cs, self._hp_scale_value = self._convert_to_config_space_design_space(search_space)
scenario = Scenario(configspace=self._cs, deterministic=True, n_trials=n_trials)
Expand Down

0 comments on commit 817ae32

Please sign in to comment.