Repository navigation
Update Egor wrapper to egobox 0.38 - #498
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #498 +/- ##
=======================================
Coverage 54.22% 54.22%
=======================================
Files 1 1
Lines 225 225
=======================================
Hits 122 122
Misses 103 103 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
|
@marcomangano, @ewu63, |
| testing = [ | ||
| "testflo>=1.4.5", | ||
| "parameterized", | ||
| "egobox>=0.37.6,<0.38.0", |
There was a problem hiding this comment.
Do we anticipate breaking changes such that we need a very tight pin here @relf ? Since this is only testing deps I am OK with it, but in general I'd prefer catching upstream changes early in these tests rather than have our users find out when they run optimizations, so my preference would be to not pin.
There was a problem hiding this comment.
No, the API should be stable, I intend to release 1.0, removing 0.38 deprecations, so if it is ok for you I can relax the upper bound to <2 even in the project.toml
There was a problem hiding this comment.
Finally, after a good night’s sleep, I don’t see the point of having an upper bound anymore. What do you think?
Purpose
Update the Egor wrapper to egobox 0.38, which deprecates several Python API names. The wrapper now uses only non-deprecated APIs and passes pyOptSparse constraint bounds natively to Egor.
Egor has not been in a pyOptSparse release yet, so options are renamed without backward-compatibility aliases.
Changes
egobox>=0.38.0,<0.39.0(pyproject.toml,.github/environment.yml).c(x) <= 0form. Each pyOptSparse constraint row is mapped from its bounds to an EgorCstrSpec(eq,leq,geqorbetween) and Egor gets the raw constraint values.n_start→infill_n_startdoe→x_doe/y_doecstr_tol→cstr_tols, with one tolerance per pyOptSparse constraint row (no longer per one-sided constraint)feasible_infill_strategy(EFI for hidden constraints, not available withLOG_EI)stop_on_error7, objective function error.Egor_options.yamlupdated for the new options and for the 0.38 dict keys (trego.n_global_local_steps,gp_config.theta_n_start,qei_config.optim_every, ...).Expected time until merged
This is a follow-up of #485, so hopefully, next week.
Type of change
Testing
test_egor,test_hs015,test_hs071,test_sphere) updated to the new names.x_doeand withx_doe+y_doefeasible_infill_strategycstr_tolslength mismatchpytest -k "Egor or egor" -W error::DeprecationWarningpasses (13 tests) with egobox 0.38.0.Checklist
ruff checkandruff formatto make sure the Python code adheres to PEP-8 and is consistently formattedfprettifyor C/C++ code withclang-formatas applicable