remove init_lib() call in MicroXS.from_model(); use setdefault to ensure correct directory is used

Co-authored-by: Paul Romano <paul.k.romano@gmail.com>
This commit is contained in:
Olek 2022-08-13 10:20:19 -05:00 committed by GitHub
parent 3c483a7d7d
commit f8101006d8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -94,10 +94,8 @@ class MicroXS(DataFrame):
with tempfile.TemporaryDirectory() as temp_dir:
if run_kwargs is None:
run_kwargs = {}
model.init_lib()
elif 'cwd' in run_kwargs:
run_kwargs.pop('cwd')
statepoint_path = model.run(cwd=temp_dir, **run_kwargs)
run_kwargs.setdefault('cwd', temp_dir)
statepoint_path = model.run(**run_kwargs)
with StatePoint(statepoint_path) as sp:
for rx in xs: