Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
566 commits
Select commit Hold shift + click to select a range
507bc0a
just use UniformSample class
jlnav Nov 4, 2024
18a52c9
remove ask/tell surmise and ask/tell surmise test - they were proof-o…
jlnav Nov 4, 2024
231e6f0
fix import
jlnav Nov 4, 2024
eaebbff
remove the other ask/tell surmise test
jlnav Nov 4, 2024
043feeb
renable persistent_aposmm unit test
jlnav Nov 5, 2024
c66f10b
gpCAM class uses returned x
shuds13 Nov 5, 2024
3d7981b
Convert numpy scalar types
shuds13 Nov 5, 2024
c380595
preparing to add variables_mapping to LibensembleGenerator parent cla…
jlnav Nov 6, 2024
fdcfd66
Merge pull request #1453 from Libensemble/experimental/optimas_waket_…
jlnav Nov 7, 2024
1e0abd3
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/var…
jlnav Nov 7, 2024
c7ea54b
intermediate work on passing mapping into np_to_list_dicts. need to p…
jlnav Nov 7, 2024
c111afd
Call setup on first ask
shuds13 Nov 8, 2024
0ee448c
use mapping to construct list_dicts_to_np dtype when provided
jlnav Nov 8, 2024
bb37f4b
additional work on replacing dict keys with xs and fs
jlnav Nov 8, 2024
38b3967
some cleanup of generators.py in anticipation of the changes to the d…
jlnav Nov 8, 2024
4b49233
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/var…
jlnav Nov 11, 2024
1d213ef
dont try to determine dtype for fields that aren't actually in the in…
jlnav Nov 11, 2024
f8c5eaf
finalize mapping support within list_dicts_to_np, now need to refacto…
jlnav Nov 11, 2024
dff6bad
refactoring
jlnav Nov 11, 2024
c1ec7f6
tiny fixes; need to figure out why aposmm_nlopt reg test is hanging
jlnav Nov 11, 2024
a5133b9
runners.py no longer calls setup() on gen
jlnav Nov 11, 2024
682daa8
rename a handful of asktell tests to have a test_asktell prefix
jlnav Nov 12, 2024
09ebdbc
remove redundant .setup calls that also cause hangs
jlnav Nov 12, 2024
9f200f0
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/var…
jlnav Nov 12, 2024
cf5ac63
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Nov 13, 2024
f2ef248
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/var…
jlnav Nov 13, 2024
2c6a9c4
lock nlopt to 2.8.0?
jlnav Nov 13, 2024
7224de3
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Nov 14, 2024
99a7a2c
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/var…
jlnav Nov 14, 2024
e8b7052
Feature/spawn with interfacer (#1464)
shuds13 Nov 14, 2024
23e5164
use macOS-supported condition to check if gen_f has enqueued any outb…
jlnav Nov 14, 2024
06c14d7
Merge pull request #1467 from Libensemble/asktell/macos_queue_fixes
jlnav Nov 14, 2024
bc1587e
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/var…
jlnav Nov 14, 2024
5c2308d
avoid redundant install of nlopt?
jlnav Nov 14, 2024
0d146fc
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Nov 20, 2024
ef906d5
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/var…
jlnav Nov 20, 2024
9d07e6c
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Nov 20, 2024
902b7f0
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/var…
jlnav Nov 20, 2024
64b6401
swap sim_id with _id when data goes out from gen. swap _id with sim_i…
jlnav Dec 3, 2024
ab09b9f
Merge pull request #1480 from Libensemble/asktell/under_id
jlnav Dec 3, 2024
d66dafb
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/var…
jlnav Dec 4, 2024
f4a9691
Merge pull request #1448 from Libensemble/asktell/variables_objectives
jlnav Dec 4, 2024
6fb608e
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/try…
jlnav Dec 4, 2024
f926bfa
Merge pull request #1451 from Libensemble/asktell/try_removing_wrapper
jlnav Dec 4, 2024
25bca85
rename LibensembleGenThreadInterfacer to PersistentGenInterfacer
jlnav Dec 4, 2024
2973b41
remove ask_updates from abc
jlnav Dec 4, 2024
5a7160f
always build "lb" and "ub" from variables
jlnav Dec 4, 2024
b5d66e0
refactoring of list_dicts_to_np, more comments, docstrings, etc.
jlnav Dec 4, 2024
bf4577d
refactor np_to_list_dicts
jlnav Dec 4, 2024
c24730b
only call ask_updates on gen if its implemented
jlnav Dec 4, 2024
8695692
rename self.thread to self.running_gen_f, some TODO and clarification…
jlnav Dec 5, 2024
fcb434e
lets go with the first approach for updating libE_info's comm
jlnav Dec 6, 2024
581c9a5
fix
jlnav Dec 6, 2024
877ecef
Merge pull request #1481 from Libensemble/asktell/various_fixes
jlnav Dec 10, 2024
54d7b3f
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Dec 17, 2024
1cd8b45
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Feb 27, 2025
05fca90
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Mar 13, 2025
7a96995
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Mar 20, 2025
c86c571
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Mar 21, 2025
8379e0f
first find-and-replace for ask/tell/final_tell to suggest/ingest/fina…
jlnav Mar 21, 2025
0ad9dcf
missed one
jlnav Mar 21, 2025
e2263a3
oMerge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Mar 21, 2025
57e8c4b
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Apr 11, 2025
a952fc1
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Apr 30, 2025
6ec7528
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav May 28, 2025
3ac630a
initial commit, adding upstream current VOCS implementation as depend…
jlnav May 28, 2025
08ad9df
initial commit for replacing variables/objectives with VOCS
jlnav May 30, 2025
aca1d50
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Jul 2, 2025
6ac1faa
Merge branch 'asktell/init_vocs' into asktell/VOCS
jlnav Jul 2, 2025
56c644e
make generator_standard a required dependency
jlnav Jul 2, 2025
fec7aa4
cleanup
jlnav Jul 2, 2025
0db9f0b
some more cleanup, carrying on with making UniformSampler VOCS compat…
jlnav Jul 2, 2025
49fda1e
adjust test_asktell to use VOCS for testing UniformSample
jlnav Jul 2, 2025
1d6f83b
cleanup sampling.py
jlnav Jul 2, 2025
81267a5
first attempt to try simply having new Standard_GP_CAM be a thin wrap…
jlnav Jul 2, 2025
b633f94
fix gen standard repo install
jlnav Jul 2, 2025
a3e8346
work to convert previous variables/objectives for LibensembleGenerato…
jlnav Jul 3, 2025
4da4298
further work using vocs for self.n, self.lb, self.ub
jlnav Jul 3, 2025
c0e452c
make GPCAM_Standard test a separate file
jlnav Jul 9, 2025
f9385c2
adjustments for variables_mapping needing to be an attribute of the g…
jlnav Jul 9, 2025
02b349c
trying to figure out why our autogenerated variables_mapping isn't wo…
jlnav Jul 9, 2025
f162e75
chasing down a bug involving a single-dim f-shape being not (1,), lik…
jlnav Jul 9, 2025
c041a6b
update asktell aposmm unit test
jlnav Jul 10, 2025
23ed512
various fixes involving the dict/array converters, when aposmm has be…
jlnav Jul 10, 2025
34f582e
fix ask/tell sampling test, also don't assume a given gen has a mappi…
jlnav Jul 10, 2025
390597f
include standard-finalize-usage in StandardGenRunner. Then for gens l…
jlnav Jul 11, 2025
f80aa9f
Merge branch 'develop' into asktell/VOCS
jlnav Jul 16, 2025
80c09d7
dunno how this validator change made it through
jlnav Jul 16, 2025
7ca34b1
fix isinstance check for gen_f when gen_specs["generator"] is provide…
jlnav Jul 16, 2025
f6341a4
this spec-checker was lost to time somehow
jlnav Jul 17, 2025
fef5833
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Jul 17, 2025
673c3eb
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/VOCS
jlnav Jul 22, 2025
65ca79b
revert sampling.py and the associated functionality test to their pre…
jlnav Jul 23, 2025
1ed05e5
various experiments with updating samplers and the test to accept onl…
jlnav Jul 24, 2025
9b1195b
add parameter for UniformSample, instructing the generator to squash …
jlnav Jul 25, 2025
24df60f
making variables_mapping an explicit kwarg for a libensemble generator
jlnav Jul 31, 2025
715773b
bump pydantic - this should've been done in a previous PR
jlnav Jul 31, 2025
08ead4a
fix UniformSample LibensembleGenerator to use variables_mapping
jlnav Jul 31, 2025
22b69b4
just commenting out, but maybe we don't need this unit test now that …
jlnav Jul 31, 2025
f664e37
removing unnecessary GPCAM_Standard class; refactoring the other gpca…
jlnav Aug 6, 2025
99bc450
update regression test to (presumably) use classes that now use VOCS
jlnav Aug 6, 2025
423f0d6
... why was this test excluded?
jlnav Aug 6, 2025
56e59aa
lists instead of tuples...
jlnav Aug 6, 2025
145e09d
fix default value of test_points_file kwarg to be None
jlnav Aug 7, 2025
9a6f299
somehow this tell_numpy got missed
jlnav Aug 7, 2025
9c0e258
various fixes to building variables_mapping and extra.ci, still debug…
jlnav Aug 7, 2025
4a52e0b
temporary debugging print?
jlnav Aug 7, 2025
73bbf69
fix objective name
jlnav Aug 8, 2025
bf0d79e
batch_size fix to runners.py, add batch_size to gen_specs so the runn…
jlnav Aug 8, 2025
b3ce513
we still want to map {"f": ["energy"]), obviously
jlnav Aug 8, 2025
2428152
move StandardSample to test_asktell_sampling.py, to test as-though we…
jlnav Aug 8, 2025
0bcd7c9
various fixes from PR suggestions
jlnav Aug 13, 2025
bf9ed05
move gpcam superclass init to top of init, make UniformSample accept …
jlnav Aug 14, 2025
acc4811
gpcam asserts objectives, then a better description of variables_mapping
jlnav Aug 14, 2025
2a67724
move _validate_vocs call to superclass
jlnav Aug 15, 2025
8c9e313
Merge pull request #1572 from Libensemble/asktell/VOCS
jlnav Aug 18, 2025
6b54991
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Aug 19, 2025
a4ead36
Split finalize and export
shuds13 Aug 21, 2025
3622219
aposmm uses x mapping to set bounds and size
shuds13 Aug 21, 2025
c8d6a82
starting to populate the APOSMM class with common kwargs, for better …
jlnav Aug 21, 2025
1dce059
small fixes
jlnav Aug 22, 2025
77845a0
docstring for APOSMM class
jlnav Aug 22, 2025
9b3429b
Fix finalize and export functions
shuds13 Aug 22, 2025
a2c58fc
Option to export with user fields
shuds13 Aug 22, 2025
2635236
evaluate an APOSMM with only VOCS passed in
jlnav Aug 22, 2025
012227a
Add unit tests of unmap_numpy_array
shuds13 Aug 25, 2025
03420b3
Remove unneeded branch
shuds13 Aug 25, 2025
682425a
Add expected variables mapping for APOSMM
shuds13 Aug 25, 2025
b209901
Better example bounds
shuds13 Aug 25, 2025
fd630eb
Allow pass through of unmapped arrays
shuds13 Aug 25, 2025
57a8de9
Allow export as list of dictionaries
shuds13 Aug 25, 2025
050c22d
Add pass-through array to unmap test
shuds13 Aug 25, 2025
5d31b63
Add export unit tests and fix up unmap
shuds13 Aug 25, 2025
d1d4b76
Re-enable APOSMM unit tests
shuds13 Aug 25, 2025
b05762a
Add checks for x and x_on_cube
shuds13 Aug 25, 2025
0b8cdec
Add export tests and fixup
shuds13 Aug 25, 2025
4e73c93
replace completely-typed out gen_specs['user'] update from parameters…
jlnav Aug 26, 2025
4357173
coverage adjusts
jlnav Aug 27, 2025
1e52d99
Do not send local_min/pt to ingest
shuds13 Aug 27, 2025
3c21202
Autofill x and f variables_mapping separately
shuds13 Aug 28, 2025
1cb542f
Update asktell APOSMM regression test
shuds13 Aug 29, 2025
9798b3e
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Sep 5, 2025
585c521
Add fvec when components is present
shuds13 Sep 22, 2025
cf36e85
Send APOSMM errors as a string
shuds13 Sep 22, 2025
77efa2a
Formatting
shuds13 Oct 1, 2025
ed6604d
Blacken
shuds13 Oct 1, 2025
9cbca1e
Clarify comment
shuds13 Oct 1, 2025
ec773d4
Update generator_standard to gest_api
shuds13 Oct 1, 2025
5ea9b2b
Fix gest-api in pyproject
shuds13 Oct 1, 2025
b14b85d
Fix gest project name
shuds13 Oct 1, 2025
f8d1833
Fix _validate_vocs for gpCAM
shuds13 Oct 1, 2025
ad54abd
Remove misleading n
shuds13 Oct 2, 2025
a383dc0
Merge pull request #1582 from Libensemble/feature/update_finalize
shuds13 Oct 2, 2025
1353363
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/apo…
jlnav Oct 23, 2025
bb26e05
Merge branch 'develop' into asktell/aposmm_fixes
jlnav Oct 23, 2025
948c88b
this specific gen_specs['out'] assignment no longer needed, as confli…
jlnav Oct 23, 2025
047673d
adjust for finalize and export; plus now variables_mapping is required
jlnav Oct 23, 2025
b681398
don't need persis_info declared like this
jlnav Oct 23, 2025
b828cb4
fixes and refactors as suggested by shuds - *works on multistage lpa*
jlnav Oct 24, 2025
c040721
make initial_sample_size and max_active_runs required arguments for a…
jlnav Oct 29, 2025
cd776a1
Merge pull request #1583 from Libensemble/asktell/aposmm_fixes
jlnav Oct 29, 2025
7b22ab1
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Oct 29, 2025
4e37554
typo
jlnav Oct 29, 2025
41a4cbc
fix generator-standard package name in pyproject.toml
jlnav Oct 31, 2025
3e41b4b
also start running thread upon initial ingest
jlnav Nov 6, 2025
2303512
better docstrings. new "do_not_produce_sample_points" arg from shuds.…
jlnav Nov 7, 2025
802de9c
add kwarg where necessary, plus more test glue
jlnav Nov 7, 2025
fa254a0
unpack "x"s passed in into dtype-less array. so _on_cube conversion c…
jlnav Nov 7, 2025
1606ef3
TODOs, plus more
jlnav Nov 7, 2025
473487d
mostly just trying the current aposmm.py with Xopt in this commit...
jlnav Nov 11, 2025
b42e1ba
fix initial sample (within aposmm *class*) requiring sim_ids. we'll j…
jlnav Nov 12, 2025
a354339
aposmm gen_f : new loop undserneath do_not_produce_sample_points cond…
jlnav Nov 12, 2025
5dc5155
add unit test where APOSMM class ingests first
jlnav Nov 13, 2025
ed03ac1
make an internal method internal. implement _validate_vocs for aposmm…
jlnav Nov 14, 2025
b7a79c3
trying to account for, then test a large variety of conditions where …
jlnav Nov 14, 2025
1d335c8
adjusts send-conditions upon full sample being ingested. adjusts warn…
jlnav Nov 19, 2025
b23d13c
additional docs
jlnav Nov 19, 2025
c07611d
Add Xopt EI test
shuds13 Nov 19, 2025
f39b937
Restructure imports
shuds13 Nov 19, 2025
fb9b01d
Set batch size and fix nworkers
shuds13 Nov 19, 2025
e88088f
Make temp note on fixing nworkers
shuds13 Nov 19, 2025
57b466e
Restructure gen_specs
shuds13 Nov 19, 2025
da20d5a
Change sim to xopt test sim
shuds13 Nov 19, 2025
e5ff70d
Add vocs field to GenSpecs
shuds13 Nov 19, 2025
d060f2e
Add vocs field to SimSpecs
shuds13 Nov 19, 2025
d5e3c53
Get vocs field type
shuds13 Nov 19, 2025
42f772a
tentative refactor of do_not_produce_sample_points keyword to be the …
jlnav Nov 19, 2025
bc3a976
Add unit tests for set_fields_from_vocs
shuds13 Nov 19, 2025
12c0fe3
Test array type
shuds13 Nov 19, 2025
95bc6a0
doing "generate_sample_points". ensuring sim_id gets cast as int (for…
jlnav Nov 19, 2025
f399750
add onto n_s with the len of received presumptive_user_sample
jlnav Nov 20, 2025
cf9b1c1
Prevent gen from converting to dictionary
shuds13 Nov 20, 2025
fbf1288
Cleanup test_xopt_EI.py
shuds13 Nov 20, 2025
4ca2153
fix conditions for something_sent after initial_sample is ingested. a…
jlnav Nov 20, 2025
d28681d
Provide pre-evaluated initial sample
shuds13 Nov 20, 2025
635439d
internally, generate_sample_points is now set based on whether sugges…
jlnav Nov 20, 2025
c91a824
Remove automapping
shuds13 Nov 20, 2025
854a336
various fixes; sim_id warning no longer needed in gen_f. raise RunTim…
jlnav Nov 20, 2025
4dbfc42
always map _id to sim_id. add simple executor + UniformSample test. c…
jlnav Nov 21, 2025
f4f6b96
put the executor.comm adjustment back - and add a asktell aposmm + ex…
jlnav Nov 21, 2025
2c28939
other MPI processes attempting to finalize their gen is problematic
jlnav Nov 21, 2025
00bbebe
Add array dtype support
shuds13 Nov 21, 2025
379868d
Update vocs sampling tests
shuds13 Nov 21, 2025
1c1e996
Remove redundant line
shuds13 Nov 21, 2025
f6b2ce2
Remove another redundant line
shuds13 Nov 21, 2025
4ed9efd
Formatting
shuds13 Nov 21, 2025
a02e8d4
Add gest_api simulator wrapper
shuds13 Nov 22, 2025
104424e
Add version of xopt test that uses xopt simulator
shuds13 Nov 22, 2025
52d32a6
Fix naming
shuds13 Nov 22, 2025
561ba54
Fix test for array fields
shuds13 Nov 25, 2025
7f4a4ee
Disable awkward array test
shuds13 Nov 25, 2025
3de1de5
Give output assert to xopt tests
shuds13 Nov 25, 2025
3b21fe0
Fix formatting
shuds13 Nov 25, 2025
a11e04d
Merge pull request #1622 from Libensemble/examples/xopt_generators_re…
shuds13 Nov 25, 2025
5800c93
Add Optimas grid sample test
shuds13 Nov 25, 2025
253efea
Infer type of discrete vars
shuds13 Nov 26, 2025
4fda921
tweaks based on PR feedback
jlnav Dec 1, 2025
abdf4a6
Re-enamble model tests
shuds13 Dec 2, 2025
6ac2880
Add xopt sequential test
shuds13 Dec 2, 2025
6d649a3
Do not ingest None
shuds13 Dec 3, 2025
56db443
Simplify xopt nelder mead test and assert
shuds13 Dec 3, 2025
4a47d2f
Correct procs count for when use parse_args
shuds13 Dec 3, 2025
aabcf15
Add xopt and optimas to extra CI
shuds13 Dec 3, 2025
d345dce
Formatting
shuds13 Dec 3, 2025
fcb1af2
Fix install
shuds13 Dec 3, 2025
31f0778
Test xopt/optimas gens on basic tests
shuds13 Dec 3, 2025
548f580
doc/docstring additional tweaks and clarifications
jlnav Dec 3, 2025
aaac936
bump polling_loop interval for (perhaps) slower containers/VMs/system…
jlnav Dec 3, 2025
e9fa694
set the sim_ids of the ingest_buf right when we're about to send it t…
jlnav Dec 3, 2025
0b41dab
Fixing CI for xopt/optimas generator tests (#1626)
shuds13 Dec 4, 2025
9903266
Clean up
shuds13 Dec 4, 2025
1634579
Add xopt notebook
shuds13 Dec 4, 2025
7a76385
Add xopt example to docs
shuds13 Dec 4, 2025
55c346c
Add new tutorial to main toctree
shuds13 Dec 4, 2025
58f0d82
Rename example
shuds13 Dec 4, 2025
f4af3a6
Rename and add colab link
shuds13 Dec 4, 2025
cccd3bb
Improve layout
shuds13 Dec 4, 2025
63b2fdd
Add xopt/forces example
shuds13 Dec 8, 2025
3917e43
Enable gest-api simulator to use executor
shuds13 Dec 8, 2025
c8e6d62
Fix user_specs naming
shuds13 Dec 8, 2025
589d8fb
Formatting
shuds13 Dec 9, 2025
7288d08
Merge pull request #1620 from Libensemble/examples/xopt_generators
shuds13 Dec 9, 2025
d5fbe14
Merge branch 'develop' into asktell/nov_aposmm_refactor
jlnav Dec 9, 2025
68f1d4e
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/nov…
jlnav Dec 9, 2025
90fe2dc
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Dec 9, 2025
ba1e2f3
Merge branch 'experimental/jlnav_plus_shuds_asktell' into asktell/nov…
jlnav Dec 9, 2025
3daf0c1
Merge pull request #1616 from Libensemble/asktell/nov_aposmm_refactor
shuds13 Dec 9, 2025
d847490
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Dec 12, 2025
1fd96dc
typo
jlnav Dec 12, 2025
ea9c35c
Merge branch 'develop' into experimental/jlnav_plus_shuds_asktell
jlnav Dec 18, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,3 +4,4 @@ ignore:
- "libensemble/tools/live_data/*"
- "libensemble/sim_funcs/executor_hworld.py"
- "libensemble/gen_funcs/persistent_tasmanian.py"
- "libensemble/gen_classes/gpCAM.py"
1 change: 1 addition & 0 deletions .flake8
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ per-file-ignores =

# Need to set something before the APOSMM import
libensemble/tests/regression_tests/test_persistent_aposmm*:E402
libensemble/tests/regression_tests/test_asktell_aposmm_nlopt.py:E402
libensemble/tests/regression_tests/test_persistent_gp_multitask_ax.py:E402
libensemble/tests/functionality_tests/test_uniform_sampling_then_persistent_localopt_runs.py:E402
libensemble/tests/functionality_tests/test_stats_output.py:E402
Expand Down
15 changes: 10 additions & 5 deletions .github/workflows/extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -101,18 +101,23 @@ jobs:
pip install -r install/misc_feature_requirements.txt
source install/install_ibcdfo.sh
conda install numpy scipy

- name: Install libEnsemble, flake8, lock environment
run: |
pip install -e .
flake8 libensemble
conda install -c conda-forge pytorch-cpu
pip install --upgrade-strategy=only-if-needed git+https://github.com/xopt-org/xopt.git@generator_standard
pip install --no-deps git+https://github.com/optimas-org/optimas.git@main

- name: Remove test using octave, gpcam on Python 3.13
if: matrix.python-version >= '3.13'
run: |
rm ./libensemble/tests/regression_tests/test_persistent_fd_param_finder.py # needs octave, which doesn't yet support 3.13
rm ./libensemble/tests/regression_tests/test_persistent_aposmm_external_localopt.py # needs octave, which doesn't yet support 3.13
rm ./libensemble/tests/regression_tests/test_gpCAM.py # needs gpcam, which doesn't build on 3.13
rm ./libensemble/tests/regression_tests/test_asktell_gpCAM.py # needs gpcam, which doesn't build on 3.13

- name: Install libEnsemble, flake8
run: |
pip install git+https://github.com/campa-consortium/gest-api@main
pip install -e .
flake8 libensemble

- name: Install redis/proxystore
run: |
Expand Down
21 changes: 21 additions & 0 deletions docs/function_guides/ask_tell_generator.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@

Ask/Tell Generators
===================

**BETA - SUBJECT TO CHANGE**

These generators, implementations, methods, and subclasses are in BETA, and
may change in future releases.

The Generator interface is expected to roughly correspond with CAMPA's standard:
https://github.com/campa-consortium/gest-api

libEnsemble is in the process of supporting generator objects that implement the following interface:

.. automodule:: generators
:members: Generator LibensembleGenerator
:undoc-members:

.. autoclass:: Generator
:member-order: bysource
:members:
1 change: 1 addition & 0 deletions docs/function_guides/function_guide_index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ These guides describe common development patterns and optional components:
:caption: Writing User Functions

generator
ask_tell_generator
simulator
allocator
sim_gen_alloc_api
Expand Down
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@
tutorials/gpcam_tutorial
tutorials/aposmm_tutorial
tutorials/calib_cancel_tutorial
tutorials/xopt_bayesian_gen

.. toctree::
:maxdepth: 1
Expand Down
1 change: 1 addition & 0 deletions docs/tutorials/tutorials.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,4 @@ Tutorials
gpcam_tutorial
aposmm_tutorial
calib_cancel_tutorial
xopt_bayesian_gen
171 changes: 171 additions & 0 deletions docs/tutorials/xopt_bayesian_gen.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,171 @@
Bayesian Optimization with Xopt
===============================

**Requires**: libensemble, xopt, gest-api

This tutorial demonstrates using Xopt's Bayesian **ExpectedImprovementGenerator** with libEnsemble.

We'll show two approaches:

1. Using an xopt-style simulator (callable function)
2. Using a libEnsemble-style simulator function

|Open in Colab|

Imports
-------

.. code-block:: python

import numpy as np
from gest_api.vocs import VOCS
from xopt.generators.bayesian.expected_improvement import ExpectedImprovementGenerator

from libensemble import Ensemble
from libensemble.alloc_funcs.start_only_persistent import only_persistent_gens as alloc_f
from libensemble.specs import AllocSpecs, ExitCriteria, GenSpecs, LibeSpecs, SimSpecs

Simulator Function
------------------

First, we define the xopt-style simulator function.

This is a basic function just to show how it works.

.. code-block:: python

def test_callable(input_dict: dict) -> dict:
"""Single-objective callable test function"""
assert isinstance(input_dict, dict)
x1 = input_dict["x1"]
x2 = input_dict["x2"]
y1 = x2
c1 = x1
return {"y1": y1, "c1": c1}

Setup
-----

Define the VOCS specification and set up the generator.

.. code-block:: python

libE_specs = LibeSpecs(gen_on_manager=True, nworkers=4)

vocs = VOCS(
variables={"x1": [0, 1.0], "x2": [0, 10.0]},
objectives={"y1": "MINIMIZE"},
constraints={"c1": ["GREATER_THAN", 0.5]},
constants={"constant1": 1.0},
)

gen = ExpectedImprovementGenerator(vocs=vocs)

# Create 4 initial points and ingest them
initial_points = [
{"x1": 0.2, "x2": 2.0, "y1": 2.0, "c1": 0.2},
{"x1": 0.5, "x2": 5.0, "y1": 5.0, "c1": 0.5},
{"x1": 0.7, "x2": 7.0, "y1": 7.0, "c1": 0.7},
{"x1": 0.9, "x2": 9.0, "y1": 9.0, "c1": 0.9},
]
gen.ingest(initial_points)

Define libEnsemble specifications. Note the gen_specs and sim_specs are set using vocs.

Approach 1: Using Xopt-style Simulator (Callable Function)
-----------------------------------------------------------

The simulator is a simple callable function that takes a dictionary of inputs and returns a dictionary of outputs.

.. code-block:: python

gen_specs = GenSpecs(
generator=gen,
vocs=vocs,
)

# Note: using 'simulator' parameter for xopt-style callable
sim_specs = SimSpecs(
simulator=test_callable,
vocs=vocs,
)

alloc_specs = AllocSpecs(alloc_f=alloc_f)
exit_criteria = ExitCriteria(sim_max=12)

workflow = Ensemble(
libE_specs=libE_specs,
sim_specs=sim_specs,
alloc_specs=alloc_specs,
gen_specs=gen_specs,
exit_criteria=exit_criteria,
)

H, _, _ = workflow.run()

if workflow.is_manager:
print(f"Completed {len(H)} simulations")
print(H[["x1", "x2", "y1", "c1"]])
assert np.array_equal(H["y1"], H["x2"])
assert np.array_equal(H["c1"], H["x1"])

Approach 2: Using libEnsemble-style Simulator Function
-------------------------------------------------------

Now we define the libEnsemble-style simulator function and use it in the workflow.

.. code-block:: python

def test_sim(H, persis_info, sim_specs, _):
"""
Simple sim function that takes x1, x2, constant1 from H and returns y1, c1.
Logic: y1 = x2, c1 = x1
"""
batch = len(H)
H_o = np.zeros(batch, dtype=sim_specs["out"])

for i in range(batch):
x1 = H["x1"][i]
x2 = H["x2"][i]
H_o["y1"][i] = x2
H_o["c1"][i] = x1

return H_o, persis_info

Reset generator and change to libEnsemble-style simulator:

.. code-block:: python

# Reset generator and change to libEnsemble-style simulator
gen = ExpectedImprovementGenerator(vocs=vocs)
gen.ingest(initial_points)

gen_specs = GenSpecs(
generator=gen,
vocs=vocs,
)

# Note: using 'sim_f' parameter for libEnsemble-style function
sim_specs = SimSpecs(
sim_f=test_sim,
vocs=vocs,
)

workflow = Ensemble(
libE_specs=libE_specs,
sim_specs=sim_specs,
alloc_specs=alloc_specs,
gen_specs=gen_specs,
exit_criteria=exit_criteria,
)

H, _, _ = workflow.run()

if workflow.is_manager:
print(f"Completed {len(H)} simulations")
print(H[["x1", "x2", "y1", "c1"]])
assert np.array_equal(H["y1"], H["x2"])
assert np.array_equal(H["c1"], H["x1"])

.. |Open in Colab| image:: https://colab.research.google.com/assets/colab-badge.svg
:target: http://colab.research.google.com/github/Libensemble/libensemble/blob/examples/xopt_generators/examples/tutorials/xopt_bayesian_gen/xopt_EI_example.ipynb
Loading
Loading