libEnsemble

libEnsemble: A complete Python toolkit for dynamic ensembles of calculations - Published in JOSS (2023)

https://github.com/libensemble/libensemble

Science Score: 95.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
    Found codemeta.json file
  • .zenodo.json file
    Found .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README and JOSS metadata
  • Academic publication links
    Links to: joss.theoj.org
  • Committers with academic emails
    15 of 21 committers (71.4%) from academic institutions
  • Institutional organization owner
  • JOSS paper metadata
    Published in Journal of Open Source Software

Keywords from Contributors

adaptive-mesh-refinement amr amrex hpsf mesh

Scientific Fields

Economics Social Sciences - 40% confidence
Last synced: 4 months ago · JSON representation

Repository

A Python toolkit for coordinating asynchronous and dynamic ensembles of calculations.

Basic Info
Statistics
  • Stars: 70
  • Watchers: 9
  • Forks: 27
  • Open Issues: 41
  • Releases: 31
Created about 9 years ago · Last pushed 4 months ago
Metadata Files
Readme Changelog Contributing License Support

README.rst

|libE_logo|

|PyPI| |Conda| |Spack|

|Tests| |Coverage| |Docs| |Style| |JOSS|

.. after_badges_rst_tag

=====================================================================
libEnsemble: A complete toolkit for dynamic ensembles of calculations
=====================================================================

libEnsemble empowers model-driven ensembles to solve design, decision,
and inference problems on the world's leading supercomputers such as Frontier, Aurora, and Perlmutter.

• **Dynamic ensembles**: Generate parallel tasks on-the-fly based on previous computations.
• **Extreme portability and scaling**: Run on or across laptops, clusters, and leadership-class machines.
• **Heterogeneous computing**: Dynamically and portably assign CPUs, GPUs, or multiple nodes.
• **Application monitoring**: Ensemble members can run, monitor, and cancel apps.
• **Data-flow between tasks**: Running ensemble members can send and receive data.
• **Low start-up cost**: No additional background services or processes required.

`Quickstart`_

**New:** Try out the |ScriptCreator| to generate customized scripts for running
ensembles with your MPI applications.

Installation
============

Install libEnsemble and its dependencies from PyPI_ using pip::

    pip install libensemble

Other install methods are described in the docs_.

Basic Usage
===========

Create an ``Ensemble``, then customize it with general settings, simulation and generator parameters,
and an exit condition. Run the following four-worker example via ``python this_file.py``:

.. code-block:: python

    import numpy as np

    from libensemble import Ensemble
    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

    if __name__ == "__main__":

        libE_specs = LibeSpecs(nworkers=4)

        sim_specs = SimSpecs(
            sim_f=six_hump_camel,
            inputs=["x"],
            outputs=[("f", float)],
        )

        gen_specs = GenSpecs(
            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)

        sampling = Ensemble(
            libE_specs=libE_specs,
            sim_specs=sim_specs,
            gen_specs=gen_specs,
            exit_criteria=exit_criteria,
        )

        sampling.add_random_streams()
        sampling.run()

        if sampling.is_manager:
            sampling.save_output(__file__)
            print("Some output data:\n", sampling.H[["x", "f"]][:10])

|Inline Example|

Try some other examples live in Colab.

+---------------------------------------------------------------+-------------------------------------+
| Description                                                   | Try online                          |
+===============================================================+=====================================+
| Simple Ensemble that makes a Sine wave.                       | |Simple Ensemble|                   |
+---------------------------------------------------------------+-------------------------------------+
| Ensemble with an MPI application.                             | |Ensemble with an MPI application|  |
+---------------------------------------------------------------+-------------------------------------+
| Optimization example that finds multiple minima.              | |Optimization example|              |
+---------------------------------------------------------------+-------------------------------------+
| Surrogate model generation with gpCAM.                        | |Surrogate Modeling|                |
+---------------------------------------------------------------+-------------------------------------+

There are many more examples in the `regression tests`_ and `Community Examples repository`_.

Resources
=========

**Support:**

- Ask questions or report issues on GitHub_.
- Email ``libEnsemble@lists.mcs.anl.gov`` to request `libEnsemble Slack page`_.
- Join the `libEnsemble mailing list`_ for updates about new releases.

**Further Information:**

- Documentation is provided by ReadtheDocs_.
- Contributions_ to libEnsemble are welcome.
- Browse production functions and workflows in the `Community Examples repository`_.

**Cite libEnsemble:**

.. code-block:: bibtex

  @article{Hudson2022,
    title   = {{libEnsemble}: A Library to Coordinate the Concurrent
               Evaluation of Dynamic Ensembles of Calculations},
    author  = {Stephen Hudson and Jeffrey Larson and John-Luke Navarro and Stefan M. Wild},
    journal = {{IEEE} Transactions on Parallel and Distributed Systems},
    volume  = {33},
    number  = {4},
    pages   = {977--988},
    year    = {2022},
    doi     = {10.1109/tpds.2021.3082815}
  }

.. |libE_logo| image:: https://raw.githubusercontent.com/Libensemble/libensemble/main/docs/images/libE_logo.png
   :align: middle
   :alt: libEnsemble
.. |PyPI| image:: https://img.shields.io/pypi/v/libensemble.svg?color=blue
   :target: https://pypi.org/project/libensemble
.. |Conda| image:: https://img.shields.io/conda/v/conda-forge/libensemble?color=blue
   :target: https://anaconda.org/conda-forge/libensemble
.. |Spack| image:: https://img.shields.io/spack/v/py-libensemble?color=blue
   :target: https://packages.spack.io/package.html?name=py-libensemble
.. |Tests| image:: https://github.com/Libensemble/libensemble/actions/workflows/extra.yml/badge.svg?branch=main
   :target: https://github.com/Libensemble/libensemble/actions
.. |Coverage| image:: https://codecov.io/github/Libensemble/libensemble/graph/badge.svg
   :target: https://codecov.io/github/Libensemble/libensemble
.. |Docs| image:: https://readthedocs.org/projects/libensemble/badge/?maxAge=2592000
   :target: https://libensemble.readthedocs.org/en/latest/
   :alt: Documentation Status
.. |Style| image:: https://img.shields.io/badge/code%20style-black-000000.svg
   :target: https://github.com/psf/black
   :alt: Code style: black
.. |JOSS| image:: https://joss.theoj.org/papers/10.21105/joss.06031/status.svg
   :target: https://doi.org/10.21105/joss.06031
   :alt: JOSS Status

.. _Community Examples repository: https://github.com/Libensemble/libe-community-examples
.. _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
.. _GitHub: https://github.com/Libensemble/libensemble
.. _libEnsemble mailing list: https://lists.mcs.anl.gov/mailman/listinfo/libensemble
.. _libEnsemble Slack page: https://libensemble.slack.com
.. _MPICH: http://www.mpich.org/
.. _mpmath: http://mpmath.org/
.. _PyPI: https://pypi.org
.. _Quickstart: https://libensemble.readthedocs.io/en/main/introduction.html
.. _ReadtheDocs: http://libensemble.readthedocs.org/
.. _regression tests: https://github.com/Libensemble/libensemble/tree/main/libensemble/tests/regression_tests

.. |Inline Example| image:: https://colab.research.google.com/assets/colab-badge.svg
  :target:  http://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/readme_notebook.ipynb

.. |Simple Ensemble| image:: https://colab.research.google.com/assets/colab-badge.svg
  :target:  http://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/tutorials/simple_sine/sine_tutorial_notebook.ipynb

.. |Ensemble with an MPI application| image:: https://colab.research.google.com/assets/colab-badge.svg
  :target:  http://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/tutorials/forces_with_executor/forces_tutorial_notebook.ipynb

.. |Optimization example| image:: https://colab.research.google.com/assets/colab-badge.svg
  :target:  http://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/tutorials/aposmm/aposmm_tutorial_notebook.ipynb

.. |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

.. |ScriptCreator| image:: https://img.shields.io/badge/Script_Creator-purple?logo=magic
   :target: https://libensemble.github.io/script-creator/
   :alt: Script Creator

Owner

  • Name: Libensemble
  • Login: Libensemble
  • Kind: organization

A library to coordinate the concurrent evaluation of dynamic ensembles of calculations

JOSS Publication

