Skip to content

Migrate ExitCriteria parameters to Ensemble.run() - #1747

Open
jlnav wants to merge 12 commits into
refactor/deprecate_some_allocsfrom
refactor/run_substeps_with_deprecate_exitcriteria
Open

jlnav wants to merge 12 commits into
refactor/deprecate_some_allocsfrom
refactor/run_substeps_with_deprecate_exitcriteria

Conversation

@jlnav

@jlnav jlnav commented Jun 5, 2026

Copy link
Copy Markdown
Member

ensemble.run() has already been an empty function. Passing in subsets, steps, num sims, num gens, etc. into .run() is (I think) sensible since this resembles Xopt's .step(n_points). It makes the parameters of exit criteria a description of the run instead of a description of the entire ensemble.

So ensemble.run(sim_max=2000, wallclock_max=300) is possible. Deprecates ExitCriteria. So now we save an import, a class instantiation, and a parameter for Ensemble.

Also technically addresses #1127

@jlnav
jlnav marked this pull request as ready for review June 11, 2026 18:19
@jlnav
jlnav marked this pull request as draft July 8, 2026 17:57
@jlnav
jlnav marked this pull request as ready for review July 14, 2026 16:41
@codecov

codecov Bot commented Jul 14, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 85.10638% with 7 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.96%. Comparing base (cf18309) to head (ba594b0).

Files with missing lines Patch % Lines
libensemble/gen_funcs/aposmm_localopt_support.py 44.44% 4 Missing and 1 partial ⚠️
libensemble/ensemble.py 96.66% 0 Missing and 1 partial ⚠️
...semble/gen_funcs/persistent_botorch_mfkg_branin.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##           refactor/deprecate_some_allocs    #1747      +/-   ##
==================================================================
+ Coverage                           75.91%   75.96%   +0.05%     
==================================================================
  Files                                  86       86              
  Lines                                9145     9186      +41     
  Branches                             1405     1416      +11     
==================================================================
+ Hits                                 6942     6978      +36     
- Misses                               1902     1905       +3     
- Partials                              301      303       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@jlnav
jlnav added this pull request to stack #1779 September 14, 2026 20:49
@jlnav
jlnav force-pushed the refactor/run_substeps_with_deprecate_exitcriteria branch from 999a3b9 to e9b72e3 Compare September 15, 2026 15:30
…sim_max=30). merge ExitCriteria and .run parameters if both exist. Display associated deprecation warnings
…lways send data packet using persis_in even if its not set
@jlnav
jlnav force-pushed the refactor/run_substeps_with_deprecate_exitcriteria branch from e9b72e3 to 695226c Compare September 15, 2026 15:37
…rocess bugfixes in aposmm_localopt_support resulting from opus chasing down this bug
The project() function was calling project_to_target_fidelity without
the required 'd' parameter (total input dimension), which is now a
required positional argument in botorch 0.17.2.
GITHUB_ENV is only set in GitHub Actions, not in local pixi environments.
Default to /dev/null when GITHUB_ENV is not set.
…_cube

When using APOSMM with variables_mapping that includes x_on_cube, the
GenSpecs model's outputs field was being set from VOCS-derived variables
instead of from the APOSMM generator's gen_specs['out']. This caused
H['x_on_cube'] to be unavailable in the History array, leading to
ValueError: no field of name x_on_cube.

The fix moves the generator gen_specs['out'] check into set_fields_from_vocs
so it runs before the VOCS fallback.
Previously, when using APOSMA with variables_mapping, the GenSpecs outputs
field was set from VOCS only, missing fields like x_on_cube, local_min, etc.
that are produced by the APOSMA generator. This caused tests to fail when
accessing H['x_on_cube'].

The fix merges the generator's gen_specs['out'] fields into the outputs
alongside the VOCS-derived fields, so the History array has all needed fields.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant