Skip to content

Ease the linking of tasks with matching outputs/inputs #427

Description

@loichuder

Some workflows have tasks that all need a specific input (output folder, physical constant, etc.).

To achieve this without implicit coupling and overcomplicating the workflow, we pass the input from task to task to share it across the workflow. In essence, this means every link need to connect the output of the previous task to the input of the next task.

This is tractable for one or two inputs but can be overwhelming if there are more.

To alleviate that, we propose to implement an automatic mapping for tasks with matching outputs/inputs. This would be a convenience feature that can be overwritten by explicit data mapping.

The proposed implementation would use Pydantic models and there are actually two ways of doing it:

  1. The specific inputs could be contained in a pydantic model as output. When passing the pydantic model to the next task, the model would be expanded to fill matching inputs
  2. Alternatively, the whole Ewoks task pydantic input/output model could derive from eachother. This would create a mapping automatically, can be overwritten by explicit mapping. The automatic mapping can be based on either one of these options:
    • The downstream input model to be a super or subclass of upstream output model.
    • Output names and types (or even just the names so pydantic is not needed). To be checked if this can simply be achieved with map_all_data=True .

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No type

Fields

No fields configured for issues without a type.

Projects

Status
Backlog

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions