Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature/flatten asktell dict values #1409

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
42 commits
Select commit Hold shift + click to select a range
5acf6c7
Bump supercharge/redis-github-action from 1.7.0 to 1.8.0
dependabot[bot] Aug 14, 2024
748e16b
Fixing broken link
jmlarson1 Aug 15, 2024
aa0a976
nitpicky
jmlarson1 Aug 15, 2024
0129612
Merge pull request #1408 from Libensemble/docs/aug_15_2024
jmlarson1 Aug 15, 2024
ee2508e
initial commit, creating ask/tell gen unit test, base LibensembleGene…
jlnav Aug 16, 2024
070fc6f
add test, arrays become flattened dicts in np_to_list_dicts
jlnav Aug 16, 2024
a969f50
remove debug statement
jlnav Aug 16, 2024
6eb5fe8
additional attempts to unflatten the input dict...
jlnav Aug 16, 2024
1261274
fix index ordering, cleanup/complete tentatively unit test
jlnav Aug 19, 2024
d960b96
passthrough kwargs to superclasses, try to handle empty lists for sin…
jlnav Aug 19, 2024
3ce0ca2
better handling of multi-dim and single-dim output-array item assignm…
jlnav Aug 19, 2024
09cb4a6
comments
jlnav Aug 19, 2024
601f02c
adjust persistent_gen_wrapper, fix UniformSampleDicts
jlnav Aug 19, 2024
8b99cc1
bump pydantic versions, really trying to resolve warnings
jlnav Aug 20, 2024
b0c3107
only install balsam on pydantic 1
jlnav Aug 20, 2024
2aac3fa
various fixes to run the proxystore test on extra-ci
jlnav Aug 20, 2024
93615f5
Merge pull request #1410 from Libensemble/testing/bump_pydantic
jlnav Aug 20, 2024
d43ab66
Merge pull request #1411 from Libensemble/testing/redis_fixes
jlnav Aug 20, 2024
023ab0f
Merge pull request #1405 from Libensemble/dependabot/github_actions/d…
jmlarson1 Aug 20, 2024
6733fe5
fix ordering of parameters in implemented ask/tell classes and parent…
jlnav Aug 21, 2024
7466100
better detecting of combinable names, by stripping out the numeric su…
jlnav Aug 21, 2024
a612692
Bump globus-compute-sdk from 2.26.0 to 2.27.0
dependabot[bot] Aug 21, 2024
751de5e
deal with keys that end with integers, but aren't similar to any othe…
jlnav Aug 21, 2024
358b335
Merge pull request #1413 from Libensemble/dependabot/pip/develop/glob…
jmlarson1 Aug 22, 2024
be0af7c
Bump crate-ci/typos from 1.23.6 to 1.23.7
dependabot[bot] Aug 22, 2024
18e7079
keyword assignment of gen_specs to Surmise
jlnav Aug 22, 2024
41cedf3
Merge pull request #1415 from Libensemble/dependabot/github_actions/d…
jmlarson1 Aug 22, 2024
a34d589
forgot another keyword surmise assignment
jlnav Aug 22, 2024
60dd203
Bump crate-ci/typos from 1.23.7 to 1.24.1
dependabot[bot] Aug 23, 2024
364cf03
Merge pull request #1417 from Libensemble/dependabot/github_actions/d…
jmlarson1 Aug 26, 2024
5f33724
add unit test for awkward H and checking routine from shuds, add case…
jlnav Aug 26, 2024
41c16b7
add optional dtype argument for list_dicts_to_np to preempt "dtype di…
jlnav Aug 26, 2024
4860428
replace _to_array with list_dicts_to_np with dtype parameter. list_di…
jlnav Aug 26, 2024
ced8992
fix
jlnav Aug 26, 2024
5f6654b
better surmise link, no longer point to fork
jlnav Aug 28, 2024
cbfdf0b
Merge branch 'develop' into feature/flatten_asktell_dict_values
jlnav Aug 29, 2024
4261ca8
LibensembleGenerator can provide matching dtype for list_dicts_to_np,…
jlnav Aug 29, 2024
460bbe3
fix
jlnav Aug 29, 2024
7fdd8a6
ahhhh, just gen_specs['out']'s dtype isn't sufficient. persis_in, des…
jlnav Aug 29, 2024
69b0584
removing hardcoded gen_specs.out, removing hardcoded persis_info.nwor…
jlnav Sep 12, 2024
8c01ca9
clarify a comment
jlnav Sep 12, 2024
4541d8a
as discussed, currently gen_specs['out'] must be provided to a gen in…
jlnav Sep 12, 2024
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
12 changes: 6 additions & 6 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,28 +18,28 @@ jobs:
os: [ubuntu-latest]
mpi-version: [mpich]
python-version: [3.9, "3.10", "3.11", "3.12"]
pydantic-version: ["2.6.4"]
pydantic-version: ["2.8.2"]
comms-type: [m, l]
include:
- os: macos-latest
python-version: "3.11"
mpi-version: mpich
pydantic-version: "2.6.4"
pydantic-version: "2.8.2"
comms-type: m
- os: macos-latest
python-version: "3.11"
mpi-version: mpich
pydantic-version: "2.6.4"
pydantic-version: "2.8.2"
comms-type: l
- os: ubuntu-latest
mpi-version: mpich
python-version: "3.10"
pydantic-version: "1.10.13"
pydantic-version: "1.10.17"
comms-type: m
- os: ubuntu-latest
mpi-version: mpich
python-version: "3.10"
pydantic-version: "1.10.13"
pydantic-version: "1.10.17"
comms-type: l

