Skip to content

Commit c983f85

Browse files
authored
Merge pull request #1368 from Libensemble/release/v_1.4.0
Release/v 1.4.0
2 parents 99934db + d8fcc07 commit c983f85

81 files changed

Lines changed: 1905 additions & 1343 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.codecov.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
ignore:
22
- "libensemble/tools/parse_args.py"
33
- "libensemble/tools/forkable_pdb.py"
4+
- "libensemble/tools/live_data/*"
45
- "libensemble/sim_funcs/executor_hworld.py"
6+
- "libensemble/gen_funcs/persistent_ax_multitask.py"
7+
- "libensemble/gen_funcs/persistent_gpCAM.py"

.flake8

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ per-file-ignores =
4444
libensemble/tests/functionality_tests/test_stats_output.py:E402
4545
libensemble/tests/functionality_tests/test_active_persistent_worker_abort.py:E402
4646
libensemble/tests/unit_tests/test_persistent_aposmm.py:E402
47+
libensemble/tests/unit_tests/RENAME_test_persistent_aposmm.py:E402
4748

4849
# Allow undefined name '__version__'
4950
setup.py:F821

.github/workflows/basic.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,12 +23,12 @@ jobs:
2323
include:
2424
- os: macos-latest
2525
python-version: "3.11"
26-
mpi-version: "mpich=4.2.1"
26+
mpi-version: mpich
2727
pydantic-version: "2.6.4"
2828
comms-type: m
2929
- os: macos-latest
3030
python-version: "3.11"
31-
mpi-version: "mpich=4.2.1"
31+
mpi-version: mpich
3232
pydantic-version: "2.6.4"
3333
comms-type: l
3434
- os: ubuntu-latest
@@ -163,4 +163,4 @@ jobs:
163163
runs-on: ubuntu-latest
164164
steps:
165165
- uses: actions/checkout@v4
166-
- uses: crate-ci/typos@v1.20.10
166+
- uses: crate-ci/typos@v1.23.3

.github/workflows/extra.yml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,17 +17,17 @@ jobs:
1717
include:
1818
- os: macos-latest
1919
python-version: 3.11
20-
mpi-version: "mpich=4.2.0"
20+
mpi-version: mpich
2121
pydantic-version: "2.6.4"
2222
comms-type: m
2323
- os: macos-latest
2424
python-version: 3.11
25-
mpi-version: "mpich=4.2.0"
25+
mpi-version: mpich
2626
pydantic-version: "2.6.4"
2727
comms-type: l
2828
- os: ubuntu-latest
2929
python-version: "3.10"
30-
mpi-version: "mpich"
30+
mpi-version: mpich
3131
pydantic-version: "2.6.4"
3232
comms-type: t
3333
- os: ubuntu-latest
@@ -110,12 +110,12 @@ jobs:
110110
- name: Install generator dependencies
111111
run: |
112112
python -m pip install --upgrade pip
113-
pip install mpmath matplotlib ax-platform
113+
pip install mpmath
114+
pip install matplotlib
114115
conda env update --file install/gen_deps_environment.yml
115116
116-
- name: Install ax-platform
117-
run: |
118-
pip install ax-platform
117+
#- name: Install ax-platform
118+
# run: pip install "ax-platform<=0.4.0"
119119

120120
- name: Install gpcam
121121
if: matrix.python-version != '3.12'
@@ -214,7 +214,7 @@ jobs:
214214
if: matrix.python-version >= '3.11'
215215
run: |
216216
rm ./libensemble/tests/regression_tests/test_ytopt_heffte.py
217-
rm ./libensemble/tests/regression_tests/test_gpCAM.py
217+
# rm ./libensemble/tests/regression_tests/test_gpCAM.py
218218
rm ./libensemble/tests/regression_tests/test_persistent_gp.py
219219
220220
- name: Remove test for persistent Tasmanian on Python 3.12
@@ -254,4 +254,4 @@ jobs:
254254
runs-on: ubuntu-latest
255255
steps:
256256
- uses: actions/checkout@v4
257-
- uses: crate-ci/typos@v1.20.10
257+
- uses: crate-ci/typos@v1.23.3

.wci.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ description: |
1616
language: Python
1717

1818
release:
19-
version: 1.3.0
20-
date: 2024-05-01
19+
version: 1.4.0
20+
date: 2024-07-25
2121

2222
documentation:
2323
general: https://libensemble.readthedocs.io

