bayesian-optimization / BayesianOptimization

A Python implementation of global optimization with gaussian processes.
https://bayesian-optimization.github.io/BayesianOptimization/index.html
MIT License
7.95k stars 1.55k forks source link

Save optimizer state and load again in the Suggest-Evaluate-Register Paradigm #433

Closed dmehrab06 closed 1 year ago

dmehrab06 commented 1 year ago

Hello, is there a way I can save the optimizer state and load it again while using the suggest-evaluate-register paradigm? Basically, my black box function is a large agent-based model that is executed from a separate script and takes around 3 hours to execute. Therefore, basically, this is the workflow I am looking for.

First,

  1. Get a suggestion point from my optimizer and save it.
  2. Run the model offline and get the target value.

Second,

  1. Load previously saved optimizer
  2. get the target value for the previous suggestion point
  3. get the next suggestion and save the optimizer
  4. Run the model offline with the suggested point and start from step 3 for the next runs.
dmehrab06 commented 1 year ago

Solved from the answer to #143