env:
Expand Down Expand Up @@ -163,4 +163,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.23.6
- uses: crate-ci/typos@v1.24.1
43 changes: 29 additions & 14 deletions .github/workflows/extra.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,38 +12,38 @@ jobs:
os: [ubuntu-latest]
mpi-version: [mpich]
python-version: [3.9, "3.10", "3.11", "3.12"]
pydantic-version: ["2.6.4"]
pydantic-version: ["2.8.2"]
comms-type: [m, l]
include:
- os: macos-latest
python-version: 3.11
mpi-version: mpich
pydantic-version: "2.6.4"
pydantic-version: "2.8.2"
comms-type: m
- os: macos-latest
python-version: 3.11
mpi-version: mpich
pydantic-version: "2.6.4"
pydantic-version: "2.8.2"
comms-type: l
- os: ubuntu-latest
python-version: "3.10"
mpi-version: mpich
pydantic-version: "2.6.4"
pydantic-version: "2.8.2"
comms-type: t
- os: ubuntu-latest
mpi-version: "openmpi"
pydantic-version: "2.6.4"
pydantic-version: "2.8.2"
python-version: "3.12"
comms-type: l
- os: ubuntu-latest
mpi-version: mpich
python-version: "3.10"
pydantic-version: "1.10.13"
pydantic-version: "1.10.17"
comms-type: m
- os: ubuntu-latest
mpi-version: mpich
python-version: "3.10"
pydantic-version: "1.10.13"
pydantic-version: "1.10.17"
comms-type: l

env:
Expand Down Expand Up @@ -157,16 +157,20 @@ jobs:
pip install git+https://github.com/jlnav/dragonfly.git@fix/remove_npobject
pip install scikit-build packaging Tasmanian --user

- name: Install other testing dependencies
- name: Install Balsam on Pydantic 1
if: matrix.pydantic-version == '1.10.17'
run: |
conda install octave
conda install pyzmq
pip install -r install/testing_requirements.txt
pip install -r install/misc_feature_requirements.txt
git clone https://github.com/argonne-lcf/balsam.git
sed -i -e "s/pyzmq>=22.1.0,<23.0.0/pyzmq>=23.0.0,<24.0.0/" ./balsam/setup.cfg
cd balsam; pip install -e .; cd ..

- name: Install other testing dependencies
run: |
conda install octave
pip install -r install/testing_requirements.txt
pip install -r install/misc_feature_requirements.txt

git clone --recurse-submodules -b develop https://github.com/POptUS/IBCDFO.git
pushd IBCDFO/minq/py/minq5/
export PYTHONPATH="$PYTHONPATH:$(pwd)"
Expand Down Expand Up @@ -224,15 +228,26 @@ jobs:
rm ./libensemble/tests/regression_tests/test_persistent_tasmanian.py
rm ./libensemble/tests/regression_tests/test_persistent_tasmanian_async.py

- name: Remove Balsam/Globus-compute tests on Pydantic 2
- name: Install redis/proxystore on Pydantic 2
if: matrix.pydantic-version == '2.6.4'
run: |
pip install redis
pip install proxystore==0.7.0

- name: Remove proxystore test on Pydantic 1
if: matrix.pydantic-version == '1.10.13'
run: |
rm ./libensemble/tests/regression_tests/test_proxystore_integration.py

- name: Remove Balsam/Globus-compute tests on Pydantic 2
if: matrix.pydantic-version == '2.8.2'
run: |
rm ./libensemble/tests/unit_tests/test_ufunc_runners.py
rm ./libensemble/tests/unit_tests/test_executor_balsam.py

- name: Start Redis
if: matrix.os == 'ubuntu-latest'
uses: supercharge/redis-github-action@1.7.0
uses: supercharge/redis-github-action@1.8.0
with:
redis-version: 7

Expand Down Expand Up @@ -261,4 +276,4 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: crate-ci/typos@v1.23.6
- uses: crate-ci/typos@v1.24.1
2 changes: 1 addition & 1 deletion docs/FAQ.rst
Original file line number Diff line number Diff line change
Expand Up @@ -305,7 +305,7 @@ macOS and Windows Errors

.. _Installing PETSc On Microsoft Windows: https://petsc.org/release/install/windows/#recommended-installation-methods
.. _option to srun: https://docs.nersc.gov/systems/perlmutter/running-jobs/#single-gpu-tasks-in-parallel
.. _Perlmutter: https://docs.nersc.gov/systems/perlmutter
.. _Perlmutter: https://docs.nersc.gov/systems/perlmutter/architecture/
.. _Python multiprocessing docs: https://docs.python.org/3/library/multiprocessing.html
.. _SDF: https://sdf.slac.stanford.edu/public/doc/#/?id=what-is-the-sdf
.. _Support: https://libensemble.readthedocs.io/en/main/introduction.html#resources
Expand Down
10 changes: 3 additions & 7 deletions docs/examples/surmise.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,15 +2,11 @@ persistent_surmise
------------------

Required: Surmise_

Note that currently the github fork https://github.com/mosesyhc/surmise should be used::

pip install --upgrade git+https://github.com/bandframework/surmise.git@develop

The :doc:`Borehole Calibration tutorial<../tutorials/calib_cancel_tutorial>` uses this generator as an example of the capability to cancel pending simulations.
The :doc:`Borehole Calibration tutorial<../tutorials/calib_cancel_tutorial>` uses this generator as an
example of the capability to cancel pending simulations.

.. automodule:: persistent_surmise_calib
:members:
:no-undoc-members:

