diff --git a/development/.doctrees/api/smac.acquisition.maximizer.doctree b/development/.doctrees/api/smac.acquisition.maximizer.doctree index 22910351a..4facd734d 100644 Binary files a/development/.doctrees/api/smac.acquisition.maximizer.doctree and b/development/.doctrees/api/smac.acquisition.maximizer.doctree differ diff --git a/development/.doctrees/api/smac.acquisition.maximizer.local_and_random_search.doctree b/development/.doctrees/api/smac.acquisition.maximizer.local_and_random_search.doctree index ea6d9148d..1d37d4816 100644 Binary files a/development/.doctrees/api/smac.acquisition.maximizer.local_and_random_search.doctree and b/development/.doctrees/api/smac.acquisition.maximizer.local_and_random_search.doctree differ diff --git a/development/.doctrees/environment.pickle b/development/.doctrees/environment.pickle index 5e2c3c5e4..a8fc60893 100644 Binary files a/development/.doctrees/environment.pickle and b/development/.doctrees/environment.pickle differ diff --git a/development/.doctrees/examples/1_basics/1_quadratic_function.doctree b/development/.doctrees/examples/1_basics/1_quadratic_function.doctree index ed6e7251a..dc870003c 100644 Binary files a/development/.doctrees/examples/1_basics/1_quadratic_function.doctree and b/development/.doctrees/examples/1_basics/1_quadratic_function.doctree differ diff --git a/development/.doctrees/examples/1_basics/2_svm_cv.doctree b/development/.doctrees/examples/1_basics/2_svm_cv.doctree index 5efbcd98d..89eb5cb12 100644 Binary files a/development/.doctrees/examples/1_basics/2_svm_cv.doctree and b/development/.doctrees/examples/1_basics/2_svm_cv.doctree differ diff --git a/development/.doctrees/examples/1_basics/3_ask_and_tell.doctree b/development/.doctrees/examples/1_basics/3_ask_and_tell.doctree index adf61cc50..728250457 100644 Binary files a/development/.doctrees/examples/1_basics/3_ask_and_tell.doctree and b/development/.doctrees/examples/1_basics/3_ask_and_tell.doctree differ diff --git a/development/.doctrees/examples/1_basics/4_callback.doctree b/development/.doctrees/examples/1_basics/4_callback.doctree index 2fac273f3..b29729c62 100644 Binary files a/development/.doctrees/examples/1_basics/4_callback.doctree and b/development/.doctrees/examples/1_basics/4_callback.doctree differ diff --git a/development/.doctrees/examples/1_basics/5_continue.doctree b/development/.doctrees/examples/1_basics/5_continue.doctree index f5b51da2e..50eeceeda 100644 Binary files a/development/.doctrees/examples/1_basics/5_continue.doctree and b/development/.doctrees/examples/1_basics/5_continue.doctree differ diff --git a/development/.doctrees/examples/1_basics/6_priors.doctree b/development/.doctrees/examples/1_basics/6_priors.doctree index c01530f06..2a3103119 100644 Binary files a/development/.doctrees/examples/1_basics/6_priors.doctree and b/development/.doctrees/examples/1_basics/6_priors.doctree differ diff --git a/development/.doctrees/examples/1_basics/sg_execution_times.doctree b/development/.doctrees/examples/1_basics/sg_execution_times.doctree index c5e8b13a1..45e7af2a2 100644 Binary files a/development/.doctrees/examples/1_basics/sg_execution_times.doctree and b/development/.doctrees/examples/1_basics/sg_execution_times.doctree differ diff --git a/development/.doctrees/examples/2_multi_fidelity/1_mlp_epochs.doctree b/development/.doctrees/examples/2_multi_fidelity/1_mlp_epochs.doctree index ab1bf3150..825a6b1db 100644 Binary files a/development/.doctrees/examples/2_multi_fidelity/1_mlp_epochs.doctree and b/development/.doctrees/examples/2_multi_fidelity/1_mlp_epochs.doctree differ diff --git a/development/.doctrees/examples/2_multi_fidelity/2_sgd_datasets.doctree b/development/.doctrees/examples/2_multi_fidelity/2_sgd_datasets.doctree index 90155df95..283f1f827 100644 Binary files a/development/.doctrees/examples/2_multi_fidelity/2_sgd_datasets.doctree and b/development/.doctrees/examples/2_multi_fidelity/2_sgd_datasets.doctree differ diff --git a/development/.doctrees/examples/2_multi_fidelity/3_specify_HB_via_total_budget.doctree b/development/.doctrees/examples/2_multi_fidelity/3_specify_HB_via_total_budget.doctree index 96680c459..963c296e2 100644 Binary files a/development/.doctrees/examples/2_multi_fidelity/3_specify_HB_via_total_budget.doctree and b/development/.doctrees/examples/2_multi_fidelity/3_specify_HB_via_total_budget.doctree differ diff --git a/development/.doctrees/examples/2_multi_fidelity/sg_execution_times.doctree b/development/.doctrees/examples/2_multi_fidelity/sg_execution_times.doctree index 737b95e50..99beb9c8a 100644 Binary files a/development/.doctrees/examples/2_multi_fidelity/sg_execution_times.doctree and b/development/.doctrees/examples/2_multi_fidelity/sg_execution_times.doctree differ diff --git a/development/.doctrees/examples/3_multi_objective/1_schaffer.doctree b/development/.doctrees/examples/3_multi_objective/1_schaffer.doctree index 9662241bb..9ae36e5aa 100644 Binary files a/development/.doctrees/examples/3_multi_objective/1_schaffer.doctree and b/development/.doctrees/examples/3_multi_objective/1_schaffer.doctree differ diff --git a/development/.doctrees/examples/3_multi_objective/2_parego.doctree b/development/.doctrees/examples/3_multi_objective/2_parego.doctree index 1e229cc9c..f41474743 100644 Binary files a/development/.doctrees/examples/3_multi_objective/2_parego.doctree and b/development/.doctrees/examples/3_multi_objective/2_parego.doctree differ diff --git a/development/.doctrees/examples/3_multi_objective/sg_execution_times.doctree b/development/.doctrees/examples/3_multi_objective/sg_execution_times.doctree index 456a2e15c..17c303767 100644 Binary files a/development/.doctrees/examples/3_multi_objective/sg_execution_times.doctree and b/development/.doctrees/examples/3_multi_objective/sg_execution_times.doctree differ diff --git a/development/.doctrees/examples/5_commandline/1_call_target_function_script.doctree b/development/.doctrees/examples/5_commandline/1_call_target_function_script.doctree index 2ae9473e7..8b9692b20 100644 Binary files a/development/.doctrees/examples/5_commandline/1_call_target_function_script.doctree and b/development/.doctrees/examples/5_commandline/1_call_target_function_script.doctree differ diff --git a/development/.doctrees/examples/5_commandline/sg_execution_times.doctree b/development/.doctrees/examples/5_commandline/sg_execution_times.doctree index 742985ab0..fc3dad51a 100644 Binary files a/development/.doctrees/examples/5_commandline/sg_execution_times.doctree and b/development/.doctrees/examples/5_commandline/sg_execution_times.doctree differ diff --git a/development/.doctrees/sg_execution_times.doctree b/development/.doctrees/sg_execution_times.doctree index 23b747444..a8d8acc44 100644 Binary files a/development/.doctrees/sg_execution_times.doctree and b/development/.doctrees/sg_execution_times.doctree differ diff --git a/development/_downloads/063faf88baea73dba8e7341bd337a200/1_quadratic_function.zip b/development/_downloads/063faf88baea73dba8e7341bd337a200/1_quadratic_function.zip index ae7590f20..4e9fefddb 100644 Binary files a/development/_downloads/063faf88baea73dba8e7341bd337a200/1_quadratic_function.zip and b/development/_downloads/063faf88baea73dba8e7341bd337a200/1_quadratic_function.zip differ diff --git a/development/_downloads/1e0c944ace9c062b0d0e5384a117c0a9/2_sgd_datasets.zip b/development/_downloads/1e0c944ace9c062b0d0e5384a117c0a9/2_sgd_datasets.zip index 31c483c7c..1495dcabc 100644 Binary files a/development/_downloads/1e0c944ace9c062b0d0e5384a117c0a9/2_sgd_datasets.zip and b/development/_downloads/1e0c944ace9c062b0d0e5384a117c0a9/2_sgd_datasets.zip differ diff --git a/development/_downloads/27a00d8d416eb0656332c9b4aa2106f2/1_schaffer.zip b/development/_downloads/27a00d8d416eb0656332c9b4aa2106f2/1_schaffer.zip index 1c555bdb6..3e36debdb 100644 Binary files a/development/_downloads/27a00d8d416eb0656332c9b4aa2106f2/1_schaffer.zip and b/development/_downloads/27a00d8d416eb0656332c9b4aa2106f2/1_schaffer.zip differ diff --git a/development/_downloads/3e10c4404a224fa5a1f640ee1420cee0/2_svm_cv.zip b/development/_downloads/3e10c4404a224fa5a1f640ee1420cee0/2_svm_cv.zip index 3500cd3f5..4e9c70cfc 100644 Binary files a/development/_downloads/3e10c4404a224fa5a1f640ee1420cee0/2_svm_cv.zip and b/development/_downloads/3e10c4404a224fa5a1f640ee1420cee0/2_svm_cv.zip differ diff --git a/development/_downloads/49ed3f530b360a5f903030f84d3fbc00/1_call_target_function_script.zip b/development/_downloads/49ed3f530b360a5f903030f84d3fbc00/1_call_target_function_script.zip index 6cc47bb2b..45d56c428 100644 Binary files a/development/_downloads/49ed3f530b360a5f903030f84d3fbc00/1_call_target_function_script.zip and b/development/_downloads/49ed3f530b360a5f903030f84d3fbc00/1_call_target_function_script.zip differ diff --git a/development/_downloads/5f7af4d241173fd9f4d4445891bb8995/1_mlp_epochs.zip b/development/_downloads/5f7af4d241173fd9f4d4445891bb8995/1_mlp_epochs.zip index e700f932c..d4e58d544 100644 Binary files a/development/_downloads/5f7af4d241173fd9f4d4445891bb8995/1_mlp_epochs.zip and b/development/_downloads/5f7af4d241173fd9f4d4445891bb8995/1_mlp_epochs.zip differ diff --git a/development/_downloads/6d5784621a777b1b2116cd9e73c2fbb3/3_ask_and_tell.zip b/development/_downloads/6d5784621a777b1b2116cd9e73c2fbb3/3_ask_and_tell.zip index e0473eaa9..69edd23ea 100644 Binary files a/development/_downloads/6d5784621a777b1b2116cd9e73c2fbb3/3_ask_and_tell.zip and b/development/_downloads/6d5784621a777b1b2116cd9e73c2fbb3/3_ask_and_tell.zip differ diff --git a/development/_downloads/8e591d0775f87f99196616171f815f56/4_callback.zip b/development/_downloads/8e591d0775f87f99196616171f815f56/4_callback.zip index 3ea442d13..735aa9d29 100644 Binary files a/development/_downloads/8e591d0775f87f99196616171f815f56/4_callback.zip and b/development/_downloads/8e591d0775f87f99196616171f815f56/4_callback.zip differ diff --git a/development/_downloads/bc82bea3a5dd7bdba60b65220891d9e5/examples_python.zip b/development/_downloads/bc82bea3a5dd7bdba60b65220891d9e5/examples_python.zip index 529d3867c..0b70245b5 100644 Binary files a/development/_downloads/bc82bea3a5dd7bdba60b65220891d9e5/examples_python.zip and b/development/_downloads/bc82bea3a5dd7bdba60b65220891d9e5/examples_python.zip differ diff --git a/development/_downloads/c3274eae6f91897cdd95549b09a79a4e/3_specify_HB_via_total_budget.zip b/development/_downloads/c3274eae6f91897cdd95549b09a79a4e/3_specify_HB_via_total_budget.zip index 193d6e0f2..eb6bd0063 100644 Binary files a/development/_downloads/c3274eae6f91897cdd95549b09a79a4e/3_specify_HB_via_total_budget.zip and b/development/_downloads/c3274eae6f91897cdd95549b09a79a4e/3_specify_HB_via_total_budget.zip differ diff --git a/development/_downloads/d198a13b3da9ac20be16998a6bf61983/6_priors.zip b/development/_downloads/d198a13b3da9ac20be16998a6bf61983/6_priors.zip index faea60314..d09cdc9af 100644 Binary files a/development/_downloads/d198a13b3da9ac20be16998a6bf61983/6_priors.zip and b/development/_downloads/d198a13b3da9ac20be16998a6bf61983/6_priors.zip differ diff --git a/development/_downloads/d7d5ff2dd061059c0d350ef36825b902/5_continue.zip b/development/_downloads/d7d5ff2dd061059c0d350ef36825b902/5_continue.zip index 43191006b..895302678 100644 Binary files a/development/_downloads/d7d5ff2dd061059c0d350ef36825b902/5_continue.zip and b/development/_downloads/d7d5ff2dd061059c0d350ef36825b902/5_continue.zip differ diff --git a/development/_downloads/ed1a42934b5fbe7816cabd752552cf37/2_parego.zip b/development/_downloads/ed1a42934b5fbe7816cabd752552cf37/2_parego.zip index 87a2314b5..c3835c3cc 100644 Binary files a/development/_downloads/ed1a42934b5fbe7816cabd752552cf37/2_parego.zip and b/development/_downloads/ed1a42934b5fbe7816cabd752552cf37/2_parego.zip differ diff --git a/development/_downloads/fb625db3c50d423b1b7881136ffdeec8/examples_jupyter.zip b/development/_downloads/fb625db3c50d423b1b7881136ffdeec8/examples_jupyter.zip index 90321542a..a50a4a796 100644 Binary files a/development/_downloads/fb625db3c50d423b1b7881136ffdeec8/examples_jupyter.zip and b/development/_downloads/fb625db3c50d423b1b7881136ffdeec8/examples_jupyter.zip differ diff --git a/development/_images/sphx_glr_1_mlp_epochs_001.png b/development/_images/sphx_glr_1_mlp_epochs_001.png index d4b1c42c2..b2d07a066 100644 Binary files a/development/_images/sphx_glr_1_mlp_epochs_001.png and b/development/_images/sphx_glr_1_mlp_epochs_001.png differ diff --git a/development/_images/sphx_glr_1_mlp_epochs_thumb.png b/development/_images/sphx_glr_1_mlp_epochs_thumb.png index 82698eba5..5a3283243 100644 Binary files a/development/_images/sphx_glr_1_mlp_epochs_thumb.png and b/development/_images/sphx_glr_1_mlp_epochs_thumb.png differ diff --git a/development/_images/sphx_glr_2_parego_001.png b/development/_images/sphx_glr_2_parego_001.png index 11beaeaa3..bf37333d9 100644 Binary files a/development/_images/sphx_glr_2_parego_001.png and b/development/_images/sphx_glr_2_parego_001.png differ diff --git a/development/_images/sphx_glr_2_parego_thumb.png b/development/_images/sphx_glr_2_parego_thumb.png index 8765e8376..ef5156b84 100644 Binary files a/development/_images/sphx_glr_2_parego_thumb.png and b/development/_images/sphx_glr_2_parego_thumb.png differ diff --git a/development/_modules/smac/acquisition/maximizer/local_and_random_search.html b/development/_modules/smac/acquisition/maximizer/local_and_random_search.html index feef6dc25..5bbaa9212 100644 --- a/development/_modules/smac/acquisition/maximizer/local_and_random_search.html +++ b/development/_modules/smac/acquisition/maximizer/local_and_random_search.html @@ -1044,6 +1044,7 @@

