Skip to content

Commit

Permalink
fix: check for additional obj existence
Browse files Browse the repository at this point in the history
  • Loading branch information
zcstarr committed Mar 21, 2024
1 parent d9dce51 commit 9f42e1f
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cadCAD/engine/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -241,7 +241,7 @@ def get_final_results(simulations: List[StateHistory],
ExpIDs, SubsetIDs, SubsetWindows, original_N, self.additional_objs
)

if (self.additional_objs is not None and self.additional_objs['lazy_eval']):
if (self.additional_objs is not None and self.additional_objs.get('lazy_eval', False)):
final_result = get_final_results_lazy(
simulations_results, partial_state_updates, eps, sessions, remote_threshold)
else:
Expand Down
5 changes: 3 additions & 2 deletions cadCAD/engine/execution.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
import tempfile
import pickle
import sys
from pympler import asizeof
from memory_profiler import profile
import dill

Expand Down Expand Up @@ -115,7 +114,9 @@ def parallelize_simulations(
):

print(f'Execution Mode: parallelized')
lazy_eval = additional_objs['lazy_eval']
lazy_eval = False
if (additional_objs):
lazy_eval = additional_objs.get('lazy_eval', False)

params = [
(sim_exec, var_dict, states_list, config, env_processes,
Expand Down

0 comments on commit 9f42e1f

Please sign in to comment.