.. _Surmise: https://surmise.readthedocs.io/en/latest/index.html
.. _Surmise: https://github.com/bandframework/surmise
1 change: 1 addition & 0 deletions docs/nitpicky
Original file line number Diff line number Diff line change
Expand Up @@ -43,6 +43,7 @@ py:class libensemble.resources.platforms.Aurora
py:class libensemble.resources.platforms.GenericROCm
py:class libensemble.resources.platforms.Crusher
py:class libensemble.resources.platforms.Frontier
py:class libensemble.resources.platforms.Perlmutter
py:class libensemble.resources.platforms.PerlmutterCPU
py:class libensemble.resources.platforms.PerlmutterGPU
py:class libensemble.resources.platforms.Polaris
Expand Down
2 changes: 1 addition & 1 deletion docs/platforms/perlmutter.rst
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,7 @@ See the NERSC Perlmutter_ docs for more information about Perlmutter.
.. _mpi4py: https://mpi4py.readthedocs.io/en/stable/
.. _NERSC: https://www.nersc.gov/
.. _option to srun: https://docs.nersc.gov/systems/perlmutter/running-jobs/#single-gpu-tasks-in-parallel
.. _Perlmutter: https://docs.nersc.gov/systems/perlmutter/
.. _Perlmutter: https://docs.nersc.gov/systems/perlmutter/architecture/
.. _Python on Perlmutter: https://docs.nersc.gov/development/languages/python/using-python-perlmutter/
.. _Slurm: https://slurm.schedmd.com/
.. _video: https://www.youtube.com/watch?v=Av8ctYph7-Y
3 changes: 1 addition & 2 deletions install/misc_feature_requirements.txt
Original file line number Diff line number Diff line change
@@ -1,2 +1 @@
globus-compute-sdk==2.26.0
proxystore==0.7.0
globus-compute-sdk==2.27.0
9 changes: 3 additions & 6 deletions libensemble/gen_classes/aposmm.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,13 +14,11 @@
"""

def __init__(
self, gen_specs: dict = {}, History: npt.NDArray = [], persis_info: dict = {}, libE_info: dict = {}, **kwargs
self, History: npt.NDArray = [], persis_info: dict = {}, gen_specs: dict = {}, libE_info: dict = {}, **kwargs
) -> None:
from libensemble.gen_funcs.persistent_aposmm import aposmm

gen_specs["gen_f"] = aposmm
if len(kwargs) > 0: # so user can specify aposmm-specific parameters as kwargs to constructor
gen_specs["user"] = kwargs
if not gen_specs.get("out"): # gen_specs never especially changes for aposmm even as the problem varies
n = len(kwargs["lb"]) or len(kwargs["ub"])
gen_specs["out"] = [
Expand All @@ -32,9 +30,8 @@
]
gen_specs["persis_in"] = ["x", "f", "local_pt", "sim_id", "sim_ended", "x_on_cube", "local_min"]
if not persis_info:
persis_info = add_unique_random_streams({}, 4, seed=4321)[1]
persis_info["nworkers"] = 4
super().__init__(gen_specs, History, persis_info, libE_info)
persis_info = add_unique_random_streams({}, 2, seed=4321)[1]
super().__init__(History, persis_info, gen_specs, libE_info, **kwargs)
self.all_local_minima = []
self.results_idx = 0
self.last_ask = None
Expand All @@ -53,11 +50,11 @@
self.all_local_minima.append(self.last_ask[min_idxs])
self.last_ask = self.last_ask[~min_idxs]
if num_points > 0: # we've been asked for a selection of the last ask
results = np.copy(

Check warning on line 53 in libensemble/gen_classes/aposmm.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/aposmm.py#L53

Added line #L53 was not covered by tests
self.last_ask[self.results_idx : self.results_idx + num_points]
) # if resetting last_ask later, results may point to "None"
self.results_idx += num_points
return results

Check warning on line 57 in libensemble/gen_classes/aposmm.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/aposmm.py#L56-L57

Added lines #L56 - L57 were not covered by tests
results = np.copy(self.last_ask)
self.results = results
self.last_ask = None
Expand Down
11 changes: 4 additions & 7 deletions libensemble/gen_classes/sampling.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,8 @@ class UniformSample(SampleBase):
mode by adjusting the allocation function.
"""

def __init__(self, _, persis_info, gen_specs, libE_info=None):
self.persis_info = persis_info
self.gen_specs = gen_specs
self.libE_info = libE_info
def __init__(self, _=[], persis_info={}, gen_specs={}, libE_info=None, **kwargs):
super().__init__(_, persis_info, gen_specs, libE_info, **kwargs)
self._get_user_params(self.gen_specs["user"])

def ask_numpy(self, n_trials):
Expand All @@ -57,10 +55,9 @@ class UniformSampleDicts(Generator):
mode by adjusting the allocation function.
"""

def __init__(self, _, persis_info, gen_specs, libE_info=None):
self.persis_info = persis_info
def __init__(self, _, persis_info, gen_specs, libE_info=None, **kwargs):
self.gen_specs = gen_specs
self.libE_info = libE_info
self.persis_info = persis_info
self._get_user_params(self.gen_specs["user"])

def ask(self, n_trials):
Expand Down
4 changes: 2 additions & 2 deletions libensemble/gen_classes/surmise.py
Original file line number Diff line number Diff line change
Expand Up @@ -14,47 +14,47 @@
"""

def __init__(
self, gen_specs: dict, History: npt.NDArray = [], persis_info: dict = {}, libE_info: dict = {}
self, History: npt.NDArray = [], persis_info: dict = {}, gen_specs: dict = {}, libE_info: dict = {}
) -> None:
from libensemble.gen_funcs.persistent_surmise_calib import surmise_calib

Check warning on line 19 in libensemble/gen_classes/surmise.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/surmise.py#L19

Added line #L19 was not covered by tests

gen_specs["gen_f"] = surmise_calib

Check warning on line 21 in libensemble/gen_classes/surmise.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/surmise.py#L21