Source code for smac.acquisition.maximizer.local_and_random_search

class LocalAndSortedRandomSearch(AbstractAcquisitionMaximizer): """Implement SMAC's default acquisition function optimization. + This optimizer performs local search from the previous best points according to the acquisition This optimizer performs local search from the previous best points according to the acquisition function, uses the acquisition function to sort randomly sampled configurations. Random configurations are interleaved by the main SMAC code. @@ -1058,6 +1059,10 @@

Source code for smac.acquisition.maximizer.local_and_random_search

A version of the user-defined ConfigurationSpace where all parameters are uniform (or have their weights removed in the case of a categorical hyperparameter). Can optionally be given and sampling ratios be defined via the `prior_sampling_fraction` parameter. + uniform_configspace : ConfigurationSpace + A version of the user-defined ConfigurationSpace where all parameters are uniform (or have their weights removed + in the case of a categorical hyperparameter). Can optionally be given and sampling ratios be defined via the + `prior_sampling_fraction` parameter. acquisition_function : AbstractAcquisitionFunction | None, defaults to None challengers : int, defaults to 5000 Number of challengers. @@ -1070,6 +1075,9 @@

Source code for smac.acquisition.maximizer.local_and_random_search

prior_sampling_fraction: float, defaults to 0.5 The ratio of random samples that are taken from the user-defined ConfigurationSpace, as opposed to the uniform version (needs `uniform_configspace`to be defined). + prior_sampling_fraction: float, defaults to 0.5 + The ratio of random samples that are taken from the user-defined ConfigurationSpace, as opposed to the uniform + version (needs `uniform_configspace`to be defined). seed : int, defaults to 0 """ @@ -1092,6 +1100,28 @@

Source code for smac.acquisition.maximizer.local_and_random_search

seed=seed, ) + if uniform_configspace is not None and prior_sampling_fraction is None: + prior_sampling_fraction = 0.5 + if uniform_configspace is None and prior_sampling_fraction is not None: + raise ValueError("If `prior_sampling_fraction` is given, `uniform_configspace` must be defined.") + if uniform_configspace is not None and prior_sampling_fraction is not None: + self._prior_random_search = RandomSearch( + acquisition_function=acquisition_function, + configspace=configspace, + seed=seed, + ) + + self._uniform_random_search = RandomSearch( + acquisition_function=acquisition_function, + configspace=uniform_configspace, + seed=seed, + ) + else: + self._random_search = RandomSearch( + configspace=configspace, + acquisition_function=acquisition_function, + seed=seed, + ) if uniform_configspace is not None and prior_sampling_fraction is None: prior_sampling_fraction = 0.5 if uniform_configspace is None and prior_sampling_fraction is not None: @@ -1126,6 +1156,8 @@

Source code for smac.acquisition.maximizer.local_and_random_search

self._local_search_iterations = local_search_iterations self._prior_sampling_fraction = prior_sampling_fraction self._uniform_configspace = uniform_configspace + self._prior_sampling_fraction = prior_sampling_fraction + self._uniform_configspace = uniform_configspace @property def acquisition_function(self) -> AbstractAcquisitionFunction | None: # noqa: D102 @@ -1135,6 +1167,11 @@

Source code for smac.acquisition.maximizer.local_and_random_search

@acquisition_function.setter def acquisition_function(self, acquisition_function: AbstractAcquisitionFunction) -> None: self._acquisition_function = acquisition_function + if self._uniform_configspace is not None: + self._prior_random_search._acquisition_function = acquisition_function + self._uniform_random_search._acquisition_function = acquisition_function + else: + self._random_search._acquisition_function = acquisition_function if self._uniform_configspace is not None: self._prior_random_search._acquisition_function = acquisition_function self._uniform_random_search._acquisition_function = acquisition_function @@ -1160,6 +1197,21 @@

Source code for smac.acquisition.maximizer.local_and_random_search

"local_search": self._local_search.meta, } ) + if self._uniform_configspace is None: + meta.update( + { + "random_search": self._random_search.meta, + "local_search": self._local_search.meta, + } + ) + else: + meta.update( + { + "prior_random_search": self._prior_random_search.meta, + "uniform_random_search": self._uniform_random_search.meta, + "local_search": self._local_search.meta, + } + ) return meta @@ -1194,6 +1246,9 @@

Source code for smac.acquisition.maximizer.local_and_random_search

_sorted=True, ) + # Choose the best self._local_search_iterations random configs to start the local search, and choose only + # incumbent from previous configs + random_starting_points = next_configs_by_random_search_sorted[: self._local_search_iterations] # Choose the best self._local_search_iterations random configs to start the local search, and choose only # incumbent from previous configs random_starting_points = next_configs_by_random_search_sorted[: self._local_search_iterations] diff --git a/development/_sources/examples/1_basics/1_quadratic_function.rst.txt b/development/_sources/examples/1_basics/1_quadratic_function.rst.txt index 7cd3cf507..a79fd9578 100644 --- a/development/_sources/examples/1_basics/1_quadratic_function.rst.txt +++ b/development/_sources/examples/1_basics/1_quadratic_function.rst.txt @@ -161,7 +161,7 @@ be applied to problems with large evaluation budgets (up to 1000 evaluations). .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 4.230 seconds) + **Total running time of the script:** (0 minutes 4.357 seconds) .. _sphx_glr_download_examples_1_basics_1_quadratic_function.py: diff --git a/development/_sources/examples/1_basics/2_svm_cv.rst.txt b/development/_sources/examples/1_basics/2_svm_cv.rst.txt index d4aa4e0ed..12db1bb4e 100644 --- a/development/_sources/examples/1_basics/2_svm_cv.rst.txt +++ b/development/_sources/examples/1_basics/2_svm_cv.rst.txt @@ -387,7 +387,7 @@ types as well as conditional hyperparameters. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 2.871 seconds) + **Total running time of the script:** (0 minutes 2.925 seconds) .. _sphx_glr_download_examples_1_basics_2_svm_cv.py: diff --git a/development/_sources/examples/1_basics/3_ask_and_tell.rst.txt b/development/_sources/examples/1_basics/3_ask_and_tell.rst.txt index d2b2d3cb0..b6896df90 100644 --- a/development/_sources/examples/1_basics/3_ask_and_tell.rst.txt +++ b/development/_sources/examples/1_basics/3_ask_and_tell.rst.txt @@ -136,7 +136,7 @@ This examples show how to use the Ask-and-Tell interface. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 3.813 seconds) + **Total running time of the script:** (0 minutes 3.960 seconds) .. _sphx_glr_download_examples_1_basics_3_ask_and_tell.py: diff --git a/development/_sources/examples/1_basics/4_callback.rst.txt b/development/_sources/examples/1_basics/4_callback.rst.txt index 972af4fa8..8095644ed 100644 --- a/development/_sources/examples/1_basics/4_callback.rst.txt +++ b/development/_sources/examples/1_basics/4_callback.rst.txt @@ -146,7 +146,7 @@ Furthermore, we print some stages of the optimization process. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 0.157 seconds) + **Total running time of the script:** (0 minutes 0.158 seconds) .. _sphx_glr_download_examples_1_basics_4_callback.py: diff --git a/development/_sources/examples/1_basics/5_continue.rst.txt b/development/_sources/examples/1_basics/5_continue.rst.txt index 0e807b40d..40955bc3f 100644 --- a/development/_sources/examples/1_basics/5_continue.rst.txt +++ b/development/_sources/examples/1_basics/5_continue.rst.txt @@ -172,7 +172,7 @@ there already is a previous run with the same meta data, this run will be contin .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 1.473 seconds) + **Total running time of the script:** (0 minutes 1.536 seconds) .. _sphx_glr_download_examples_1_basics_5_continue.py: diff --git a/development/_sources/examples/1_basics/6_priors.rst.txt b/development/_sources/examples/1_basics/6_priors.rst.txt index 98c3065a8..1d2ea6eda 100644 --- a/development/_sources/examples/1_basics/6_priors.rst.txt +++ b/development/_sources/examples/1_basics/6_priors.rst.txt @@ -229,7 +229,7 @@ optimization, you have to change the acquisition function to ``PriorAcquisitionF .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 39.241 seconds) + **Total running time of the script:** (0 minutes 39.668 seconds) .. _sphx_glr_download_examples_1_basics_6_priors.py: diff --git a/development/_sources/examples/1_basics/sg_execution_times.rst.txt b/development/_sources/examples/1_basics/sg_execution_times.rst.txt index 5ade2ea5d..42a04fcda 100644 --- a/development/_sources/examples/1_basics/sg_execution_times.rst.txt +++ b/development/_sources/examples/1_basics/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**00:51.785** total execution time for 6 files **from examples/1_basics**: +**00:52.605** total execution time for 6 files **from examples/1_basics**: .. container:: @@ -33,20 +33,20 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_examples_1_basics_6_priors.py` (``6_priors.py``) - - 00:39.241 + - 00:39.668 - 0.0 * - :ref:`sphx_glr_examples_1_basics_1_quadratic_function.py` (``1_quadratic_function.py``) - - 00:04.230 + - 00:04.357 - 0.0 * - :ref:`sphx_glr_examples_1_basics_3_ask_and_tell.py` (``3_ask_and_tell.py``) - - 00:03.813 + - 00:03.960 - 0.0 * - :ref:`sphx_glr_examples_1_basics_2_svm_cv.py` (``2_svm_cv.py``) - - 00:02.871 + - 00:02.925 - 0.0 * - :ref:`sphx_glr_examples_1_basics_5_continue.py` (``5_continue.py``) - - 00:01.473 + - 00:01.536 - 0.0 * - :ref:`sphx_glr_examples_1_basics_4_callback.py` (``4_callback.py``) - - 00:00.157 + - 00:00.158 - 0.0 diff --git a/development/_sources/examples/2_multi_fidelity/1_mlp_epochs.rst.txt b/development/_sources/examples/2_multi_fidelity/1_mlp_epochs.rst.txt index ebd5b1a05..8bd2e2b6d 100644 --- a/development/_sources/examples/2_multi_fidelity/1_mlp_epochs.rst.txt +++ b/development/_sources/examples/2_multi_fidelity/1_mlp_epochs.rst.txt @@ -66,22 +66,17 @@ is chosen to optimize the average accuracy on 5-fold cross validation. [INFO][smbo.py:320] Finished 0 trials. [INFO][smbo.py:320] Finished 0 trials. [INFO][smbo.py:320] Finished 0 trials. - [INFO][smbo.py:320] Finished 100 trials. - [INFO][smbo.py:320] Finished 100 trials. - [INFO][smbo.py:320] Finished 100 trials. - [INFO][smbo.py:320] Finished 100 trials. - [INFO][smbo.py:320] Finished 150 trials. [INFO][smbo.py:328] Configuration budget is exhausted: - [INFO][smbo.py:329] --- Remaining wallclock time: -3.242112874984741 + [INFO][smbo.py:329] --- Remaining wallclock time: -0.20072674751281738 [INFO][smbo.py:330] --- Remaining cpu time: inf - [INFO][smbo.py:331] --- Remaining trials: 139 + [INFO][smbo.py:331] --- Remaining trials: 175 Default cost (SuccessiveHalving): 0.36672856700711853 Incumbent cost (SuccessiveHalving): inf [INFO][abstract_initial_design.py:82] Using `n_configs` and ignoring `n_configs_per_hyperparameter`. [INFO][abstract_facade.py:203] Workers are reduced to 8. /opt/hostedtoolcache/Python/3.10.14/x64/lib/python3.10/site-packages/distributed/node.py:182: UserWarning: Port 8787 is already in use. Perhaps you already have a cluster running? - Hosting the HTTP server on port 36157 instead + Hosting the HTTP server on port 42409 instead warnings.warn( [INFO][abstract_initial_design.py:147] Using 5 initial design configurations and 0 additional configurations. [INFO][successive_halving.py:164] Successive Halving uses budget type BUDGETS with eta 3, min budget 1, and max budget 25. @@ -102,19 +97,17 @@ is chosen to optimize the average accuracy on 5-fold cross validation. [INFO][smbo.py:320] Finished 0 trials. [INFO][smbo.py:320] Finished 0 trials. [INFO][abstract_intensifier.py:516] Added config 6ad6db as new incumbent because there are no incumbents yet. - [INFO][abstract_intensifier.py:595] Added config 16c413 and rejected config 6ad6db as incumbent because it is not better than the incumbents on 1 instances: - [INFO][abstract_intensifier.py:595] Added config 0cbe96 and rejected config 16c413 as incumbent because it is not better than the incumbents on 1 instances: - [INFO][smbo.py:320] Finished 100 trials. + [INFO][abstract_intensifier.py:595] Added config c7974e and rejected config 6ad6db as incumbent because it is not better than the incumbents on 1 instances: + [INFO][abstract_intensifier.py:595] Added config e51ac6 and rejected config c7974e as incumbent because it is not better than the incumbents on 1 instances: + [INFO][abstract_intensifier.py:595] Added config a9f9c9 and rejected config e51ac6 as incumbent because it is not better than the incumbents on 1 instances: [INFO][smbo.py:320] Finished 100 trials. - [INFO][smbo.py:320] Finished 150 trials. - [INFO][smbo.py:320] Finished 150 trials. - [INFO][smbo.py:320] Finished 150 trials. [INFO][smbo.py:328] Configuration budget is exhausted: - [INFO][smbo.py:329] --- Remaining wallclock time: -1.3503968715667725 + [INFO][smbo.py:329] --- Remaining wallclock time: -0.8839964866638184 [INFO][smbo.py:330] --- Remaining cpu time: inf - [INFO][smbo.py:331] --- Remaining trials: 175 + [INFO][smbo.py:331] --- Remaining trials: 236 + [INFO][abstract_intensifier.py:595] Added config 07ad81 and rejected config a9f9c9 as incumbent because it is not better than the incumbents on 1 instances: Default cost (Hyperband): 0.36672856700711853 - Incumbent cost (Hyperband): 0.02226245744351585 + Incumbent cost (Hyperband): 0.025601980810894487 @@ -293,7 +286,7 @@ is chosen to optimize the average accuracy on 5-fold cross validation. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (2 minutes 11.394 seconds) + **Total running time of the script:** (2 minutes 21.761 seconds) .. _sphx_glr_download_examples_2_multi_fidelity_1_mlp_epochs.py: diff --git a/development/_sources/examples/2_multi_fidelity/2_sgd_datasets.rst.txt b/development/_sources/examples/2_multi_fidelity/2_sgd_datasets.rst.txt index 5ea10ea85..bb34cb69d 100644 --- a/development/_sources/examples/2_multi_fidelity/2_sgd_datasets.rst.txt +++ b/development/_sources/examples/2_multi_fidelity/2_sgd_datasets.rst.txt @@ -69,9 +69,9 @@ the target function now is required to have an instance argument. [INFO][abstract_intensifier.py:595] Added config 2cdaac and rejected config 25625b as incumbent because it is not better than the incumbents on 45 instances: [INFO][smbo.py:320] Finished 450 trials. [INFO][smbo.py:328] Configuration budget is exhausted: - [INFO][smbo.py:329] --- Remaining wallclock time: -0.06367897987365723 + [INFO][smbo.py:329] --- Remaining wallclock time: -0.06589818000793457 [INFO][smbo.py:330] --- Remaining cpu time: inf - [INFO][smbo.py:331] --- Remaining trials: 4539 + [INFO][smbo.py:331] --- Remaining trials: 4549 Default cost: 0.15489347419148672 Incumbent cost: 0.00426383387912454 @@ -213,7 +213,7 @@ the target function now is required to have an instance argument. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 34.157 seconds) + **Total running time of the script:** (0 minutes 34.308 seconds) .. _sphx_glr_download_examples_2_multi_fidelity_2_sgd_datasets.py: diff --git a/development/_sources/examples/2_multi_fidelity/3_specify_HB_via_total_budget.rst.txt b/development/_sources/examples/2_multi_fidelity/3_specify_HB_via_total_budget.rst.txt index 9759bd793..b442f9939 100644 --- a/development/_sources/examples/2_multi_fidelity/3_specify_HB_via_total_budget.rst.txt +++ b/development/_sources/examples/2_multi_fidelity/3_specify_HB_via_total_budget.rst.txt @@ -206,7 +206,7 @@ in terms of the fidelity units and let SMAC calculate how many trials that would .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 7.667 seconds) + **Total running time of the script:** (0 minutes 8.137 seconds) .. _sphx_glr_download_examples_2_multi_fidelity_3_specify_HB_via_total_budget.py: diff --git a/development/_sources/examples/2_multi_fidelity/sg_execution_times.rst.txt b/development/_sources/examples/2_multi_fidelity/sg_execution_times.rst.txt index 8a2c9b19a..ae7fc63e4 100644 --- a/development/_sources/examples/2_multi_fidelity/sg_execution_times.rst.txt +++ b/development/_sources/examples/2_multi_fidelity/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**02:53.218** total execution time for 3 files **from examples/2_multi_fidelity**: +**03:04.206** total execution time for 3 files **from examples/2_multi_fidelity**: .. container:: @@ -33,11 +33,11 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_examples_2_multi_fidelity_1_mlp_epochs.py` (``1_mlp_epochs.py``) - - 02:11.394 + - 02:21.761 - 0.0 * - :ref:`sphx_glr_examples_2_multi_fidelity_2_sgd_datasets.py` (``2_sgd_datasets.py``) - - 00:34.157 + - 00:34.308 - 0.0 * - :ref:`sphx_glr_examples_2_multi_fidelity_3_specify_HB_via_total_budget.py` (``3_specify_HB_via_total_budget.py``) - - 00:07.667 + - 00:08.137 - 0.0 diff --git a/development/_sources/examples/3_multi_objective/1_schaffer.rst.txt b/development/_sources/examples/3_multi_objective/1_schaffer.rst.txt index aa27ccadb..be252e592 100644 --- a/development/_sources/examples/3_multi_objective/1_schaffer.rst.txt +++ b/development/_sources/examples/3_multi_objective/1_schaffer.rst.txt @@ -464,7 +464,7 @@ SMAC prioritizes the second objective over the first one. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 8.079 seconds) + **Total running time of the script:** (0 minutes 8.573 seconds) .. _sphx_glr_download_examples_3_multi_objective_1_schaffer.py: diff --git a/development/_sources/examples/3_multi_objective/2_parego.rst.txt b/development/_sources/examples/3_multi_objective/2_parego.rst.txt index 8ee7ae781..cd6615479 100644 --- a/development/_sources/examples/3_multi_objective/2_parego.rst.txt +++ b/development/_sources/examples/3_multi_objective/2_parego.rst.txt @@ -47,29 +47,27 @@ mean accuracy and run-time of each configuration. [INFO][abstract_intensifier.py:516] Added config 71813f as new incumbent because there are no incumbents yet. [INFO][abstract_intensifier.py:603] Config bb3711 is a new incumbent. Total number of incumbents: 2. [INFO][abstract_intensifier.py:603] Config f07b8c is a new incumbent. Total number of incumbents: 3. - [INFO][abstract_intensifier.py:603] Config d2ff60 is a new incumbent. Total number of incumbents: 3. - [INFO][abstract_intensifier.py:603] Config ca383c is a new incumbent. Total number of incumbents: 4. - [INFO][abstract_intensifier.py:603] Config f8a1bf is a new incumbent. Total number of incumbents: 5. - [INFO][abstract_intensifier.py:603] Config 93c51e is a new incumbent. Total number of incumbents: 6. - [INFO][abstract_intensifier.py:603] Config 3a2bf4 is a new incumbent. Total number of incumbents: 7. - [INFO][abstract_intensifier.py:595] Added config b820c4 and rejected config d2ff60 as incumbent because it is not better than the incumbents on 2 instances: - [INFO][abstract_intensifier.py:603] Config 677c52 is a new incumbent. Total number of incumbents: 8. + [INFO][abstract_intensifier.py:595] Added config 57015b and rejected config f07b8c as incumbent because it is not better than the incumbents on 2 instances: + [INFO][abstract_intensifier.py:603] Config f48c20 is a new incumbent. Total number of incumbents: 3. + [INFO][abstract_intensifier.py:603] Config 676f79 is a new incumbent. Total number of incumbents: 4. + [INFO][abstract_intensifier.py:603] Config 46b5e0 is a new incumbent. Total number of incumbents: 5. + [INFO][abstract_intensifier.py:595] Added config 812ccb and rejected config f48c20 as incumbent because it is not better than the incumbents on 2 instances: + [INFO][abstract_intensifier.py:595] Added config 73f5f8 and rejected config 46b5e0 as incumbent because it is not better than the incumbents on 2 instances: + [INFO][abstract_intensifier.py:603] Config d386ac is a new incumbent. Total number of incumbents: 6. [INFO][smbo.py:328] Configuration budget is exhausted: - [INFO][smbo.py:329] --- Remaining wallclock time: -0.09207987785339355 + [INFO][smbo.py:329] --- Remaining wallclock time: -4.663154125213623 [INFO][smbo.py:330] --- Remaining cpu time: inf - [INFO][smbo.py:331] --- Remaining trials: 154 + [INFO][smbo.py:331] --- Remaining trials: 156 Validated costs from default config: - --- [0.60155834 0.13994396] + --- [0.60155834 0.15791059] Validated costs from the Pareto front (incumbents): - --- [0.05092309 0.72383893] - --- [0.17335887 0.13610137] - --- [0.44185701 0.09644115] - --- [0.32333024 0.09886384] - --- [0.36314067 0.09656918] - --- [0.26377902 0.11410975] - --- [0.1958991 0.12330329] - --- [0.14580935 0.19128227] + --- [0.72761606 0.20648742] + --- [0.03867456 0.55267382] + --- [0.10851594 0.47061956] + --- [0.15638425 0.33945799] + --- [0.2434788 0.27383113] + --- [0.29467038 0.22061384] @@ -250,7 +248,7 @@ mean accuracy and run-time of each configuration. .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 33.699 seconds) + **Total running time of the script:** (0 minutes 39.391 seconds) .. _sphx_glr_download_examples_3_multi_objective_2_parego.py: diff --git a/development/_sources/examples/3_multi_objective/sg_execution_times.rst.txt b/development/_sources/examples/3_multi_objective/sg_execution_times.rst.txt index a6a6901f4..73fd5fe61 100644 --- a/development/_sources/examples/3_multi_objective/sg_execution_times.rst.txt +++ b/development/_sources/examples/3_multi_objective/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**00:41.779** total execution time for 2 files **from examples/3_multi_objective**: +**00:47.965** total execution time for 2 files **from examples/3_multi_objective**: .. container:: @@ -33,8 +33,8 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_examples_3_multi_objective_2_parego.py` (``2_parego.py``) - - 00:33.699 + - 00:39.391 - 0.0 * - :ref:`sphx_glr_examples_3_multi_objective_1_schaffer.py` (``1_schaffer.py``) - - 00:08.079 + - 00:08.573 - 0.0 diff --git a/development/_sources/examples/5_commandline/1_call_target_function_script.rst.txt b/development/_sources/examples/5_commandline/1_call_target_function_script.rst.txt index b44666b6e..46f98b2b2 100644 --- a/development/_sources/examples/5_commandline/1_call_target_function_script.rst.txt +++ b/development/_sources/examples/5_commandline/1_call_target_function_script.rst.txt @@ -112,7 +112,7 @@ This simple example shows how to call a script with the following content: .. rst-class:: sphx-glr-timing - **Total running time of the script:** (0 minutes 19.775 seconds) + **Total running time of the script:** (0 minutes 19.936 seconds) .. _sphx_glr_download_examples_5_commandline_1_call_target_function_script.py: diff --git a/development/_sources/examples/5_commandline/sg_execution_times.rst.txt b/development/_sources/examples/5_commandline/sg_execution_times.rst.txt index 69bfe3b7b..bcffb195a 100644 --- a/development/_sources/examples/5_commandline/sg_execution_times.rst.txt +++ b/development/_sources/examples/5_commandline/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**00:19.775** total execution time for 1 file **from examples/5_commandline**: +**00:19.936** total execution time for 1 file **from examples/5_commandline**: .. container:: @@ -33,5 +33,5 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_examples_5_commandline_1_call_target_function_script.py` (``1_call_target_function_script.py``) - - 00:19.775 + - 00:19.936 - 0.0 diff --git a/development/_sources/sg_execution_times.rst.txt b/development/_sources/sg_execution_times.rst.txt index 11103f7b1..eb8841583 100644 --- a/development/_sources/sg_execution_times.rst.txt +++ b/development/_sources/sg_execution_times.rst.txt @@ -6,7 +6,7 @@ Computation times ================= -**04:46.557** total execution time for 12 files **from all galleries**: +**05:04.712** total execution time for 12 files **from all galleries**: .. container:: @@ -33,38 +33,38 @@ Computation times - Time - Mem (MB) * - :ref:`sphx_glr_examples_2_multi_fidelity_1_mlp_epochs.py` (``../examples/2_multi_fidelity/1_mlp_epochs.py``) - - 02:11.394 + - 02:21.761 - 0.0 * - :ref:`sphx_glr_examples_1_basics_6_priors.py` (``../examples/1_basics/6_priors.py``) - - 00:39.241 - - 0.0 - * - :ref:`sphx_glr_examples_2_multi_fidelity_2_sgd_datasets.py` (``../examples/2_multi_fidelity/2_sgd_datasets.py``) - - 00:34.157 + - 00:39.668 - 0.0 * - :ref:`sphx_glr_examples_3_multi_objective_2_parego.py` (``../examples/3_multi_objective/2_parego.py``) - - 00:33.699 + - 00:39.391 + - 0.0 + * - :ref:`sphx_glr_examples_2_multi_fidelity_2_sgd_datasets.py` (``../examples/2_multi_fidelity/2_sgd_datasets.py``) + - 00:34.308 - 0.0 * - :ref:`sphx_glr_examples_5_commandline_1_call_target_function_script.py` (``../examples/5_commandline/1_call_target_function_script.py``) - - 00:19.775 + - 00:19.936 - 0.0 * - :ref:`sphx_glr_examples_3_multi_objective_1_schaffer.py` (``../examples/3_multi_objective/1_schaffer.py``) - - 00:08.079 + - 00:08.573 - 0.0 * - :ref:`sphx_glr_examples_2_multi_fidelity_3_specify_HB_via_total_budget.py` (``../examples/2_multi_fidelity/3_specify_HB_via_total_budget.py``) - - 00:07.667 + - 00:08.137 - 0.0 * - :ref:`sphx_glr_examples_1_basics_1_quadratic_function.py` (``../examples/1_basics/1_quadratic_function.py``) - - 00:04.230 + - 00:04.357 - 0.0 * - :ref:`sphx_glr_examples_1_basics_3_ask_and_tell.py` (``../examples/1_basics/3_ask_and_tell.py``) - - 00:03.813 + - 00:03.960 - 0.0 * - :ref:`sphx_glr_examples_1_basics_2_svm_cv.py` (``../examples/1_basics/2_svm_cv.py``) - - 00:02.871 + - 00:02.925 - 0.0 * - :ref:`sphx_glr_examples_1_basics_5_continue.py` (``../examples/1_basics/5_continue.py``) - - 00:01.473 + - 00:01.536 - 0.0 * - :ref:`sphx_glr_examples_1_basics_4_callback.py` (``../examples/1_basics/4_callback.py``) - - 00:00.157 + - 00:00.158 - 0.0 diff --git a/development/api/smac.acquisition.maximizer.html b/development/api/smac.acquisition.maximizer.html index d555a0079..1b69bbe5f 100644 --- a/development/api/smac.acquisition.maximizer.html +++ b/development/api/smac.acquisition.maximizer.html @@ -1240,6 +1240,7 @@