libEnsemble: A complete Python toolkit for dynamic ensembles of calculations
Published
December 18, 2023
Volume 8, Issue 92, Page 6031
Authors
Stephen Hudson ORCID
Mathematics and Computer Science Division, Argonne National Laboratory, Lemont, IL, USA
Jeffrey Larson ORCID
Mathematics and Computer Science Division, Argonne National Laboratory, Lemont, IL, USA
John-Luke Navarro ORCID
Mathematics and Computer Science Division, Argonne National Laboratory, Lemont, IL, USA
Stefan M. Wild ORCID
AMCR Division, Lawrence Berkeley National Laboratory, Berkeley, CA, USA, Industrial Engineering and Management Sciences, Northwestern University, Evanston, IL, USA
Editor
Mehmet Hakan Satman ORCID
Tags
ensemble workflows optimization and learning

Papers & Mentions

Total mentions: 1

Saddle-Reset for Robust Parameter Estimation and Identifiability Analysis of Nonlinear Mixed Effects Models
Last synced: 3 months ago

GitHub Events

Total
  • Create event: 116
  • Release event: 2
  • Issues event: 18
  • Watch event: 6
  • Delete event: 104
  • Issue comment event: 126
  • Push event: 469
  • Pull request review comment event: 65
  • Pull request review event: 129
  • Pull request event: 219
  • Fork event: 2
Last Year
  • Create event: 116
  • Release event: 2
  • Issues event: 18
  • Watch event: 6
  • Delete event: 104
  • Issue comment event: 126
  • Push event: 469
  • Pull request review comment event: 65
  • Pull request review event: 129
  • Pull request event: 219
  • Fork event: 2

Committers

Last synced: 5 months ago

All Time
  • Total Commits: 7,014
  • Total Committers: 21
  • Avg Commits per committer: 334.0
  • Development Distribution Score (DDS): 0.69
Past Year
  • Commits: 351
  • Committers: 4
  • Avg Commits per committer: 87.75
  • Development Distribution Score (DDS): 0.613
Top Committers
Name Email Commits
shudson s****n@a****v 2,172
jlnav j****o@a****v 2,111
Jeffrey Larson j****n@a****v 2,046
David Bindel b****l@c****u 268
dependabot[bot] 4****] 168
Moses Chan m****c@u****u 58
Kaushik Kulkarni k****d@g****m 54
MaxThevenet m****t@l****v 28
Tyler Chang t****g@v****u 27
Ángel Ferran Pousa a****a@d****e 23
John-Luke Navarro j****e@a****u 15
Remi Lehe r****e@n****g 11
Nicole Neveu n****u@h****u 7
Stefan M Wild w****d@a****v 7
Stefan M Wild w****d@m****v 6
Katrina Petroske k****s@c****v 5
Barry Smith b****h@m****v 2
Todd Munson t****n@m****v 2
Miroslav Stoyanov 3****v 2
Katrina Petroske k****s@l****v 1
Caleb Ju c****u@g****m 1

Issues and Pull Requests

Last synced: 4 months ago

All Time
  • Total issues: 85
  • Total pull requests: 742
  • Average time to close issues: 5 months
  • Average time to close pull requests: 9 days
  • Total issue authors: 8
  • Total pull request authors: 10
  • Average comments per issue: 1.22
  • Average comments per pull request: 0.87
  • Merged pull requests: 571
  • Bot issues: 1
  • Bot pull requests: 242
Past Year
  • Issues: 12
  • Pull requests: 256
  • Average time to close issues: about 1 month
  • Average time to close pull requests: 7 days
  • Issue authors: 4
  • Pull request authors: 5
  • Average comments per issue: 0.42
  • Average comments per pull request: 0.77
  • Merged pull requests: 184
  • Bot issues: 1
  • Bot pull requests: 121
Top Authors
Issue Authors
  • jlnav (43)
  • shuds13 (30)
  • AngelFP (5)
  • jmlarson1 (3)
  • cchall (1)
  • dependabot[bot] (1)
  • SergeyYakubov (1)
  • n01r (1)
Pull Request Authors
  • dependabot[bot] (242)
  • jlnav (219)
  • shuds13 (181)
  • jmlarson1 (83)
  • AngelFP (8)
  • wildsm (4)
  • mkstoyanov (2)
  • roussel-ryan (1)
  • jbytecode (1)
  • danielskatz (1)
Top Labels
Issue Labels
enhancement (32) Platform-support (11) Release (11) Documentation (5) Testing (5) Experimental (4) question (4) bug (2) help wanted (1) Use-cases (1) dependencies (1) python (1)
Pull Request Labels
dependencies (241) python (140) github_actions (101) enhancement (21) Release (12) Testing (9) Documentation (7) Bugfix (7) Platform-support (5) Experimental (3) Use-cases (3)

Packages

  • Total packages: 2
  • Total downloads:
    • pypi 843 last-month
  • Total docker downloads: 133
  • Total dependent packages: 2
    (may contain duplicates)
  • Total dependent repositories: 24
    (may contain duplicates)
  • Total versions: 40
  • Total maintainers: 2
pypi.org: libensemble

A Python toolkit for coordinating asynchronous and dynamic ensembles of calculations.

  • Documentation: https://libensemble.readthedocs.io/en/main/
  • License: BSD 3-Clause License Copyright (c) 2018-2025, UChicago Argonne, LLC and the libEnsemble Development Team All Rights Reserved. Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission. ******************************************************************************** DISCLAIMER THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. ********************************************************************************
  • Latest release: 1.5.0
    published 9 months ago
  • Versions: 31
  • Dependent Packages: 1
  • Dependent Repositories: 22
  • Downloads: 843 Last month
  • Docker Downloads: 133
Rankings
Docker downloads count: 2.5%
Dependent repos count: 3.1%
Average: 7.1%
Dependent packages count: 7.4%
Forks count: 7.8%
Stargazers count: 9.2%
Downloads: 12.5%
Maintainers (2)
Last synced: 4 months ago
conda-forge.org: libensemble

libEnsemble is a Python library to coordinate the concurrent evaluation of dynamic ensembles of calculations. The library is developed to use massively parallel resources to accelerate the solution of design, decision, and inference problems and to expand the class of problems that can benefit from increased concurrency levels. libEnsemble aims for: Extreme scaling, Resilience/fault tolerance, Monitoring/killing jobs (and recovering resources), Portability and flexibility, Exploitation of persistent data/control flow.

  • Versions: 9
  • Dependent Packages: 1
  • Dependent Repositories: 2
Rankings
Dependent repos count: 20.0%
Dependent packages count: 28.9%
Average: 31.0%
Forks count: 34.5%
Stargazers count: 40.5%
Last synced: 4 months ago

Dependencies

docs/requirements.txt pypi
  • ipykernel *
  • sphinx ==2.4.1
  • sphinxcontrib-bibtex *
install/testing_requirements.txt pypi
  • coverage ==5.5 test
  • coveralls ==3.2.0 test
  • flake8 * test
  • mock ==4.0.3 test
  • pytest ==6.2.5 test
  • pytest-cov ==2.12.1 test
  • pytest-timeout ==1.4.2 test
  • python-dateutil * test
libensemble/tests/scaling_tests/warpx/requirements.txt pypi
  • libensemble * test
  • matplotlib * test
  • nlopt * test
  • numpy * test
  • scipy * test
  • yt * test
setup.py pypi
  • numpy *
install/misc_feature_requirements.txt pypi
  • PyYAML ==6.0
  • funcx ==1.0.4
  • tomli ==2.0.1
libensemble/tests/unit_tests/setup.py pypi
.github/workflows/basic.yml actions
  • actions/cache/restore v3 composite
  • actions/cache/save v3 composite
  • actions/checkout v4 composite
  • codecov/codecov-action v3 composite
  • conda-incubator/setup-miniconda v2 composite
  • crate-ci/typos v1.16.23 composite
.github/workflows/extra.yml actions
  • actions/cache/restore v3 composite
  • actions/cache/save v3 composite
  • actions/checkout v4 composite
  • codecov/codecov-action v3 composite
  • conda-incubator/setup-miniconda v2 composite
  • crate-ci/typos v1.16.23 composite
binder/environment.yml conda
  • jupyter_contrib_nbextensions
  • libensemble
  • mpi4py
  • numpy
  • openmpi
  • openmpi-mpicc