Add Xopt and Optimas generator tests - #1620
Conversation
|
On first run I get: Looks like this is due to going via standard runner, while libE gest-api generators go via subclasses. Fix: This was due to generator being converted to dictionary in libE (given that xopt gen is a pydantic model). I now restore the original in that case. |
* Split tests libEnsemble and external generators * Have an vocs generator that uses arrays * Array generator disabled as requires gest-api update.
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## experimental/jlnav_plus_shuds_asktell #1620 +/- ##
==========================================================================
- Coverage 78.73% 47.95% -30.78%
==========================================================================
Files 79 80 +1
Lines 7993 8079 +86
Branches 1196 1222 +26
==========================================================================
- Hits 6293 3874 -2419
- Misses 1481 3985 +2504
- Partials 219 220 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
|
|
||
| # Get input fields (variables + constants) and output fields (objectives + observables + constraints) | ||
| input_fields = get_vocs_fields(vocs, ["variables", "constants"]) | ||
| output_fields = get_vocs_fields(vocs, ["objectives", "observables", "constraints"]) |
There was a problem hiding this comment.
VOCS has a VOCS.output_names property that may be usable here. Perhaps VOCS could use an .input_names property too.
* Install CPU-only pytorch * Xopt install with no updating of deps * Install Optimas from github main * Temporarily only run target tests.
7288d08
into
experimental/jlnav_plus_shuds_asktell
Add tests for these Xopt generators
Generator: Baysian (Expected Improvement)
Gen: https://github.com/xopt-org/Xopt/blob/generator_standard/xopt/generators/bayesian/expected_improvement.py
Xopt tests: https://github.com/xopt-org/Xopt/blob/generator_standard/xopt/tests/generators/bayesian/test_expected_improvement.py
Generator: Sequential (neldermead)
Gen: https://github.com/xopt-org/Xopt/blob/generator_standard/xopt/generators/sequential/neldermead.py
Xopt tests: https://github.com/xopt-org/Xopt/blob/generator_standard/xopt/tests/generators/sequential/test_neldermead.py
To check
self.future_state is NoneerrorDeferred to #1634
- [ ] Currently fixing nworkers to batch_size. Change to run using test harness command line settings.- [ ] Re-enable running of full tests (REG_TEST_LIST = "test_*.py") - currently only runs new tests.Optimas generators
Deferred to #1634
- [ ] Ax Generators (single/multi-fidelity / multitask). - Unexpected vars from suggest (not in H array).Set GenSpecs / SimSpecs by vocs
This highlights need for
GenSpecs/SimSpecsto be settable byvocsto prevent repetition. This should also usedtypesif they are set.e.g.
For vocs settings:
- [ ] For libE gens with user specs it should set lb/ub from vocs also(defer Make set_fields_from_vocs set bounds when required. #1621)Note that if
generator.vocsstorage of vocs was in the standard, we could take from the gen, and not even need to supply vocs here (better SSoT).