Add Egor optimizer wrapper#485
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #485 +/- ##
=======================================
Coverage 82.99% 82.99%
=======================================
Files 1 1
Lines 147 147
=======================================
Hits 122 122
Misses 25 25 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
ewu63
left a comment
There was a problem hiding this comment.
First things first, let's add egobox to the testing deps of pyproject.toml, so that the test you added may run instead of being skipped for optimizer not available.
| from pyoptsparse.testing import OptTest | ||
|
|
||
| ALL_OPTIMIZERS = sorted({e.name for e in Optimizers} - {"ParOpt", "NSGA2"}) | ||
| ALL_OPTIMIZERS = sorted({e.name for e in Optimizers} - {"ParOpt", "NSGA2", "Egor"}) |
There was a problem hiding this comment.
Any reason not to test this case?
There was a problem hiding this comment.
Good catch! Initially I discarded this test as it used hot start and was failing on a nb of function calls. Finally I read the "hot start" feature documentation, I just had to seed Egor and also use TREGO to meet test tolerances.
Purpose
This PR integrates the surrogate-based optimizer
Egorfrom the EGObox library.Egor uses bayesian optimization techniques well-suited to find the global optimum of an expansive-to-evaluate black-box function.
Basically, it uses a surrogate model to approximate the objective function and an infill criterion (aka acquisition function) to guide the search for the optimum.
Resolves relf/EGObox#439
Expected time until merged
a few weeks
Type of change
Testing
Egor tests have been added to the pyOptSparse test suite.
Checklist
ruff checkandruff formatto make sure the Python code adheres to PEP-8 and is consistently formattedfprettifyor C/C++ code withclang-formatas applicable