InterfacesAbstractAcquisitionMaximizer

Implement SMAC’s default acquisition function optimization.

This optimizer performs local search from the previous best points according to the acquisition +This optimizer performs local search from the previous best points according to the acquisition function, uses the acquisition function to sort randomly sampled configurations. Random configurations are interleaved by the main SMAC code.

The Random configurations are interleaved to circumvent issues from a constant prediction @@ -1251,6 +1252,9 @@

InterfacesAbstractAcquisitionFunction | None, defaults to None)

  • challengers (int, defaults to 5000) – Number of challengers.

  • max_steps (int | None, defaults to None) – [LocalSearch] Maximum number of steps that the local search will perform.

  • @@ -1258,6 +1262,8 @@

    Interfaces`uniform_configspace`to be defined).

    +
  • prior_sampling_fraction – The ratio of random samples that are taken from the user-defined ConfigurationSpace, as opposed to the uniform +version (needs `uniform_configspace`to be defined).

  • seed (int, defaults to 0)

  • diff --git a/development/api/smac.acquisition.maximizer.local_and_random_search.html b/development/api/smac.acquisition.maximizer.local_and_random_search.html index 68a87f41f..96f911728 100644 --- a/development/api/smac.acquisition.maximizer.local_and_random_search.html +++ b/development/api/smac.acquisition.maximizer.local_and_random_search.html @@ -1101,6 +1101,7 @@

    InterfacesAbstractAcquisitionMaximizer

    Implement SMAC’s default acquisition function optimization.

    This optimizer performs local search from the previous best points according to the acquisition +This optimizer performs local search from the previous best points according to the acquisition function, uses the acquisition function to sort randomly sampled configurations. Random configurations are interleaved by the main SMAC code.

    The Random configurations are interleaved to circumvent issues from a constant prediction @@ -1112,6 +1113,9 @@

    InterfacesAbstractAcquisitionFunction | None, defaults to None)

  • challengers (int, defaults to 5000) – Number of challengers.

  • max_steps (int | None, defaults to None) – [LocalSearch] Maximum number of steps that the local search will perform.

  • @@ -1119,6 +1123,8 @@

    Interfaces`uniform_configspace`to be defined).

    +
  • prior_sampling_fraction – The ratio of random samples that are taken from the user-defined ConfigurationSpace, as opposed to the uniform +version (needs `uniform_configspace`to be defined).

  • seed (int, defaults to 0)

  • diff --git a/development/examples/1_basics/1_quadratic_function.html b/development/examples/1_basics/1_quadratic_function.html index fc76a4da3..25f0438f6 100644 --- a/development/examples/1_basics/1_quadratic_function.html +++ b/development/examples/1_basics/1_quadratic_function.html @@ -1158,7 +1158,7 @@ plot(smac.runhistory, incumbent)

    -

    Total running time of the script: (0 minutes 4.230 seconds)

    +

    Total running time of the script: (0 minutes 4.357 seconds)

    -

    Total running time of the script: (0 minutes 2.871 seconds)

    +

    Total running time of the script: (0 minutes 2.925 seconds)

    -

    Total running time of the script: (0 minutes 3.813 seconds)

    +

    Total running time of the script: (0 minutes 3.960 seconds)

    -

    Total running time of the script: (0 minutes 0.157 seconds)

    +

    Total running time of the script: (0 minutes 0.158 seconds)

    -

    Total running time of the script: (0 minutes 1.473 seconds)

    +

    Total running time of the script: (0 minutes 1.536 seconds)

    -

    Total running time of the script: (0 minutes 39.241 seconds)

    +

    Total running time of the script: (0 minutes 39.668 seconds)