Added line #L21 was not covered by tests
if ("sim_id", int) not in gen_specs["out"]:
gen_specs["out"].append(("sim_id", int))
super().__init__(gen_specs, History, persis_info, libE_info)
super().__init__(History, persis_info, gen_specs, libE_info)
self.sim_id_index = 0
self.all_cancels = []

Check warning on line 26 in libensemble/gen_classes/surmise.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/surmise.py#L23-L26

Added lines #L23 - L26 were not covered by tests

def _add_sim_ids(self, array: npt.NDArray) -> npt.NDArray:
array["sim_id"] = np.arange(self.sim_id_index, self.sim_id_index + len(array))
self.sim_id_index += len(array)
return array

Check warning on line 31 in libensemble/gen_classes/surmise.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/surmise.py#L29-L31

Added lines #L29 - L31 were not covered by tests

def ready_to_be_asked(self) -> bool:
"""Check if the generator has the next batch of points ready."""
return not self.outbox.empty()

Check warning on line 35 in libensemble/gen_classes/surmise.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/surmise.py#L35

Added line #L35 was not covered by tests

def ask_numpy(self, *args) -> npt.NDArray:
"""Request the next set of points to evaluate, as a NumPy array."""
output = super().ask_numpy()

Check warning on line 39 in libensemble/gen_classes/surmise.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/surmise.py#L39

Added line #L39 was not covered by tests
if "cancel_requested" in output.dtype.names:
cancels = output
got_cancels_first = True
self.all_cancels.append(cancels)

Check warning on line 43 in libensemble/gen_classes/surmise.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/surmise.py#L41-L43

Added lines #L41 - L43 were not covered by tests
else:
self.results = self._add_sim_ids(output)
got_cancels_first = False
try:
_, additional = self.outbox.get(timeout=0.2) # either cancels or new points

Check warning on line 48 in libensemble/gen_classes/surmise.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/surmise.py#L45-L48

Added lines #L45 - L48 were not covered by tests
if got_cancels_first:
return additional["calc_out"]
self.all_cancels.append(additional["calc_out"])
return self.results
except thread_queue.Empty:
return self.results

Check warning on line 54 in libensemble/gen_classes/surmise.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/surmise.py#L50-L54

Added lines #L50 - L54 were not covered by tests

def ask_updates(self) -> List[npt.NDArray]:
"""Request a list of NumPy arrays containing points that should be cancelled by the workflow."""
cancels = copy.deepcopy(self.all_cancels)
self.all_cancels = []
return cancels

Check warning on line 60 in libensemble/gen_classes/surmise.py

View check run for this annotation

Codecov / codecov/patch

libensemble/gen_classes/surmise.py#L58-L60

Added lines #L58 - L60 were not covered by tests
10 changes: 2 additions & 8 deletions libensemble/gen_funcs/persistent_gen_wrapper.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,8 @@
import inspect

import numpy as np

from libensemble.message_numbers import EVAL_GEN_TAG, FINISHED_PERSISTENT_GEN_TAG, PERSIS_STOP, STOP_TAG
from libensemble.tools.persistent_support import PersistentSupport
from libensemble.utils.misc import np_to_list_dicts
from libensemble.utils.misc import list_dicts_to_np, np_to_list_dicts


def persistent_gen_f(H, persis_info, gen_specs, libE_info):
Expand All @@ -24,11 +22,7 @@ def persistent_gen_f(H, persis_info, gen_specs, libE_info):
while tag not in [STOP_TAG, PERSIS_STOP]:
H_o = gen.ask(b)
if isinstance(H_o, list):
H_o_arr = np.zeros(len(H_o), dtype=gen_specs["out"])
for i in range(len(H_o)):
for key in H_o[0].keys():
H_o_arr[i][key] = H_o[i][key]
H_o = H_o_arr
H_o = list_dicts_to_np(H_o)
tag, Work, calc_in = ps.send_recv(H_o)
gen.tell(np_to_list_dicts(calc_in))

Expand Down
18 changes: 16 additions & 2 deletions libensemble/generators.py
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@
from libensemble.comms.comms import QComm, QCommThread
from libensemble.executors import Executor
from libensemble.message_numbers import EVAL_GEN_TAG, PERSIS_STOP
from libensemble.tools.tools import add_unique_random_streams
from libensemble.utils.misc import list_dicts_to_np, np_to_list_dicts

