Skip to content

Commit 413f467

Browse files
committed
increase legibility of custom acquisition example
1 parent 2f8ab64 commit 413f467

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

examples/acquisition_functions.ipynb

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -362,11 +362,9 @@
362362
"source": [
363363
"### Saving and loading with custom acquisition functions\n",
364364
"\n",
365-
"If you are using your own custom acquisition function, you will need to save and load the acquisition function state as well. Acquisition functions have a `get_acquisition_params` and `set_acquisition_params` method that can be used to save and load the acquisition function state. The get_acquisition_params method returns a dictionary containing the acquisition function parameters. The set_acquisition_params method takes a dictionary containing the acquisition function parameters and updates the acquisition function state.\n",
365+
"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",
366366
"\n",
367-
"```python\n",
368-
"acquisition_function.get_acquisition_params()\n",
369-
"```"
367+
"_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."
370368
]
371369
},
372370
{

0 commit comments

Comments
 (0)