Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
1168 commits
Select commit Hold shift + click to select a range
a922be1
deprecate python 3.10, plus a perlmutter code-block fix
jlnav Mar 11, 2026
dc2e709
adjust CI
jlnav Mar 11, 2026
1cd94e5
Merge pull request #1694 from Libensemble/deprecate/py310
jlnav Mar 11, 2026
1000202
Merge branch 'develop' into fix/mypy
jlnav Mar 11, 2026
a5a9deb
Merge pull request #1687 from Libensemble/feature/agentsmd
jlnav Mar 11, 2026
6af5e90
Merge branch 'develop' into asktell/only_persistent_is_default
jlnav Mar 11, 2026
250ada5
Merge pull request #1693 from Libensemble/fix/mypy
jlnav Mar 11, 2026
8f07e62
Merge branch 'develop' into asktell/only_persistent_is_default
jlnav Mar 11, 2026
a7382ff
Merge branch 'develop' into refactor/deprecate_from_yaml_toml_json
jlnav Mar 12, 2026
9363f9b
Merge pull request #1605 from Libensemble/refactor/deprecate_from_yam…
jlnav Mar 12, 2026
4369cf2
Merge branch 'develop' into asktell/only_persistent_is_default
jlnav Mar 12, 2026
ebca858
fix unit test
jlnav Mar 12, 2026
aaf98ca
for 1d_sampling on mpi, need >= procs for 1 manager, 1 gen worker, 1 …
jlnav Mar 12, 2026
dece715
add gest-api as conda-package dependency besides pypi
jlnav Mar 13, 2026
286e3a9
Merge branch 'develop' into refactor/gen_on_manager_true. and mypy
jlnav Mar 13, 2026
39798a3
various nworkers indexing fixes for outstanding bugs and indexing err…
jlnav Mar 13, 2026
836e525
some clarifying renames and comments
jlnav Mar 13, 2026
8101c3b
migrate many alloc_f["user"] options to gen_specs. remove correspondi…
jlnav Mar 13, 2026
98a9fce
Merge remote-tracking branch 'upstream/develop' into refactor/replace…
soto-raul Mar 14, 2026
07e208b
these options still needed by var resources testing gens
jlnav Mar 18, 2026
ed03dc5
fix more resources tests
jlnav Mar 18, 2026
aba3f6e
fix more tests
jlnav Mar 18, 2026
d9556eb
typos
jmlarson1 Mar 18, 2026
40321a2
black
jmlarson1 Mar 18, 2026
0c972d3
this validator isn't needed after performing the switch
jlnav Mar 18, 2026
3648a29
Merge pull request #1700 from Libensemble/feature/expanded_aposmm_ibc…
jmlarson1 Mar 18, 2026
9223a3d
Merge pull request #1637 from soto-raul/refactor/replace_os_path_join…
jlnav Mar 18, 2026
4a3cb6a
Option to create sample points outside gen (#1697)
shuds13 Mar 19, 2026
8851447
Fixed user in alloc_fs to be the combination of gen_specs and alloc_s…
jlnav Mar 19, 2026
8d7f077
fixes
jlnav Mar 19, 2026
f3a0e59
for classic reg test need the batch size info in gen_specs
jlnav Mar 20, 2026
eb2b004
fix used batch size key
jlnav Mar 20, 2026
9a8425e
ditto
jlnav Mar 20, 2026
c6bad6a
ditto
jlnav Mar 20, 2026
5f74f54
more test fixes
jlnav Mar 20, 2026
750e55a
Merge branch 'develop' into refactor/gen_on_manager_true
jlnav Mar 20, 2026
e0d4cba
0 is always a zero-resource-worker, no matter what... plus mypy fixes
jlnav Mar 20, 2026
6505cd8
various zrw / gen-worker indexing fixes. defensive programming around…
jlnav Mar 20, 2026
bd5eafa
Bump the python-updates group across 1 directory with 3 updates
dependabot[bot] Mar 23, 2026
94fc628
vibe coded approach lets see how this works
jlnav Mar 23, 2026
e16659f
Merge branch 'refactor/gen_on_manager_true' into refactor/gen_on_work…
jlnav Mar 23, 2026
f2c77a5
the default is already covered by LibeSpecs, so changing the default …
jlnav Mar 24, 2026
2381447
if gen_on_worker is True, then [0] needs to be removed as the default…
jlnav Mar 24, 2026
710b7a8
Merge pull request #1640 from Libensemble/asktell/only_persistent_is_…
jlnav Mar 25, 2026
238cef1
Merge branch 'develop' of https://github.com/Libensemble/libensemble …
jlnav Mar 25, 2026
d4a5160
Refactoring and rewording gen_specs options, including those that wer…
jlnav Mar 25, 2026
5873316
replace give_all_with_same_priority with batch_evaluate_same_priority
jlnav Mar 25, 2026
70b51a8
remove alloc_specs["out"]. this field isn't used anywhere in our code…
jlnav Mar 25, 2026
89d823a
Merge pull request #1701 from Libensemble/dependabot/pip/develop/pyth…
jmlarson1 Mar 25, 2026
4510086
pydantic merging of fields for alloc_specs out no longer necessary
jlnav Mar 26, 2026
5310ddd
Merge branch 'develop' of https://github.com/Libensemble/libensemble …
jlnav Mar 26, 2026
4244446
Merge branch 'develop' into refactor/gen_on_worker_try_again
jlnav Mar 26, 2026
1ee2402
update osx clang
jlnav Mar 26, 2026
86ea5cd
pixi messed up my linker, but this should help prevent such problems …
jlnav Mar 26, 2026
1ddebbb
likewise adjusting other buildstrings
jlnav Mar 26, 2026
b235614
index-list shouldn't consider worker0 - revert unit test changes
jlnav Mar 27, 2026
49f4ce3
"use_gpus" is never set, so remove. So since the sims explicitly want…
jlnav Mar 27, 2026
01f57a6
still need to import this error for the tests
jlnav Mar 27, 2026
aca5f19
Bump codecov/codecov-action from 5 to 6
dependabot[bot] Mar 30, 2026
4cf4d9c
Bump the python-updates group with 2 updates
dependabot[bot] Mar 30, 2026
e389e3d
Merge branch 'develop' into refactor/new_alloc_default_tweaks
jlnav Mar 31, 2026
9f52bdd
docstrings
jlnav Mar 31, 2026
bb3e467
vibe coded approach lets see how this works
jlnav Apr 1, 2026
4be5a32
remove batch_mode from gen_specs since it's particular to give_sim_wo…
jlnav Apr 1, 2026
79b219e
Merge branch 'refactor/remove_zero_resource_workers' into refactor/ge…
jlnav Apr 1, 2026
9a3937b
Bump prefix-dev/setup-pixi from 0.9.4 to 0.9.5
dependabot[bot] Apr 6, 2026
20ac8ad
Bump crate-ci/typos from 1.44.0 to 1.45.0
dependabot[bot] Apr 6, 2026
8da9d41
additional zrw removal adjustments
jlnav Apr 8, 2026
c58ca1b
worker 0 doesnt join default index list mapping. use comm.get_num_wor…
jlnav Apr 8, 2026
9dac071
use develop pixi.lock since something may broken with deps on this br…
jlnav Apr 8, 2026
2f4b881
Updating IBCDFO handling of minq
jmlarson1 Apr 8, 2026
6bf1b40
typo
jmlarson1 Apr 8, 2026
16692f0
Merge pull request #1706 from Libensemble/dependabot/github_actions/d…
jlnav Apr 8, 2026
36f557d
somehow profile=True causes a hang without gen_on_worker
jlnav Apr 8, 2026
0e037e5
Merge pull request #1708 from Libensemble/updating/ibcdfo_install
jmlarson1 Apr 8, 2026
fdf6f3a
even nsim workers
jlnav Apr 8, 2026
1309f58
Merge branch 'develop' of https://github.com/Libensemble/libensemble …
jlnav Apr 8, 2026
5fb650c
Merge branch 'develop' into refactor/gen_on_worker_try_again
jlnav Apr 8, 2026
be44de2
worker num adjustments for subnode tests
jlnav Apr 8, 2026
aaf5f0f
I guess enabling gen_on_worker fixes the "0th" worker creating too ma…
jlnav Apr 8, 2026
48ac49b
funny interaction, worker 0 being a gen worker that runs a non-persis…
jlnav Apr 8, 2026
fe0745e
more adjusts for worker 0 giving back run_order
jlnav Apr 8, 2026
ea4bbf0
Add generate_scripts skill
shuds13 Apr 9, 2026
596f372
Merge pull request #1707 from Libensemble/dependabot/github_actions/d…
jlnav Apr 9, 2026
257ecc2
Merge pull request #1705 from Libensemble/dependabot/pip/develop/pyth…
jlnav Apr 9, 2026
5dfb75b
Merge pull request #1704 from Libensemble/dependabot/github_actions/d…
jlnav Apr 9, 2026
bc6dedd
maybe this test would benefit from gen_on_worker=True
jlnav Apr 9, 2026
3d20f6f
undoing some silly adjusts to test_GPU_gen_resources
jlnav Apr 9, 2026
e426618
Merge branch 'develop' of https://github.com/Libensemble/libensemble …
jlnav Apr 9, 2026
737ccee
Merge pull request #1709 from Libensemble/skills/add_generate_scripts
shuds13 Apr 10, 2026
f52baf0
oMerge branch 'develop' of https://github.com/Libensemble/libensemble…
jlnav Apr 10, 2026
7936113
dramatic removal of add_unique_random_streams and add_random_streams.…
jlnav Apr 10, 2026
fddde53
remove many unneeded instantiations of persis_info. more mypy fixes
jlnav Apr 10, 2026
ecdac5f
Merge pull request #1702 from Libensemble/refactor/new_alloc_default_…
jlnav Apr 13, 2026
298d52e
Merge branch 'develop' of https://github.com/Libensemble/libensemble …
jlnav Apr 13, 2026
92d032e
Merge branch 'develop' into refactor/gen_on_worker_try_again
jlnav Apr 13, 2026
326855e
Merge pull request #1703 from Libensemble/refactor/gen_on_worker_try_…
jlnav Apr 13, 2026
7502f10
Merge branch 'develop' into refactor/rm_add_random_streams
jlnav Apr 13, 2026
b9dc773
fix a gen func to use get_rng
jlnav Apr 13, 2026
27c147e
adjust executor simple to use VOCS and asktell gen. adjusts to AGENTS…
jlnav Apr 13, 2026
4adf888
gen_on_worker causes the -n 2 case to hang
jlnav Apr 13, 2026
4d240b7
modernize test_mpi_runners
jlnav Apr 13, 2026
46841ed
adjust another test, plus add section for updating-to-2.0 in AGENTS.md
jlnav Apr 13, 2026
151295b
fixes so alloc_specs isn't treated as persis_info
jlnav Apr 13, 2026
2e73452
test fixes
jlnav Apr 13, 2026
dafd949
fix a variety of tests so alloc_specs isn't interpreted as persis_info
jlnav Apr 13, 2026
fe5659a
Bump crate-ci/typos from 1.45.0 to 1.45.1
dependabot[bot] Apr 13, 2026
30142a2
Merge pull request #1712 from Libensemble/dependabot/github_actions/d…
jmlarson1 Apr 14, 2026
45bb554
fix another test
jlnav Apr 14, 2026
026cfbf
bump pytest due to apparent vulnerability
jlnav Apr 14, 2026
791b99a
also lockfile
jlnav Apr 14, 2026
ccacc3a
bumpy many lower-level deps in lockfile
jlnav Apr 14, 2026
089ea5e
fix tutorial gen
jlnav Apr 14, 2026
2a85127
remove use_persis_return_sim plus mypy fixes
jlnav Apr 14, 2026
f9c290a
remove some mentions of pyyaml and tomli. bump the version in the spa…
jlnav Apr 14, 2026
b1391e7
modernize initial programming_libe example. Adjust ensemble.py to onl…
jlnav Apr 14, 2026
cefcf2e
Merge pull request #1710 from Libensemble/refactor/rm_add_random_streams
jlnav Apr 16, 2026
e1dff97
Merge branch 'develop' into refactor/rm_use_persis_return_sim
jlnav Apr 17, 2026
d1f6c82
Merge branch 'develop' into docs/pre_2_adjusts
jlnav Apr 17, 2026
0119813
nitpicky
jlnav Apr 17, 2026
fdadb1f
remove @input_fields, @output_ata, and @persistent_input_fields decor…
jlnav Apr 17, 2026
3142636
moving specs_checkers.py logic into validators.py
jlnav Apr 17, 2026
97f079b
fix test
jlnav Apr 17, 2026
ed48331
fix validator
jlnav Apr 17, 2026
b2a4dcf
fixed a bug by rearranging the validator order.........
jlnav Apr 17, 2026
d6ec3b6
fix another test
jlnav Apr 20, 2026
fcb005a
trying out Furo theme in docs
jlnav Apr 20, 2026
5e0ac53
deps
jlnav Apr 20, 2026
41734b7
terse-er wording
jlnav Apr 21, 2026
f3d2125
tentative update of README example for v2.0
jlnav Apr 23, 2026
ba2d662
remove alloc mention from overview_usecases. it's too deep, too much …
jlnav Apr 23, 2026
64177b7
fixes to ensemble.py docstring
jlnav Apr 23, 2026
d493418
claude-assisted dramatic improvement towards ensemble.ready()
jlnav Apr 23, 2026
117dc47
monospacing adjusts
jlnav Apr 23, 2026
c88971a
Merge pull request #1717 from Libensemble/refactor/remove_older_decor…
jlnav Apr 23, 2026
d343168
bump globus-compute-sdk, set optimas to their main branch
jlnav Apr 23, 2026
c3df43e
remove older conda/dependency-finding scripts
jlnav Apr 23, 2026
a1519bb
Merge branch 'develop' into docs/pre_2_adjusts
jlnav Apr 23, 2026
5bb30fb
Claude-audited specs docs. Specify standardized sims/gens approaches
jlnav Apr 23, 2026
1504c23
remove summit docs. move Resources and History sections to Additional…
jlnav Apr 23, 2026
8d8ad6f
move work_dict and worker_array info to dev guide section
jlnav Apr 24, 2026
c02acba
simply enough, clarify in SUPPORT.rst that issues can be opened
jlnav Apr 24, 2026
2be8f23
remove sim_gen_alloc_api - it had become redundant compared to the ex…
jlnav Apr 24, 2026
6e1f4e6
tabbed content refactoring - gen_f/sim_f references point to the func…
jlnav Apr 24, 2026
d46335c
remove some redundant content. emphasize simulator-workers
jlnav Apr 24, 2026
81953fe
remove zero-resource-workers mention
jlnav Apr 24, 2026
7600b39
more pixi info. update executor overview. mypy fixes
jlnav Apr 24, 2026
d503a69
small tweaks. remove summit_submir_mproc.sh. refer to calling scripts…
jlnav Apr 24, 2026
b921293
Bump crate-ci/typos from 1.45.1 to 1.45.2
dependabot[bot] Apr 27, 2026
9f7cd89
fix persis_info examples
jlnav Apr 28, 2026
4c26b07
updating history_array.rst for gest-api considerations. remove more s…
jlnav Apr 28, 2026
c192b1c
additional AGENTS.md considerations. New writing-a-new-simf tab
jlnav Apr 28, 2026
56d57e6
convert Executor pages to single page with tabs for Overview, Base, MPI
jlnav Apr 28, 2026
5e09359
standardized APOSMM example
jlnav Apr 28, 2026
9034598
fix test
jlnav Apr 28, 2026
1d12207
Merge pull request #1719 from Libensemble/dependabot/github_actions/d…
jmlarson1 Apr 28, 2026
332ef3a
Merge branch 'develop' into refactor/rm_use_persis_return_sim
jlnav Apr 29, 2026
181906b
remove use_persis_return_gen. restore deleted test. restore update_hi…
jlnav Apr 29, 2026
65f0513
cleanup some persis gens/sims to return None upon finishing except wh…
jlnav Apr 29, 2026
35741f4
with APOSMM's returned H now completely respected, it may not have th…
jlnav Apr 29, 2026
65358fa
last couple runs don't get their "f"s updated now with APOSMM's H_out…
jlnav Apr 29, 2026
91d3624
remove use_persis_return_sim/gen warning
jlnav Apr 29, 2026
4e5ada4
change dependabot to only check for updates monthly
jlnav Apr 29, 2026
86fbd07
Merge branch 'develop' into docs/pre_2_adjusts
jlnav Apr 29, 2026
89de7f1
I guess sections cant be within tabs, unfortunately?
jlnav Apr 29, 2026
3dff0bf
refactors of generator and simulator guides using pytorch tutorials a…
jlnav Apr 29, 2026
699e06f
move alloc_f data into one page in Additional References
jlnav Apr 30, 2026
f18029e
fix bug where final H getting returned from a gen overwrote "protecte…
jlnav Apr 30, 2026
bb81e03
remove xSDK_policy_compatibility. They have our older compatibility.m…
jlnav May 1, 2026
1d8d60d
remove posters.rst - this content is/will-be very out-of-date
jlnav May 1, 2026
76df2dc
remove more Summit/Sierra code/docs on this branch too
jlnav May 1, 2026
dd9e4bd
update spack install/modify instructions
jlnav May 1, 2026
0137f01
Bump crate-ci/typos from 1.45.2 to 1.46.0
dependabot[bot] May 4, 2026
776d195
bumping ax to >=1.2.1,<2 throughout
jlnav May 5, 2026
8b3e342
revert - fix a pixi bug
jlnav May 5, 2026
50b0429
Merge pull request #1722 from Libensemble/dependabot/github_actions/d…
jmlarson1 May 5, 2026
5b531a4
Merge pull request #1715 from Libensemble/refactor/rm_use_persis_retu…
jlnav May 6, 2026
00063cb
Merge pull request #1721 from Libensemble/docs/update_release_spack
jlnav May 6, 2026
5979a5b
Merge branch 'develop' into deps/bump
jlnav May 6, 2026
2782abc
Merge branch 'develop' into docs/pre_2_adjusts
jlnav May 6, 2026
d83fc90
large refactoring, replacing many uses of tabs throughout with tabbed…
jlnav May 6, 2026
b1c5dd5
revert to develop deps, except for unlocked optimas and bumped globus…
jlnav May 6, 2026
777f9e1
temporarily checking if the ibcdfo install is changing too many deps
jlnav May 7, 2026
c9c6a00
we need old optimas for now because their grid sampling generator nee…
jlnav May 7, 2026
d222be5
add IBCDFO to pyproject.toml, keep minq where it is
jlnav May 7, 2026
e0567dc
put ibcdfo under basic tests. slim down number of instances of long-r…
jlnav May 7, 2026
42d6d73
bump nprocs on asktell aposmm test, add wallclock_max for hanging
jlnav May 7, 2026
f98b666
adjust code-sample in README
jlnav May 7, 2026
37cd2a8
Merge pull request #1724 from Libensemble/deps/adjusts
jlnav May 7, 2026
ac6ddba
Merge branch 'develop' into docs/pre_2_adjusts
jlnav May 7, 2026
eacade2
update the libE_info described/used-in alloc_f's
jlnav May 7, 2026
292ad87
adjust UniformSample (internal) to iterate over vocs variables keys. …
jlnav May 7, 2026
a088dc9
remove redundant comments in README code sample
jlnav May 8, 2026
e3e3134
Merge pull request #1716 from Libensemble/docs/pre_2_adjusts
jlnav May 8, 2026
1ef6b63
various fixes towards getting the pdf build working again
jlnav May 8, 2026
be67b37
add imagemagick
jlnav May 8, 2026
2a9d552
are fonts available?
jlnav May 8, 2026
9893e74
...put imagemagick back
jlnav May 8, 2026
b559b31
claude blames the imgconverter
jlnav May 8, 2026
49c91a3
pdf try skipping the badges that are incompatible
jlnav May 8, 2026
d178b7c
try getting the colab buttons to not appear in pdf
jlnav May 8, 2026
d5954d6
and then hopefully a typo fix is all we need?
jlnav May 8, 2026
f19cf8c
try copying everything over?
jlnav May 8, 2026
0fc4c7d
it can only be the pdf apparently
jlnav May 8, 2026
05fa70f
Bump crate-ci/typos from 1.46.0 to 1.46.1
dependabot[bot] May 12, 2026
6aa24fa
Merge branch 'develop' into deps/bump
jlnav May 12, 2026
c51ef70
bump some deps as noticed by dependabot
jlnav May 12, 2026
b451065
adjusts
jlnav May 12, 2026
fcc8533
Merge pull request #1725 from Libensemble/docs/fix_pdf
jlnav May 12, 2026
d36b08c
Merge branch 'develop' into deps/bump
jlnav May 13, 2026
9f82e6e
Merge pull request #1726 from Libensemble/dependabot/github_actions/d…
jlnav May 13, 2026
54a487e
keep with older surmise?
jlnav May 13, 2026
1ab1c36
Add sampling gens in vocs
shuds13 May 14, 2026
40c1882
Add LHS vocs test
shuds13 May 14, 2026
6824bb3
Update initial_sample_method to work with sampler instance with options
shuds13 May 14, 2026
142d34d
Bump crate-ci/typos from 1.46.1 to 1.46.2
dependabot[bot] May 19, 2026
1945b5e
Merge pull request #1728 from Libensemble/add_vocs_sampling_gens
shuds13 May 19, 2026
b12268e
Merge pull request #1727 from Libensemble/deps/bump
jlnav May 21, 2026
c77bff8
Merge pull request #1729 from Libensemble/dependabot/github_actions/d…
jlnav May 22, 2026
1adc2f4
update lockfile
jlnav May 22, 2026
ee3506a
slim down what gets run in the asktell aposmm test - and move the err…
jlnav May 22, 2026
87ec8e6
bump setup-pixi and specified pixi versions
jlnav May 26, 2026
4b36721
Merge pull request #1736 from Libensemble/refactor/fix_aposmm_test_fl…
jlnav May 26, 2026
bac0573
Bump crate-ci/typos from 1.46.2 to 1.46.3
dependabot[bot] May 26, 2026
9510fdd
Merge pull request #1739 from Libensemble/dependabot/github_actions/d…
jlnav May 26, 2026
6dd7faf
cleanup additional files after running testsuite
jlnav May 27, 2026
744ed1f
introduce improved field-mapping logic from threadrunner Generator to…
jlnav May 27, 2026
ff9120f
bump sim_max and max_active_runs
jlnav May 27, 2026
aa9784e
trying to reduce time for test_cancel_in_alloc
jlnav May 27, 2026
4fa8582
decrement gen_max in test_asktell_sampling.py - since this test takes…
jlnav May 27, 2026
ca51775
using dry_run and smaller sim_max to decrease test_stats_output runtime
jlnav May 27, 2026
aac8054
cutting gen_max for test_asktell_sampling
jlnav May 27, 2026
20ccb03
cut sim_max for test_persistent_sampling_CUDA_variable_resources
jlnav May 27, 2026
6d6a0ce
cut test_persistent_uniform_sampling_async gen_max
jlnav May 27, 2026
57493c8
cut sim_max for test_GPU_variable_resources
jlnav May 27, 2026
f015c69
cut sim_max for test_GPU_variable_resources_multi_task
jlnav May 27, 2026
eebf58b
also bump sim_max for test_persistent_aposmm_nlopt
jlnav May 28, 2026
cdc40cb
num test case adjusts for various tests
jlnav May 28, 2026
19f4bea
tweaking cancel_in_alloc sim_max
jlnav May 28, 2026
23bee33
wowee
jlnav May 28, 2026
4d9682c
guarantee that cancels due to long runtimes actually happen in cancel…
jlnav May 28, 2026
eb11186
bump initial sample size
jlnav May 28, 2026
b48c36f
bump pixi versions
jlnav May 28, 2026
22f0f22
cut the default dist_to_bound_multiple from 0.5 to 0.05
jlnav May 28, 2026
bfcfc17
lets consistent run this with only the larger number of processes
jlnav May 28, 2026
4e1ab9e
hugely bump tol, since we're just testing allocs
jlnav May 28, 2026
f8990b0
Merge pull request #1741 from Libensemble/refactor/testsuite_adjusts
jlnav May 28, 2026
7b143a4
Merge branch 'develop' into examples/botorch_gen_june2026
jlnav Jun 3, 2026
83189d0
dramatic rewrite of the botorch_mfkg branch for gest-api style
jlnav Jun 3, 2026
9eb055c
don't add the botorch gen to the parent namespace - too many imports
jlnav Jun 3, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
147 changes: 147 additions & 0 deletions .claude/skills/generate-scripts/SKILL.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,147 @@
---
name: generate-scripts
description: Generate libEnsemble calling scripts based on user requirements
---

You are generating libEnsemble scripts. libEnsemble coordinates parallel simulations
with generator-directed optimization or sampling. You will produce a calling script
and, when an external application is involved, a sim function file.

libEnsemble repository: https://github.com/Libensemble/libensemble
If not running inside the libEnsemble repo, find examples and source code there.

## Workflow

1. If converting an existing Xopt or Optimas workflow to libEnsemble, use the
existing generator and VOCS settings exactly as-is — even if it is a sampling
or exploration generator. Do not switch to a classic generator unless the user
specifically asks.
Otherwise, if there is not a clear generator to use, read `references/generators.md`
to determine which generator and
style to use. If a specific generator is identified (e.g., APOSMM), read its
dedicated guide (e.g., `references/aposmm.md`).

2. Find a relevant example in `libensemble/tests/regression_tests/` and read it as a
reference. Some examples:
- Xopt Bayesian optimization (VOCS): `test_xopt_EI_initial_sample.py` — best Xopt
example as it demonstrates the initial sampling approach Xopt generators need
- Optimas Ax optimization (VOCS): `test_optimas_ax_sf.py`
- APOSMM with NLopt (classic): `test_persistent_aposmm_nlopt.py`
- Random uniform sampling (classic): `test_1d_sampling.py`
Use glob and grep to find others matching the generator or pattern needed.
The regression tests have clear descriptions in the docstring.

3. Write the calling script adapting the example to the user's requirements.
Do not copy test boilerplate from examples
(e.g., "Execute via one of the following commands..." headers). Set nworkers
directly in the script (in LibeSpecs) — do not use parse_args or command-line
arguments unless the user asks for that. If parse_args is not used and no
options are taken, then do not ever suggest running with "-n/nworkers" or comms.
Those optins are used only with parse_args (used in tests).

4. If the user has an external application (executable), also write a sim function file
that uses the executor to run it.

5. If the user provides an input file, check whether it has Jinja2 template markers
(`{{ varname }}`). If not, create a templated copy: replace parameter values with
`{{ name }}` markers matching `input_names` in sim_specs (case-sensitive). The sim
function uses `jinja2.Template` to render the file before each simulation. Never
modify the user's original file.

6. Verify the scripts:
- Bounds and dimension match the user's request
- Executable path is correct
- For VOCS: variable names are consistent between VOCS definition and sim function
- For APOSMM: gen_specs outputs include all required fields
- Input file template markers match input_names (case-sensitive)
- The app_name in submit() matches register_app()

7. Present a concise summary highlighting: generator choice, bounds, parameters,
sim_max, and objective field. Do NOT suggest `mpirun` or other MPI
runner (srun, mpiexec, etc.) to launch libEnsemble unless the user explicitly
asks for MPI-based comms.

8. Ask the user if they want to run the scripts.

9. If running: execute with `python script.py`. Do not use `mpirun` or other MPI
runner (srun, mpiexec, etc.) to launch libEnsemble unless the user explicitly
asks for MPI-based comms for distributing workers. This is unrelated to
MPIExecutor, which workers use to launch simulation applications across nodes
— libEnsemble manages node allocation.
If scripts fail, retry if you can see a fix, otherwise stop. After a successful
run, read `references/results_metadata.md` and
`references/finding_objectives.md` to interpret the output.

## Generator style

VOCS (gest-api) is the default style. It uses a VOCS object to define variables and
objectives, and a generator object from Xopt or Optimas. Use VOCS unless the user
explicitly asks for the classic style or the generator only exists in classic form
(e.g., APOSMM, persistent_sampling).

## Defaults

- nworkers defaults to 4 unless the user specifies otherwise (or 1 for sequential
generators like Nelder-Mead)
- All nworkers are available for simulations
- No alloc_specs needed — all allocator options are available as GenSpecs parameters
- Use `async_return=True` in GenSpecs unless there is a reason to use batch returns

## VOCS generators (Xopt / Optimas)

Key patterns:
- Variables named individually in VOCS: `{"x0": [lb, ub], "x1": [lb, ub]}`
- Objectives named in VOCS: `{"f": "MINIMIZE"}`
- GenSpecs uses `generator=`, `vocs=`, `batch_size=`
- SimSpecs uses `vocs=` or `simulator=` for gest-api style sim functions
- No `add_random_streams()` needed
- Xopt generators need `initial_sample_method="uniform"` and `initial_batch_size=`
for initial evaluated data. Optimas handles its own sampling.

See `references/generators.md` for the full generator selection guide.

## Classic generators

Used only when the generator has no VOCS version or the user explicitly requests it.
- One worker is consumed by the persistent generator
- Requires `add_random_streams()`
- APOSMM: see `references/aposmm.md` for full configuration details

## Sim function patterns

**Inline sim function** (no external app): Takes `(H, persis_info, sim_specs, libE_info)`
and returns `(H_o, persis_info)`. Or for VOCS gest-api style, takes `input_dict: dict`
and returns a dict. See `libensemble/sim_funcs/` for built-in examples.

**Executor-based sim function** (external app): Uses MPIExecutor to run an application.
Pattern:
1. Register app in calling script: `exctr.register_app(full_path=..., app_name=...)`
2. In sim function: get executor from `libE_info["executor"]`, submit with
`exctr.submit(app_name=...)`, wait with `task.wait()`
3. Read output file to get objective value
4. Set `sim_dirs_make=True` in LibeSpecs
5. If using input file templating, set `sim_dir_copy_files=[input_file]`

## Results interpretation

After a successful run:
- Load the .npy output file with `np.load()`
- Always filter by `sim_ended == True` before analyzing — rows where sim_ended is False
contain uninitialized values (often zeros) that are NOT real results
- For APOSMM: check rows where `local_min == True` to find identified minima
- Report the count, location, and objective value of minima or best points found
- If the best objective value is exactly 0.0, verify those rows have sim_ended == True
- See `references/results_metadata.md` for full details

## Reference docs (read as needed)

All paths relative to this skill's directory:

- `references/generators.md` — Generator selection guide, VOCS vs classic
- `references/aposmm.md` — APOSMM configuration, optimizer options, tuning
- `references/finding_objectives.md` — Identifying objective fields in results
- `references/results_metadata.md` — Interpreting history array, filtering results

## User request

$ARGUMENTS
142 changes: 142 additions & 0 deletions .claude/skills/generate-scripts/references/aposmm.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,142 @@
# APOSMM — Asynchronously Parallel Optimization Solver for Multiple Minima

APOSMM coordinates concurrent local optimization runs to find multiple local minima on parallel hardware. Use when the user wants to find minima, optimize, or explore an optimization landscape.

Module: `persistent_aposmm`
Function: `aposmm`
Allocator: `persistent_aposmm_alloc` (NOT the default `start_only_persistent`)
Requirements: mpmath, SciPy (plus optional packages for specific local optimizers)

## APOSMM gen_specs in generated scripts

When the MCP tool generates APOSMM scripts, run_libe.py gets this gen_specs structure:

```python
gen_specs = GenSpecs(
gen_f=gen_f,
inputs=[],
persis_in=["sim_id", "x", "x_on_cube", "f"],
outputs=[("x", float, n), ("x_on_cube", float, n), ("sim_id", int),
("local_min", bool), ("local_pt", bool)],
user={
"initial_sample_size": num_workers,
"localopt_method": "scipy_Nelder-Mead",
"opt_return_codes": [0],
"nu": 1e-8,
"mu": 1e-8,
"dist_to_bound_multiple": 0.01,
"max_active_runs": 6,
"lb": np.array([...]), # MUST match user's requested bounds
"ub": np.array([...]), # MUST match user's requested bounds
}
)
```

With allocator:
```python
from libensemble.alloc_funcs.persistent_aposmm_alloc import persistent_aposmm_alloc as alloc_f
```

## Required gen_specs["user"] Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `lb` | n floats | Lower bounds on search domain |
| `ub` | n floats | Upper bounds on search domain |
| `localopt_method` | str | Local optimizer (see table below) |
| `initial_sample_size` | int | Uniform samples before starting local runs |

When using a SciPy method, must also supply `opt_return_codes` — e.g. [0] for Nelder-Mead/BFGS, [1] for COBYLA.

## Optional gen_specs["user"] Parameters

| Parameter | Type | Description |
|-----------|------|-------------|
| `max_active_runs` | int | Max concurrent local optimization runs. Must not exceed nworkers. |
| `dist_to_bound_multiple` | float (0,1] | Fraction of distance to boundary for initial step size |
| `mu` | float | Min distance from boundary for starting points |
| `nu` | float | Min distance from identified minima for starting points |
| `stop_after_k_minima` | int | Stop after this many local minima found |
| `stop_after_k_runs` | int | Stop after this many runs ended |
| `sample_points` | numpy array | Specific points to sample (original domain) |
| `lhs_divisions` | int | Latin hypercube partitions (0 or 1 = uniform) |
| `rk_const` | float | Multiplier for r_k value |

## Local Optimizer Methods

### SciPy (no extra install)

| Method | Gradient? | `opt_return_codes` |
|--------|-----------|-------------------|
| `scipy_Nelder-Mead` | No | [0] |
| `scipy_COBYLA` | No | [1] |
| `scipy_BFGS` | Yes | [0] |

### NLopt (requires nlopt package)

| Method | Gradient? | Description |
|--------|-----------|-------------|
| `LN_SBPLX` | No | Subplex. Good for noisy/nonsmooth |
| `LN_BOBYQA` | No | Quadratic model. Good for smooth problems |
| `LN_COBYLA` | No | Constrained optimization |
| `LN_NEWUOA` | No | Unconstrained quadratic model |
| `LN_NELDERMEAD` | No | Classic simplex |
| `LD_MMA` | Yes | Method of Moving Asymptotes |

NLopt methods require convergence tolerances. If the user does not specify tolerances, use these defaults:

```python
"xtol_abs": 1e-6,
"ftol_abs": 1e-6,
```

When using an NLopt method, always include `rk_const` scaled to the problem dimension:

```python
from math import gamma, pi, sqrt
n = <number of dimensions>
rk_const = 0.5 * ((gamma(1 + (n / 2)) * 5) ** (1 / n)) / sqrt(pi)
```

Use this formula directly in the generated script — do not precompute the value.

### PETSc/TAO (requires petsc4py package)

| Method | Needs | Description |
|--------|-------|-------------|
| `pounders` | fvec | Least-squares trust-region |
| `blmvm` | grad | Bounded limited-memory variable metric |
| `nm` | f only | Nelder-Mead variant |

### DFO-LS (requires dfols package)

| Method | Needs | Description |
|--------|-------|-------------|
| `dfols` | fvec | Derivative-free least-squares |

## Choosing a Local Optimizer

- **Default / simple**: `scipy_Nelder-Mead` — no extra packages
- **Smooth, bounded**: `LN_BOBYQA` (NLopt)
- **Noisy objectives**: `LN_SBPLX` (NLopt) or `scipy_Nelder-Mead`
- **Gradient available**: `scipy_BFGS` or `LD_MMA`
- **Least-squares (vector output)**: `pounders` (PETSc) or `dfols`
- **Constrained**: `scipy_COBYLA` or `LN_COBYLA`

## Interpreting Results

After a run, report the number of minima found. Load the results `.npy` file,
filter by `sim_ended == True`, then check `local_min == True` rows.
Report the count, objective value, and location of each minimum.

## Tuning

If APOSMM is not finding minima, try increasing the multiplier in `rk_const` (e.g., from 0.5 to a larger value) to make it more aggressive about starting new local optimization runs in different regions.

Use this formula directly in the generated script — do not precompute the value.
Also consider increasing `dist_to_bound_multiple` (e.g., 0.5) for a larger initial
step size.

## Important

Always use the bounds, sim_max, and paths from the user's request. Never substitute values from examples or known problem domains.
31 changes: 31 additions & 0 deletions .claude/skills/generate-scripts/references/finding_objectives.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
# Finding Objective Fields
How to find objective field names in results files.

## VOCS scripts

The objective field name is defined in the VOCS object:
```python
vocs = VOCS(
variables={"x0": [-2, 2], "x1": [-1, 1]},
objectives={"f": "MINIMIZE"},
)
```

The key in `objectives` (e.g. `"f"`) is the objective field name in the results.

## Classic scripts

The objective field name is defined in `sim_specs` outputs:
```python
sim_specs = SimSpecs(
...
outputs=[("f", float)], # "f" is the objective field name
)
```

The field name in `outputs` (e.g. `"f"`) matches the field name in the `.npy` results file.

## Common patterns
- Single objective: `{"f": "MINIMIZE"}` (VOCS) or `outputs=[("f", float)]` (classic)
- Multiple outputs: `"f"` is typically the objective — the scalar float used by the generator
- The objective field name in the VOCS definition or sim_specs outputs matches the field in the results
Loading