Skip to content

Commit 472fd93

Browse files
committed
explicitly stating the optionality of the saving and loading in custom acq functions
1 parent 413f467 commit 472fd93

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

examples/acquisition_functions.ipynb

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -362,6 +362,8 @@
362362
"source": [
363363
"### Saving and loading with custom acquisition functions\n",
364364
"\n",
365+
"If saving and loading is desired functionality, the acquisition function needs to have a `get_acquisition_params` and `set_acquisition_params` method.\n",
366+
"\n",
365367
"Default acquisition functions have a `get_acquisition_params` and `set_acquisition_params` method that is used to save and load the acquisition function state when the optimizer is being saved and loaded. When writing and using a custom acquisition function, those methods need to also be defined. In order to have perfect replicability, all parameters that the acquisition function depends on need to be saved and loaded. The get_acquisition_params method should return a dictionary containing all acquisition function parameters. The set_acquisition_params method should take that same dictionary containing the acquisition function parameters and update the respective parameters.\n",
366368
"\n",
367369
"_serialize_random_state and _deserialize_random_state are provided as part of the base class and should be included in the dictionary returned by `get_acquisition_params`. See any of the default acquisition functions for reference."

0 commit comments

Comments
 (0)