From d699a5e8f16aa8af21ca2ee8f8ca39257896dcbc Mon Sep 17 00:00:00 2001 From: jlnav Date: Wed, 12 Jul 2023 15:41:25 -0500 Subject: [PATCH] as we set a new libE_specs, cast internal libE_specs to class --- libensemble/ensemble.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libensemble/ensemble.py b/libensemble/ensemble.py index eeb81c246..50fbd8ef2 100644 --- a/libensemble/ensemble.py +++ b/libensemble/ensemble.py @@ -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):