Skip to content

Commit

Permalink
Assert len of outputs for repeats.
Browse files Browse the repository at this point in the history
  • Loading branch information
sampottinger committed Dec 5, 2024
1 parent 1228b00 commit 3158a5a
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion sim_tasks.py
Original file line number Diff line number Diff line change
Expand Up @@ -1371,8 +1371,13 @@ def _process_outputs(self, output_sets_realized):
Args:
output_sets_realized: Sets of the individual simulation outputs.
"""
assert len(output_sets_realized) == self.get_iterations()

def simplify_and_combine(outputs_realized):
simplified = map(lambda x: self._simplify_record(x), outputs_realized)
simplified = map(
lambda x: self._simplify_record(x),
itertools.chain(*outputs_realized)
)
return functools.reduce(lambda a, b: self._combine(a, b), simplified)

def get_stats(key, summaries):
Expand Down

0 comments on commit 3158a5a

Please sign in to comment.