Skip to content

Commit

Permalink
fix(pipeline): pipeline tasks can return multiple outputs to unpack
Browse files Browse the repository at this point in the history
  • Loading branch information
jrs65 committed Feb 6, 2024
1 parent ac2a2d7 commit 9f240d1
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions caput/pipeline.py
Original file line number Diff line number Diff line change
Expand Up @@ -689,9 +689,17 @@ def _check_task_output(out, task):

def _setup_tasks(self):
"""Create and setup all tasks from the task list."""
all_out_values = {t.get("out", None) for t in self.task_specs}
# Get the names of all outputs such that we can validate the inputs into each
# task
all_out_values = set()
for t in self.task_specs:
if "out" in t:
if isinstance(t["out"], (list, tuple)):
all_out_values.update(t["out"])
else:
all_out_values.add(t["out"])

# Setup all tasks in the task listk
# Setup all tasks in the task list
for ii, task_spec in enumerate(self.task_specs):
try:
task, key_spec = self._setup_task(task_spec)
Expand Down

0 comments on commit 9f240d1

Please sign in to comment.