"""
Expand Down Expand Up @@ -90,6 +91,17 @@ class LibensembleGenerator(Generator):
``ask_numpy/tell_numpy`` methods communicate numpy arrays containing the same data.
"""

def __init__(
self, History: npt.NDArray = [], persis_info: dict = {}, gen_specs: dict = {}, libE_info: dict = {}, **kwargs
):
self.gen_specs = gen_specs
if len(kwargs) > 0: # so user can specify gen-specific parameters as kwargs to constructor
self.gen_specs["user"] = kwargs
if not persis_info:
self.persis_info = add_unique_random_streams({}, 4, seed=4321)[1]
else:
self.persis_info = persis_info

@abstractmethod
def ask_numpy(self, num_points: Optional[int] = 0) -> npt.NDArray:
"""Request the next set of points to evaluate, as a NumPy array."""
Expand All @@ -105,6 +117,8 @@ def ask(self, num_points: Optional[int] = 0) -> List[dict]:
def tell(self, results: List[dict]) -> None:
"""Send the results of evaluations to the generator."""
self.tell_numpy(list_dicts_to_np(results))
# Note that although we'd prefer to have a complete dtype available, the gen
# doesn't have access to sim_specs["out"] currently.


class LibensembleGenThreadInterfacer(LibensembleGenerator):
Expand All @@ -113,10 +127,10 @@ class LibensembleGenThreadInterfacer(LibensembleGenerator):
"""

def __init__(
self, gen_specs: dict, History: npt.NDArray = [], persis_info: dict = {}, libE_info: dict = {}
self, History: npt.NDArray = [], persis_info: dict = {}, gen_specs: dict = {}, libE_info: dict = {}, **kwargs
) -> None:
super().__init__(History, persis_info, gen_specs, libE_info, **kwargs)
self.gen_f = gen_specs["gen_f"]
self.gen_specs = gen_specs
self.History = History
self.persis_info = persis_info
self.libE_info = libE_info
Expand Down
2 changes: 1 addition & 1 deletion libensemble/tests/regression_tests/test_asktell_surmise.py
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@
}

persis_info = add_unique_random_streams({}, 5)
surmise = Surmise(gen_specs, persis_info=persis_info[1]) # we add sim_id as a field to gen_specs["out"]
surmise = Surmise(gen_specs=gen_specs, persis_info=persis_info[1]) # we add sim_id as a field to gen_specs["out"]
surmise.setup()

initial_sample = surmise.ask()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,7 +126,7 @@
}

persis_info = add_unique_random_streams({}, nworkers + 1)
gen_specs["generator"] = Surmise(gen_specs, persis_info=persis_info)
gen_specs["generator"] = Surmise(gen_specs=gen_specs, persis_info=persis_info)

exit_criteria = {"sim_max": max_evals}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,10 @@
"""

# Do not change these lines - they are parsed by run-tests.sh
# TESTSUITE_COMMS: local
# TESTSUITE_COMMS: local mpi
# TESTSUITE_NPROCS: 4
# TESTSUITE_OS_SKIP: OSX WIN
# TESTSUITE_EXTRA: true
# TESTSUITE_EXCLUDE: true

from pathlib import Path

Expand All @@ -39,7 +38,7 @@ def insert_proxy(H0):
)

store = get_store("my-store")
picture = Path("libE_logo.png").read_bytes()
picture = Path("libE_logo.png").absolute().read_bytes()
proxy = store.proxy(picture)
for i in range(len(H0)):
H0[i]["proxy"] = proxy
Expand Down
2 changes: 1 addition & 1 deletion libensemble/tests/run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -154,7 +154,7 @@ cleanup() {
filelist=(nodelist_*); [ -e ${filelist[0]} ] && rm nodelist_*
filelist=(x_*.txt y_*.txt); [ -e ${filelist[0]} ] && rm x_*.txt y_*.txt
filelist=(opt_*.txt_flag); [ -e ${filelist[0]} ] && rm opt_*.txt_flag
filelist=(*.png); [ -e ${filelist[0]} ] && rm *.png
filelist=(logo_id*.png); [ -e ${filelist[0]} ] && rm logo_id*.png
done
cd $THISDIR
}
Expand Down
Loading
Loading