Skip to content

Commit

Permalink
as we set a new libE_specs, cast internal libE_specs to class
Browse files Browse the repository at this point in the history
  • Loading branch information
jlnav committed Jul 12, 2023
1 parent 327209d commit d699a5e
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions libensemble/ensemble.py
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,8 @@ def libE_specs(self):
def libE_specs(self, new_specs):
if not isinstance(new_specs, dict):
new_specs = new_specs.dict(by_alias=True, exclude_none=True, exclude_unset=True)
if isinstance(self._libE_specs, dict):
self._libE_specs = LibeSpecs(**self._libE_specs)
self._libE_specs.__dict__.update(**new_specs)

def run(self) -> (npt.NDArray, dict, int):
Expand Down

0 comments on commit d699a5e

Please sign in to comment.