CHANGELOG.rst

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,41 @@ GitHub issues are referenced, and can be viewed with hyperlinks on the `github r
88

99
.. _`github releases page`: https://github.com/Libensemble/libensemble/releases
1010

11+
Release 1.4.0
12+
--------------
13+
14+
:Date: July 25, 2024
15+
16+
* Add a ``live_data`` option for real-time data collection / plotting. #1310
17+
* ``nworkers``/``is_manager`` are set when ``Ensemble`` object is created. #1331/ #1336
18+
* This update locks the comms method when ``Ensemble`` object is created.
19+
* Add a ``group_size`` option to deal with unevenly resourced nodes. #1349
20+
* Bug fix: Fix shutdown hang on worker error when using ``gen_on_manager``. #1348
21+
* Bug fix: Log level was locked to ``INFO`` when using class interface.
22+
* Updated code to support ``numpy`` 2.0.
23+
24+
Documentation:
25+
26+
* Notebook examples with Colab links added to documentation. #1310
27+
* E.g., https://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/tutorials/aposmm/aposmm_tutorial_notebook.ipynb
28+
* Example of templating input files added to forces tutorial. #1310
29+
30+
Example user functions:
31+
32+
* Update ``gpCAM`` generators to work with latest interface.
33+
* Change ``one_d_func`` to ``norm_eval``. Works with multiple dimensions. #1352 / #1354
34+
35+
:Note:
36+
37+
* Tests were run on Linux and MacOS with Python versions 3.9, 3.10, 3.11, 3.12
38+
* Heterogeneous workflows tested on Frontier (OLCF), Polaris (ALCF), and Perlmutter (NERSC).
39+
* Note that tests have been recently run on Aurora (ALCF), but the system was unavailable at time of release.
40+
* Tests were also run on Bebop and Improv LCRC systems.
41+
42+
:Known Issues:
43+
44+
* See known issues section in the documentation.
45+
1146
Release 1.3.0
1247
--------------
1348

README.rst

Lines changed: 72 additions & 33 deletions
Original file line numberDiff line numberDiff line change
@@ -36,42 +36,68 @@ Basic Usage
3636
===========
3737

3838
Create an ``Ensemble``, then customize it with general settings, simulation and generator parameters,
39-
and an exit condition. Run the following via ``python this_file.py --comms local --nworkers 4``:
39+
and an exit condition. Run the following four-worker example via ``python this_file.py``:
4040

4141
.. code-block:: python
4242
43-
import numpy as np
44-
45-
from libensemble import Ensemble
46-
from libensemble.gen_funcs.sampling import uniform_random_sample
47-
from libensemble.sim_funcs.six_hump_camel import six_hump_camel
48-
from libensemble.specs import ExitCriteria, GenSpecs, SimSpecs
49-
from libensemble.tools import add_unique_random_streams
50-
51-
if __name__ == "__main__":
52-
sampling = Ensemble(parse_args=True)
53-
sampling.sim_specs = SimSpecs(
54-
sim_f=six_hump_camel,
55-
inputs=["x"],
56-
outputs=[("f", float)],
57-
)
58-
sampling.gen_specs = GenSpecs(
59-
gen_f=uniform_random_sample,
60-
outputs=[("x", float, (2,))],
61-
user={
62-
"gen_batch_size": 500,
63-
"lb": np.array([-3, -2]),
64-
"ub": np.array([3, 2]),
65-
},
66-
)
67-
68-
sampling.persis_info = add_unique_random_streams({}, sampling.nworkers + 1)
69-
sampling.exit_criteria = ExitCriteria(sim_max=101)
70-
sampling.run()
71-
sampling.save_output(__file__)
72-
73-
if sampling.is_manager:
74-
print("Some output data:\n", sampling.H[["x", "f"]][:10])
43+
import numpy as np
44+
45+
from libensemble import Ensemble
46+
from libensemble.gen_funcs.sampling import uniform_random_sample
47+
from libensemble.sim_funcs.six_hump_camel import six_hump_camel
48+
from libensemble.specs import ExitCriteria, GenSpecs, LibeSpecs, SimSpecs
49+
50+
if __name__ == "__main__":
51+
52+
libE_specs = LibeSpecs(nworkers=4)
53+
54+
sim_specs = SimSpecs(
55+
sim_f=six_hump_camel,
56+
inputs=["x"],
57+
outputs=[("f", float)],
58+
)
59+
60+
gen_specs = GenSpecs(
61+
gen_f=uniform_random_sample,
62+
outputs=[("x", float, (2,))],
63+
user={
64+
"gen_batch_size": 50,
65+
"lb": np.array([-3, -2]),
66+
"ub": np.array([3, 2]),
67+
},
68+
)
69+
70+
exit_criteria = ExitCriteria(sim_max=100)
71+
72+
sampling = Ensemble(
73+
libE_specs=libE_specs,
74+
sim_specs=sim_specs,
75+
gen_specs=gen_specs,
76+
exit_criteria=exit_criteria,
77+
)
78+
79+
sampling.add_random_streams()
80+
sampling.run()
81+
82+
if sampling.is_manager:
83+
sampling.save_output(__file__)
84+
print("Some output data:\n", sampling.H[["x", "f"]][:10])
85+
86+
|Inline Example|
87+
88+
Try some other examples live in Colab.
89+
90+
+---------------------------------------------------------------+-------------------------------------+
91+
| Description | Try online |
92+
+===============================================================+=====================================+
93+
| Simple Ensemble that makes a Sine wave. | |Simple Ensemble| |
94+
+---------------------------------------------------------------+-------------------------------------+
95+
| Ensemble with an MPI application. | |Ensemble with an MPI application| |
96+
+---------------------------------------------------------------+-------------------------------------+
97+
| Optimization example that finds multiple minima. | |Optimization example| |
98+
+---------------------------------------------------------------+-------------------------------------+
99+
100+
There are many more examples in the `regression tests`_.
75101

76102
Resources
77103
=========
@@ -139,3 +165,16 @@ Resources
139165
.. _PyPI: https://pypi.org
140166
.. _Quickstart: https://libensemble.readthedocs.io/en/main/introduction.html
141167
.. _ReadtheDocs: http://libensemble.readthedocs.org/
168+
.. _regression tests: https://github.com/Libensemble/libensemble/tree/main/libensemble/tests/regression_tests
169+
170+
.. |Inline Example| image:: https://colab.research.google.com/assets/colab-badge.svg
171+
:target: http://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/readme_notebook.ipynb
172+
173+
.. |Simple Ensemble| image:: https://colab.research.google.com/assets/colab-badge.svg
174+
:target: http://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/tutorials/simple_sine/sine_tutorial_notebook.ipynb
175+
176+
.. |Ensemble with an MPI application| image:: https://colab.research.google.com/assets/colab-badge.svg
177+
:target: http://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/tutorials/forces_with_executor/forces_tutorial_notebook.ipynb
178+
179+
.. |Optimization example| image:: https://colab.research.google.com/assets/colab-badge.svg
180+
:target: http://colab.research.google.com/github/Libensemble/libensemble/blob/develop/examples/tutorials/aposmm/aposmm_tutorial_notebook.ipynb

docs/FAQ.rst

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,15 @@ We recommend using the following options to help debug workflows::
1313
logger.set_level("DEBUG")
1414
libE_specs["safe_mode"] = True
1515

16+
To make it easier to debug a generator try setting the **libE_specs** option ``gen_on_manager``.
17+
To do so, add the following to your calling script::
18+
19+
libE_specs["gen_on_manager"] = True
20+
21+
With this, ``pdb`` breakpoints can be set as usual in the generator.
22+
23+
For more debugging options see "How can I debug specific libEnsemble processes?" below.
24+
1625
Common Errors
1726
-------------
1827

docs/advanced_installation.rst

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,6 @@ The following packages may be installed separately to enable additional features
176176
* Balsam_ - Manage and submit applications to the Balsam service with our :ref:`BalsamExecutor<balsam-exctr>`
177177
* pyyaml_ and tomli_ - Parameterize libEnsemble via yaml or toml
178178
* `Globus Compute`_ - Submit simulation or generator function instances to remote Globus Compute endpoints
179-
* `psi-j-python`_ and `tqdm`_ - Use `liberegister` and `libesubmit` to submit libEnsemble jobs to any scheduler
180179

181180
.. _Balsam: https://balsam.readthedocs.io/en/latest/
182181
.. _conda-forge: https://conda-forge.org/
@@ -186,7 +185,6 @@ The following packages may be installed separately to enable additional features
186185
.. _MPICH: https://www.mpich.org/
187186
.. _NumPy: http://www.numpy.org
188187
.. _Open MPI: https://www.open-mpi.org/
189-
.. _psi-j-python: https://github.com/ExaWorks/psi-j-python
190188
.. _psutil: https://pypi.org/project/psutil/
191189
.. _pydantic: https://docs.pydantic.dev/1.10/
192190
.. _PyPI: https://pypi.org

docs/conf.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,13 @@ def __getattr__(cls, name):
3434
MOCK_MODULES = [
3535
"argparse",
3636
"dfols",
37+
"IPython",
38+
"IPython.display",
39+
"IPython.core",
40+
"IPython.core.pylabtools",
3741
"math",
42+
"matplotlib",
43+
"matplotlib.pyplot",
3844
"mpi4py",
3945
"mpmath",
4046
"nlopt",
@@ -69,6 +75,7 @@ def __getattr__(cls, name):
6975
sys.path.append(os.path.abspath("../libensemble/comms"))
7076
sys.path.append(os.path.abspath("../libensemble/utils"))
7177
sys.path.append(os.path.abspath("../libensemble/tools"))
78+
sys.path.append(os.path.abspath("../libensemble/tools/live_data"))
7279
sys.path.append(os.path.abspath("../libensemble/executors"))
7380
sys.path.append(os.path.abspath("../libensemble/resources"))
7481
# print(sys.path)

0 commit comments

Comments
 (0)