Skip to content

Commit

Permalink
MPIEvaluator: Model passing
Browse files Browse the repository at this point in the history
  • Loading branch information
EwoutH committed Aug 31, 2023
1 parent 00d2c1f commit c72fc6c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion ema_workbench/em_framework/evaluators.py
Original file line number Diff line number Diff line change
Expand Up @@ -434,7 +434,8 @@ def finalize(self):

def evaluate_experiments(self, scenarios, policies, callback, combine="factorial"):
ex_gen = experiment_generator(scenarios, self._msis, policies, combine=combine)
model_gen = (self._msis[experiment.model_name] for experiment in ex_gen)
experiments_list = list(ex_gen) # Convert generator to list
model_gen = (self._msis[experiment.model_name] for experiment in experiments_list)

# Here, we're using the map function from MPIPoolExecutor. This function behaves
# like the built-in map, but the tasks are executed in parallel processes.
Expand Down

0 comments on commit c72fc6c

Please sign in to comment.