Skip to content

Commit eacf46f

Browse files
committed
Merge branch 'bugfix/ensemble_libE_specs_attrs_passthrough' into refactor/user_function_handling_modules
2 parents aa4db8a + dbdf88f commit eacf46f

File tree

5 files changed

+14
-8
lines changed

5 files changed

+14
-8
lines changed

.github/workflows/basic.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -167,4 +167,4 @@ jobs:
167167
runs-on: ubuntu-latest
168168
steps:
169169
- uses: actions/checkout@v4
170-
- uses: crate-ci/typos@v1.18.2
170+
- uses: crate-ci/typos@v1.19.0

.github/workflows/extra.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -250,4 +250,4 @@ jobs:
250250
runs-on: ubuntu-latest
251251
steps:
252252
- uses: actions/checkout@v4
253-
- uses: crate-ci/typos@v1.18.2
253+
- uses: crate-ci/typos@v1.19.0
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
globus-compute-sdk==2.13.0
1+
globus-compute-sdk==2.14.0

install/testing_requirements.txt

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
flake8==7.0.0
22
coverage==7.3.1
3-
pytest==8.0.1
3+
pytest==8.1.1
44
pytest-cov==4.1.0
5-
pytest-timeout==2.2.0
5+
pytest-timeout==2.3.1
66
mock==5.1.0
7-
python-dateutil==2.8.2
7+
python-dateutil==2.9.0.post0
88
anyio==4.3.0
99
matplotlib==3.8.3

libensemble/ensemble.py

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -326,8 +326,14 @@ def libE_specs(self, new_specs):
326326
return
327327

328328
# Cast new libE_specs temporarily to dict
329-
if not isinstance(new_specs, dict):
330-
new_specs = specs_dump(new_specs, by_alias=True, exclude_none=True, exclude_defaults=True)
329+
if not isinstance(new_specs, dict): # exclude_defaults should only be enabled with Pydantic v2
330+
platform_specs_set = False
331+
if new_specs.platform_specs != {}: # bugginess across Pydantic versions for recursively casting to dict
332+
platform_specs_set = True
333+
platform_specs = new_specs.platform_specs
334+
new_specs = specs_dump(new_specs, exclude_none=True, exclude_defaults=True)
335+
if platform_specs_set:
336+
new_specs["platform_specs"] = specs_dump(platform_specs, exclude_none=True)
331337

332338
# Unset "comms" if we already have a libE_specs that contains that field, that came from parse_args
333339
if new_specs.get("comms") and hasattr(self._libE_specs, "comms") and self.parsed:

0 commit comments

Comments
 (0)