diff --git a/.wci.yml b/.wci.yml index f03aa0c635..db127beebe 100644 --- a/.wci.yml +++ b/.wci.yml @@ -16,8 +16,8 @@ description: | language: Python release: - version: 1.5.0 - date: 2025-04-10 + version: 1.6.0 + date: 2026-03-04 documentation: general: https://libensemble.readthedocs.io diff --git a/CHANGELOG.rst b/CHANGELOG.rst index bbb2bee549..d950fdd3ca 100644 --- a/CHANGELOG.rst +++ b/CHANGELOG.rst @@ -8,6 +8,45 @@ GitHub issues are referenced, and can be viewed with hyperlinks on the `github r .. _`github releases page`: https://github.com/Libensemble/libensemble/releases +Release 1.6.0 +-------------- + +:Date: March 04, 2026 + +General Updates: + +* Support for ``gest-api`` generators (https://gest-api.readthedocs.io). #1307 + + * Support for any Xopt (v3.0+) and Optimas generators. + * libEnsemble's APOSMM, gpCAM, and random sampling generators are supplied in ``gest-api`` format. + * Support dictionary (Xopt-style) simulator functions. + +* Simulation container support - Executor precedent accepts ``%LIBENSEMBLE_SIM_DIR%`` placeholder. #1672 + +Examples: + +* Adding test for ibcdfo with jax. #1591 +* Optimas/Xopt examples. #1620 / #1635 +* Bayesian Optimization with Xopt tutorial / notebook. +* Tasmanian generators moved to community examples. + +Dependencies: + +* ``gest-api`` is now a required dependency. #1666 +* Remove Pydantic v1 support and Balsam. #1573 +* Python 3.14 supported. #1609 + + +:Note: + +* Tests were run on Linux and MacOS with Python versions 3.10, 3.11, 3.12, 3.13, 3.14 +* Heterogeneous workflows tested on Aurora (ALCF) and Perlmutter (NERSC). + +:Known Issues: + +* See known issues section in the documentation. + + Release 1.5.0 -------------- diff --git a/LICENSE b/LICENSE index 6a45c6a4cf..8a1c9cd833 100644 --- a/LICENSE +++ b/LICENSE @@ -1,6 +1,6 @@ BSD 3-Clause License -Copyright (c) 2018-2025, UChicago Argonne, LLC and the libEnsemble Development Team +Copyright (c) 2018-2026, UChicago Argonne, LLC and the libEnsemble Development Team All Rights Reserved. Redistribution and use in source and binary forms, with or without diff --git a/README.rst b/README.rst index acde5faff9..80b601e0ca 100644 --- a/README.rst +++ b/README.rst @@ -22,8 +22,11 @@ and inference problems on the world's leading supercomputers such as Frontier, A `Quickstart`_ -**New:** Try out the |ScriptCreator| to generate customized scripts for running -ensembles with your MPI applications. +**New:** libEnsemble nows supports the `gest-api`_ generator standard, and can run with +Optimas and Xopt generators. + +The |ScriptCreator| to generate customized scripts for running ensembles with your +MPI applications. Installation ============ @@ -44,10 +47,8 @@ and an exit condition. Run the following four-worker example via ``python this_f import numpy as np - from gest_api.vocs import VOCS - from libensemble import Ensemble - from libensemble.gen_classes.sampling import UniformSample + from libensemble.gen_funcs.sampling import uniform_random_sample from libensemble.sim_funcs.six_hump_camel import six_hump_camel from libensemble.specs import ExitCriteria, GenSpecs, LibeSpecs, SimSpecs @@ -55,41 +56,37 @@ and an exit condition. Run the following four-worker example via ``python this_f libE_specs = LibeSpecs(nworkers=4) - variables_objectives = VOCS( - variables={ - "x0": [-3, 3], - "x1": [-2, 2], - }, - objectives={"f": "EXPLORE"}, - ) - - generator = UniformSample(vocs=variables_objectives) - sim_specs = SimSpecs( sim_f=six_hump_camel, - vocs=variables_objectives, + inputs=["x"], + outputs=[("f", float)], ) gen_specs = GenSpecs( - generator=generator, - vocs=variables_objectives, + gen_f=uniform_random_sample, + outputs=[("x", float, 2)], + user={ + "gen_batch_size": 50, + "lb": np.array([-3, -2]), + "ub": np.array([3, 2]), + }, ) exit_criteria = ExitCriteria(sim_max=100) - ensemble = Ensemble( + sampling = Ensemble( libE_specs=libE_specs, sim_specs=sim_specs, gen_specs=gen_specs, exit_criteria=exit_criteria, ) - ensemble.add_random_streams() - ensemble.run() + sampling.add_random_streams() + sampling.run() - if ensemble.is_manager: - ensemble.save_output(__file__) - print("Some output data:\n", ensemble.H[["x", "f"]][:10]) + if sampling.is_manager: + sampling.save_output(__file__) + print("Some output data:\n", sampling.H[["x", "f"]][:10]) |Inline Example| @@ -106,6 +103,8 @@ Try some other examples live in Colab. +---------------------------------------------------------------+-------------------------------------+ | Surrogate model generation with gpCAM. | |Surrogate Modeling| | +---------------------------------------------------------------+-------------------------------------+ +| Bayesian Optimization with Xopt. | |Bayesian Optimization with Xopt| | ++---------------------------------------------------------------+-------------------------------------+ There are many more examples in the `regression tests`_ and `Community Examples repository`_. @@ -167,6 +166,7 @@ Resources .. _conda-forge: https://conda-forge.org/ .. _Contributions: https://github.com/Libensemble/libensemble/blob/main/CONTRIBUTING.rst .. _docs: https://libensemble.readthedocs.io/en/main/advanced_installation.html +.. _gest-api: https://gest-api.readthedocs.io .. _GitHub: https://github.com/Libensemble/libensemble .. _libEnsemble mailing list: https://lists.mcs.anl.gov/mailman/listinfo/libensemble .. _libEnsemble Slack page: https://libensemble.slack.com @@ -192,6 +192,9 @@ Resources .. |Surrogate Modeling| image:: https://colab.research.google.com/assets/colab-badge.svg :target: https://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/tutorials/gpcam_surrogate_model/gpcam.ipynb +.. |Bayesian Optimization with Xopt| image:: https://colab.research.google.com/assets/colab-badge.svg + :target: https://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/tutorials/xopt_bayesian_gen/xopt_EI_example.ipynb + .. |ScriptCreator| image:: https://img.shields.io/badge/Script_Creator-purple?logo=magic :target: https://libensemble.github.io/script-creator/ :alt: Script Creator diff --git a/docs/examples/gest_api.rst b/docs/examples/gest_api.rst index de4322234f..077355b775 100644 --- a/docs/examples/gest_api.rst +++ b/docs/examples/gest_api.rst @@ -2,7 +2,7 @@ (New) Standardized Generators ============================= -libEnsemble now also supports all generators that implement the gest_api_ interface. +libEnsemble also supports all generators that use the gest_api_ interface. .. code-block:: python :linenos: @@ -78,13 +78,15 @@ Modeling and Approximation Verified Third Party Examples ============================= -Generators that implement the gest_api_ interface and are verified to work with libEnsemble. +Generators that use the gest_api_ interface and are verified to work with libEnsemble. The standardized interface was developed in partnership with their authors. Xopt - https://github.com/xopt-org/Xopt --------------------------------------- +Examples: + `Expected Improvement`_ `Nelder Mead`_ @@ -92,12 +94,20 @@ Xopt - https://github.com/xopt-org/Xopt Optimas - https://github.com/optimas-org/optimas ------------------------------------------------ +Examples: + `Grid Sampling`_ +`Ax Multi-fidelity`_ + .. _gest_api: https://github.com/campa-consortium/gest-api .. _gpcam: https://gpcam.lbl.gov/ .. _paper: https://link.springer.com/article/10.1007/s12532-017-0131-4 -.. _Expected Improvement: https://github.com/xopt-org/Xopt/blob/main/xopt/generators/bayesian/expected_improvement.py -.. _Nelder Mead: https://github.com/xopt-org/Xopt/blob/main/xopt/generators/sequential/neldermead.py -.. _Grid Sampling: https://github.com/optimas-org/optimas/blob/main/optimas/generators/grid_sampling.py +.. _Expected Improvement: https://github.com/Libensemble/libensemble/blob/develop/libensemble/tests/regression_tests/test_xopt_EI.py + +.. _Nelder Mead: https://github.com/Libensemble/libensemble/blob/develop/libensemble/tests/regression_tests/test_xopt_nelder_mead.py + +.. _Grid Sampling: https://github.com/Libensemble/libensemble/blob/develop/libensemble/tests/regression_tests/test_optimas_grid_sample.py + +.. _Ax Multi-fidelity: https://github.com/Libensemble/libensemble/blob/develop/libensemble/tests/regression_tests/test_optimas_ax_mf.py diff --git a/docs/function_guides/ask_tell_generator.rst b/docs/function_guides/ask_tell_generator.rst deleted file mode 100644 index 73f97124c3..0000000000 --- a/docs/function_guides/ask_tell_generator.rst +++ /dev/null @@ -1,21 +0,0 @@ - -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: diff --git a/docs/function_guides/function_guide_index.rst b/docs/function_guides/function_guide_index.rst index 0539e24c60..621bf36d27 100644 --- a/docs/function_guides/function_guide_index.rst +++ b/docs/function_guides/function_guide_index.rst @@ -13,7 +13,6 @@ These guides describe common development patterns and optional components: :caption: Writing User Functions generator - ask_tell_generator simulator allocator sim_gen_alloc_api diff --git a/docs/tutorials/xopt_bayesian_gen.rst b/docs/tutorials/xopt_bayesian_gen.rst index a4b99a3b02..9271efd75d 100644 --- a/docs/tutorials/xopt_bayesian_gen.rst +++ b/docs/tutorials/xopt_bayesian_gen.rst @@ -168,4 +168,4 @@ Reset generator and change to libEnsemble-style simulator: 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 + :target: https://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/tutorials/xopt_bayesian_gen/xopt_EI_example.ipynb diff --git a/examples/tutorials/xopt_bayesian_gen/xopt_EI_example.ipynb b/examples/tutorials/xopt_bayesian_gen/xopt_EI_example.ipynb index cb5730c8a2..9d24011b48 100644 --- a/examples/tutorials/xopt_bayesian_gen/xopt_EI_example.ipynb +++ b/examples/tutorials/xopt_bayesian_gen/xopt_EI_example.ipynb @@ -14,6 +14,26 @@ "2. Using a libEnsemble-style simulator function\n" ] }, + { + "cell_type": "markdown", + "metadata": {}, + "source": [ + "# Check installed packages" + ] + }, + { + "cell_type": "code", + "execution_count": null, + "metadata": {}, + "outputs": [], + "source": [ + "import sys\n", + "if 'google.colab' in sys.modules:\n", + " !pip install gest-api\n", + " !pip install xopt\n", + " !pip install libensemble" + ] + }, { "cell_type": "markdown", "metadata": {}, diff --git a/libensemble/gen_funcs/aposmm_localopt_support.py b/libensemble/gen_funcs/aposmm_localopt_support.py index 8ffd5d9e10..6d823e10fc 100644 --- a/libensemble/gen_funcs/aposmm_localopt_support.py +++ b/libensemble/gen_funcs/aposmm_localopt_support.py @@ -45,7 +45,7 @@ class APOSMMException(Exception): if "dfols" in optimizers: import dfols # noqa: F401 if "ibcdfo_pounders" in optimizers: - from ibcdfo import run_pounders + from ibcdfo import run_pounders # noqa: F401 if "ibcdfo_manifold_sampling" in optimizers: from ibcdfo import run_MSP # noqa: F401 if "scipy" in optimizers: @@ -434,7 +434,7 @@ def run_local_ibcdfo_manifold_sampling(user_specs, comm_queue, x0, f0, child_can not be sent back to the manager). """ from ibcdfo import run_MSP # noqa: F811 - + n = len(x0) # Define bound constraints (lower <= x <= upper) lb = np.zeros(n) @@ -490,7 +490,7 @@ def run_local_ibcdfo_pounders(user_specs, comm_queue, x0, f0, child_can_read, pa not be sent back to the manager). """ from ibcdfo import run_pounders # noqa: F811 - + n = len(x0) # Define bound constraints (lower <= x <= upper) lb = np.zeros(n) diff --git a/libensemble/tests/regression_tests/test_xopt_nelder_mead.py b/libensemble/tests/regression_tests/test_xopt_nelder_mead.py index 111863a3b4..fe8039b95c 100644 --- a/libensemble/tests/regression_tests/test_xopt_nelder_mead.py +++ b/libensemble/tests/regression_tests/test_xopt_nelder_mead.py @@ -14,6 +14,7 @@ # TESTSUITE_COMMS: mpi local # TESTSUITE_NPROCS: 2 # TESTSUITE_EXTRA: true +# TESTSUITE_EXCLUDE: true import numpy as np from gest_api.vocs import VOCS diff --git a/libensemble/version.py b/libensemble/version.py index f507afd208..e4adfb83d5 100644 --- a/libensemble/version.py +++ b/libensemble/version.py @@ -1 +1 @@ -__version__ = "1.5.0+dev" +__version__ = "1.6.0"