From 256479c1d87b995ee28a2c29b59b94ef24fff7d1 Mon Sep 17 00:00:00 2001 From: y0z Date: Thu, 5 Dec 2024 16:07:20 +0900 Subject: [PATCH 01/11] Update SMACSampler --- package/samplers/smac_sampler/README.md | 28 +++++++++++++++++++++--- package/samplers/smac_sampler/sampler.py | 12 +++++++++- 2 files changed, 36 insertions(+), 4 deletions(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index 460b9caa..db1a4c4c 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -7,9 +7,30 @@ optuna_versions: [3.6.1] license: MIT License --- -## Class or Function Names +## APIs -- SAMCSampler +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 + +### `SMACSampler(search_space: dict[str, BaseDistribution], n_trials: int = 100,seed: int | None = None, *,surrogate_model_type: str = "rf", acq_func_type: str = "ei_log", init_design_type: str = "sobol", surrogate_model_rf_num_trees: int = 10, surrogate_model_rf_ratio_features: float = 1.0, surrogate_model_rf_min_samples_split: int = 2, surrogate_model_rf_min_samples_leaf: int = 1, init_design_n_configs: int | None = None, init_design_n_configs_per_hyperparameter: int = 10, init_design_max_ratio: float = 0.25, output_directory: Path = Path("smac3_output"))` + +- `search_space`: A dictionary of Optuna distributions. +- `n_trials`: Number of trials to be evaluated in a study. This argument is used to determine the number of initial configurations by SMAC3. Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. This argument does not have to be precise, but it is better to be exact for better performance. +- `seed`: Seed for random number generator. If `None` is given, seed is generated randomly. +- `surrogate_model_type`: What model to use for the probabilistic model. Either `"gp"` (Gaussian process), `"gp_mcmc"` (Gaussian process with MCMC), or `"rf"` (random forest). Default to `"rf"` (random forest). +- `acq_func_type`: What acquisition function to use. Either `"ei"` (expected improvement), `"ei_log"` (expected improvement with log-scaled function), `"pi"` (probability of improvement), or `"lcb"` (lower confidence bound). Default to `"ei_log"`. +- `init_design_type`: What initialization sampler to use. Either `"sobol"` (Sobol sequence), `"lhd"` (Latin hypercube), or `"random"`. Default to `"sobol"`. +- `surrogate_model_rf_num_trees`: The number of trees used for random forest. Equivalent to `n_estimators` in `RandomForestRegressor` in sklearn. +- `surrogate_model_rf_ratio_features`: The ratio of features to use for each tree training in random forest. Equivalent to `max_features` in `RandomForestRegressor` in sklearn. + `surrogate_model_rf_min_samples_split`: The minimum number of samples required to split an internal node: Equivalent to `min_samples_split` in `RandomForestRegressor` in sklearn. + `surrogate_model_rf_min_samples_leaf`: The minimum number of samples required to be at a leaf node. A split point at any depth will only be considered if it leaves at least `min_samples_leaf` training samples in each of the left and right branches. This may have the effect of smoothing the model, especially in regression. Equivalent to `min_samples_leaf` in `RandomForestRegressor` in sklearn. + `init_design_n_configs`: Number of initial configurations. + `init_design_n_configs_per_hyperparameter`: Number of initial configurations per hyperparameter. For example, if my configuration space covers five hyperparameters and `n_configs_per_hyperparameter` is set to 10, then 50 initial configurations will be sampled. + `init_design_max_ratio`: Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. Additional configurations are not affected by this parameter. + `output_directy` : `Path`, defaults to `Path("smac3_output")`. The directory in which to save the output. The files are saved in `./output_directory/name/seed`. ## Installation @@ -41,6 +62,7 @@ sampler = SMACSampler( "y": optuna.distributions.IntDistribution(-10, 10), }, n_trials=n_trials, + output_directory="smac3_output", ) study = optuna.create_study(sampler=sampler) study.optimize(objective, n_trials=n_trials) @@ -54,7 +76,7 @@ See [`example.py`](https://github.com/optuna/optunahub-registry/blob/main/packag SMAC is maintained by the SMAC team in [automl.org](https://www.automl.org/). If you have trouble using SMAC, a concrete question or found a bug, please create an issue under the [SMAC](https://github.com/automl/SMAC3) repository. -For all other inquiries, please write an email to smac\[at\]ai\[dot\]uni\[dash\]hannover\[dot\]de. +For all other inquiries, please write an email to smac(at)ai(dot)uni(dash)hannover(dot)de. ### Reference diff --git a/package/samplers/smac_sampler/sampler.py b/package/samplers/smac_sampler/sampler.py index 8c3f412a..09d5966e 100644 --- a/package/samplers/smac_sampler/sampler.py +++ b/package/samplers/smac_sampler/sampler.py @@ -1,6 +1,7 @@ from __future__ import annotations from collections.abc import Sequence +from pathlib import Path from ConfigSpace import Categorical from ConfigSpace import Configuration @@ -96,6 +97,10 @@ class SMACSampler(optunahub.samplers.SimpleBaseSampler): init_design_max_ratio: Use at most ``n_trials * init_design_max_ratio`` number of configurations in the initial design. Additional configurations are not affected by this parameter. + output_directory: + Path, defaults to Path("smac3_output"). + The directory in which to save the output. + The files are saved in `./output_directory/name/seed`. """ def __init__( @@ -114,11 +119,16 @@ def __init__( init_design_n_configs: int | None = None, init_design_n_configs_per_hyperparameter: int = 10, init_design_max_ratio: float = 0.25, + output_directory: Path = Path("smac3_output"), ) -> None: 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, seed=seed or -1 + configspace=self._cs, + deterministic=True, + n_trials=n_trials, + seed=seed or -1, + output_directory=output_directory, ) surrogate_model = self._get_surrogate_model( scenario, From a0c3936c36722aeb295bf3c2945890a8afa8bc42 Mon Sep 17 00:00:00 2001 From: y0z Date: Thu, 5 Dec 2024 16:15:57 +0900 Subject: [PATCH 02/11] Revert change --- package/samplers/smac_sampler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index db1a4c4c..0b978694 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -76,7 +76,7 @@ See [`example.py`](https://github.com/optuna/optunahub-registry/blob/main/packag SMAC is maintained by the SMAC team in [automl.org](https://www.automl.org/). If you have trouble using SMAC, a concrete question or found a bug, please create an issue under the [SMAC](https://github.com/automl/SMAC3) repository. -For all other inquiries, please write an email to smac(at)ai(dot)uni(dash)hannover(dot)de. +For all other inquiries, please write an email to smac\[at\]ai\[dot\]uni\[dash\]hannover\[dot\]de. ### Reference From 9c99d2e32e1ed0a2274cb80507b4c2a4e6ed45d8 Mon Sep 17 00:00:00 2001 From: Yoshihiko Ozaki <30489874+y0z@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:58:23 +0900 Subject: [PATCH 03/11] Update package/samplers/smac_sampler/README.md Co-authored-by: Naoto Mizuno --- package/samplers/smac_sampler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index 0b978694..ddc28a26 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -15,7 +15,7 @@ Please check the API reference for more details: - https://automl.github.io/SMAC3/main/5_api.html -### `SMACSampler(search_space: dict[str, BaseDistribution], n_trials: int = 100,seed: int | None = None, *,surrogate_model_type: str = "rf", acq_func_type: str = "ei_log", init_design_type: str = "sobol", surrogate_model_rf_num_trees: int = 10, surrogate_model_rf_ratio_features: float = 1.0, surrogate_model_rf_min_samples_split: int = 2, surrogate_model_rf_min_samples_leaf: int = 1, init_design_n_configs: int | None = None, init_design_n_configs_per_hyperparameter: int = 10, init_design_max_ratio: float = 0.25, output_directory: Path = Path("smac3_output"))` +### `SMACSampler(search_space: dict[str, BaseDistribution], n_trials: int = 100, seed: int | None = None, *, surrogate_model_type: str = "rf", acq_func_type: str = "ei_log", init_design_type: str = "sobol", surrogate_model_rf_num_trees: int = 10, surrogate_model_rf_ratio_features: float = 1.0, surrogate_model_rf_min_samples_split: int = 2, surrogate_model_rf_min_samples_leaf: int = 1, init_design_n_configs: int | None = None, init_design_n_configs_per_hyperparameter: int = 10, init_design_max_ratio: float = 0.25, output_directory: Path = Path("smac3_output"))` - `search_space`: A dictionary of Optuna distributions. - `n_trials`: Number of trials to be evaluated in a study. This argument is used to determine the number of initial configurations by SMAC3. Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. This argument does not have to be precise, but it is better to be exact for better performance. From e3b3330fc1597280566f7398fa6cca156c977977 Mon Sep 17 00:00:00 2001 From: Yoshihiko Ozaki <30489874+y0z@users.noreply.github.com> Date: Wed, 11 Dec 2024 16:59:50 +0900 Subject: [PATCH 04/11] Update package/samplers/smac_sampler/README.md Co-authored-by: Naoto Mizuno --- package/samplers/smac_sampler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index ddc28a26..2df6e98c 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -25,7 +25,7 @@ Please check the API reference for more details: - `init_design_type`: What initialization sampler to use. Either `"sobol"` (Sobol sequence), `"lhd"` (Latin hypercube), or `"random"`. Default to `"sobol"`. - `surrogate_model_rf_num_trees`: The number of trees used for random forest. Equivalent to `n_estimators` in `RandomForestRegressor` in sklearn. - `surrogate_model_rf_ratio_features`: The ratio of features to use for each tree training in random forest. Equivalent to `max_features` in `RandomForestRegressor` in sklearn. - `surrogate_model_rf_min_samples_split`: The minimum number of samples required to split an internal node: Equivalent to `min_samples_split` in `RandomForestRegressor` in sklearn. +- `surrogate_model_rf_min_samples_split`: The minimum number of samples required to split an internal node: Equivalent to `min_samples_split` in `RandomForestRegressor` in sklearn. `surrogate_model_rf_min_samples_leaf`: The minimum number of samples required to be at a leaf node. A split point at any depth will only be considered if it leaves at least `min_samples_leaf` training samples in each of the left and right branches. This may have the effect of smoothing the model, especially in regression. Equivalent to `min_samples_leaf` in `RandomForestRegressor` in sklearn. `init_design_n_configs`: Number of initial configurations. `init_design_n_configs_per_hyperparameter`: Number of initial configurations per hyperparameter. For example, if my configuration space covers five hyperparameters and `n_configs_per_hyperparameter` is set to 10, then 50 initial configurations will be sampled. From 98a5541d7d3fd79f1c4f7e0a5c252ec8cf74c32d Mon Sep 17 00:00:00 2001 From: Yoshihiko Ozaki <30489874+y0z@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:00:01 +0900 Subject: [PATCH 05/11] Update package/samplers/smac_sampler/README.md Co-authored-by: Naoto Mizuno --- package/samplers/smac_sampler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index 2df6e98c..ec5953d8 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -26,7 +26,7 @@ Please check the API reference for more details: - `surrogate_model_rf_num_trees`: The number of trees used for random forest. Equivalent to `n_estimators` in `RandomForestRegressor` in sklearn. - `surrogate_model_rf_ratio_features`: The ratio of features to use for each tree training in random forest. Equivalent to `max_features` in `RandomForestRegressor` in sklearn. - `surrogate_model_rf_min_samples_split`: The minimum number of samples required to split an internal node: Equivalent to `min_samples_split` in `RandomForestRegressor` in sklearn. - `surrogate_model_rf_min_samples_leaf`: The minimum number of samples required to be at a leaf node. A split point at any depth will only be considered if it leaves at least `min_samples_leaf` training samples in each of the left and right branches. This may have the effect of smoothing the model, especially in regression. Equivalent to `min_samples_leaf` in `RandomForestRegressor` in sklearn. +- `surrogate_model_rf_min_samples_leaf`: The minimum number of samples required to be at a leaf node. A split point at any depth will only be considered if it leaves at least `min_samples_leaf` training samples in each of the left and right branches. This may have the effect of smoothing the model, especially in regression. Equivalent to `min_samples_leaf` in `RandomForestRegressor` in sklearn. `init_design_n_configs`: Number of initial configurations. `init_design_n_configs_per_hyperparameter`: Number of initial configurations per hyperparameter. For example, if my configuration space covers five hyperparameters and `n_configs_per_hyperparameter` is set to 10, then 50 initial configurations will be sampled. `init_design_max_ratio`: Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. Additional configurations are not affected by this parameter. From 070dbbd03261942d32af97e8223437a3c513c5a2 Mon Sep 17 00:00:00 2001 From: Yoshihiko Ozaki <30489874+y0z@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:00:19 +0900 Subject: [PATCH 06/11] Update package/samplers/smac_sampler/README.md Co-authored-by: Naoto Mizuno --- package/samplers/smac_sampler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index ec5953d8..f0d6b359 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -27,7 +27,7 @@ Please check the API reference for more details: - `surrogate_model_rf_ratio_features`: The ratio of features to use for each tree training in random forest. Equivalent to `max_features` in `RandomForestRegressor` in sklearn. - `surrogate_model_rf_min_samples_split`: The minimum number of samples required to split an internal node: Equivalent to `min_samples_split` in `RandomForestRegressor` in sklearn. - `surrogate_model_rf_min_samples_leaf`: The minimum number of samples required to be at a leaf node. A split point at any depth will only be considered if it leaves at least `min_samples_leaf` training samples in each of the left and right branches. This may have the effect of smoothing the model, especially in regression. Equivalent to `min_samples_leaf` in `RandomForestRegressor` in sklearn. - `init_design_n_configs`: Number of initial configurations. +- `init_design_n_configs`: Number of initial configurations. `init_design_n_configs_per_hyperparameter`: Number of initial configurations per hyperparameter. For example, if my configuration space covers five hyperparameters and `n_configs_per_hyperparameter` is set to 10, then 50 initial configurations will be sampled. `init_design_max_ratio`: Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. Additional configurations are not affected by this parameter. `output_directy` : `Path`, defaults to `Path("smac3_output")`. The directory in which to save the output. The files are saved in `./output_directory/name/seed`. From 75301da70d7657df56f4cac6eb04cbf7c4dfea66 Mon Sep 17 00:00:00 2001 From: Yoshihiko Ozaki <30489874+y0z@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:00:26 +0900 Subject: [PATCH 07/11] Update package/samplers/smac_sampler/README.md Co-authored-by: Naoto Mizuno --- package/samplers/smac_sampler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index f0d6b359..579e3c47 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -28,7 +28,7 @@ Please check the API reference for more details: - `surrogate_model_rf_min_samples_split`: The minimum number of samples required to split an internal node: Equivalent to `min_samples_split` in `RandomForestRegressor` in sklearn. - `surrogate_model_rf_min_samples_leaf`: The minimum number of samples required to be at a leaf node. A split point at any depth will only be considered if it leaves at least `min_samples_leaf` training samples in each of the left and right branches. This may have the effect of smoothing the model, especially in regression. Equivalent to `min_samples_leaf` in `RandomForestRegressor` in sklearn. - `init_design_n_configs`: Number of initial configurations. - `init_design_n_configs_per_hyperparameter`: Number of initial configurations per hyperparameter. For example, if my configuration space covers five hyperparameters and `n_configs_per_hyperparameter` is set to 10, then 50 initial configurations will be sampled. +- `init_design_n_configs_per_hyperparameter`: Number of initial configurations per hyperparameter. For example, if my configuration space covers five hyperparameters and `n_configs_per_hyperparameter` is set to 10, then 50 initial configurations will be sampled. `init_design_max_ratio`: Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. Additional configurations are not affected by this parameter. `output_directy` : `Path`, defaults to `Path("smac3_output")`. The directory in which to save the output. The files are saved in `./output_directory/name/seed`. From 4940b0e29d6526a8b29dd88439b4b9db6b77073d Mon Sep 17 00:00:00 2001 From: Yoshihiko Ozaki <30489874+y0z@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:00:32 +0900 Subject: [PATCH 08/11] Update package/samplers/smac_sampler/README.md Co-authored-by: Naoto Mizuno --- package/samplers/smac_sampler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index 579e3c47..476b8d4e 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -29,7 +29,7 @@ Please check the API reference for more details: - `surrogate_model_rf_min_samples_leaf`: The minimum number of samples required to be at a leaf node. A split point at any depth will only be considered if it leaves at least `min_samples_leaf` training samples in each of the left and right branches. This may have the effect of smoothing the model, especially in regression. Equivalent to `min_samples_leaf` in `RandomForestRegressor` in sklearn. - `init_design_n_configs`: Number of initial configurations. - `init_design_n_configs_per_hyperparameter`: Number of initial configurations per hyperparameter. For example, if my configuration space covers five hyperparameters and `n_configs_per_hyperparameter` is set to 10, then 50 initial configurations will be sampled. - `init_design_max_ratio`: Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. Additional configurations are not affected by this parameter. +- `init_design_max_ratio`: Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. Additional configurations are not affected by this parameter. `output_directy` : `Path`, defaults to `Path("smac3_output")`. The directory in which to save the output. The files are saved in `./output_directory/name/seed`. ## Installation From 19bd153965f9b49e1a92cd9d0232b05b4992757e Mon Sep 17 00:00:00 2001 From: Yoshihiko Ozaki <30489874+y0z@users.noreply.github.com> Date: Wed, 11 Dec 2024 17:00:40 +0900 Subject: [PATCH 09/11] Update package/samplers/smac_sampler/README.md Co-authored-by: Naoto Mizuno --- package/samplers/smac_sampler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index 476b8d4e..ebd2d853 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -30,7 +30,7 @@ Please check the API reference for more details: - `init_design_n_configs`: Number of initial configurations. - `init_design_n_configs_per_hyperparameter`: Number of initial configurations per hyperparameter. For example, if my configuration space covers five hyperparameters and `n_configs_per_hyperparameter` is set to 10, then 50 initial configurations will be sampled. - `init_design_max_ratio`: Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. Additional configurations are not affected by this parameter. - `output_directy` : `Path`, defaults to `Path("smac3_output")`. The directory in which to save the output. The files are saved in `./output_directory/name/seed`. +- `output_directy` : `Path`, defaults to `Path("smac3_output")`. The directory in which to save the output. The files are saved in `./output_directory/name/seed`. ## Installation From b9c942069c432e1a32b66daacfe2375640b059c6 Mon Sep 17 00:00:00 2001 From: y0z Date: Wed, 11 Dec 2024 17:06:17 +0900 Subject: [PATCH 10/11] Update Path API --- package/samplers/smac_sampler/README.md | 2 +- package/samplers/smac_sampler/sampler.py | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index ebd2d853..dc9e796a 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -30,7 +30,7 @@ Please check the API reference for more details: - `init_design_n_configs`: Number of initial configurations. - `init_design_n_configs_per_hyperparameter`: Number of initial configurations per hyperparameter. For example, if my configuration space covers five hyperparameters and `n_configs_per_hyperparameter` is set to 10, then 50 initial configurations will be sampled. - `init_design_max_ratio`: Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. Additional configurations are not affected by this parameter. -- `output_directy` : `Path`, defaults to `Path("smac3_output")`. The directory in which to save the output. The files are saved in `./output_directory/name/seed`. +- `output_directy`: Output directory path, defaults to `"smac3_output"`. The directory in which to save the output. The files are saved in `./output_directory/name/seed`. ## Installation diff --git a/package/samplers/smac_sampler/sampler.py b/package/samplers/smac_sampler/sampler.py index 09d5966e..a92179b2 100644 --- a/package/samplers/smac_sampler/sampler.py +++ b/package/samplers/smac_sampler/sampler.py @@ -98,7 +98,7 @@ class SMACSampler(optunahub.samplers.SimpleBaseSampler): Use at most ``n_trials * init_design_max_ratio`` number of configurations in the initial design. Additional configurations are not affected by this parameter. output_directory: - Path, defaults to Path("smac3_output"). + Output directory path, defaults to "smac3_output". The directory in which to save the output. The files are saved in `./output_directory/name/seed`. """ @@ -119,7 +119,7 @@ def __init__( init_design_n_configs: int | None = None, init_design_n_configs_per_hyperparameter: int = 10, init_design_max_ratio: float = 0.25, - output_directory: Path = Path("smac3_output"), + output_directory: str = "smac3_output", ) -> None: super().__init__(search_space) self._cs, self._hp_scale_value = self._convert_to_config_space_design_space(search_space) @@ -128,7 +128,7 @@ def __init__( deterministic=True, n_trials=n_trials, seed=seed or -1, - output_directory=output_directory, + output_directory=Path(output_directory), ) surrogate_model = self._get_surrogate_model( scenario, From 7e5e8b1d9576e1f1eb92f3066e2adc393c8b7453 Mon Sep 17 00:00:00 2001 From: y0z Date: Wed, 11 Dec 2024 17:07:11 +0900 Subject: [PATCH 11/11] Fix --- package/samplers/smac_sampler/README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package/samplers/smac_sampler/README.md b/package/samplers/smac_sampler/README.md index dc9e796a..50882ec9 100644 --- a/package/samplers/smac_sampler/README.md +++ b/package/samplers/smac_sampler/README.md @@ -15,7 +15,7 @@ Please check the API reference for more details: - https://automl.github.io/SMAC3/main/5_api.html -### `SMACSampler(search_space: dict[str, BaseDistribution], n_trials: int = 100, seed: int | None = None, *, surrogate_model_type: str = "rf", acq_func_type: str = "ei_log", init_design_type: str = "sobol", surrogate_model_rf_num_trees: int = 10, surrogate_model_rf_ratio_features: float = 1.0, surrogate_model_rf_min_samples_split: int = 2, surrogate_model_rf_min_samples_leaf: int = 1, init_design_n_configs: int | None = None, init_design_n_configs_per_hyperparameter: int = 10, init_design_max_ratio: float = 0.25, output_directory: Path = Path("smac3_output"))` +### `SMACSampler(search_space: dict[str, BaseDistribution], n_trials: int = 100, seed: int | None = None, *, surrogate_model_type: str = "rf", acq_func_type: str = "ei_log", init_design_type: str = "sobol", surrogate_model_rf_num_trees: int = 10, surrogate_model_rf_ratio_features: float = 1.0, surrogate_model_rf_min_samples_split: int = 2, surrogate_model_rf_min_samples_leaf: int = 1, init_design_n_configs: int | None = None, init_design_n_configs_per_hyperparameter: int = 10, init_design_max_ratio: float = 0.25, output_directory: str = "smac3_output")` - `search_space`: A dictionary of Optuna distributions. - `n_trials`: Number of trials to be evaluated in a study. This argument is used to determine the number of initial configurations by SMAC3. Use at most `n_trials * init_design_max_ratio` number of configurations in the initial design. This argument does not have to be precise, but it is better to be exact for better performance.