[Core feature] Map tasks with default arguments #3120
Labels
enhancement
New feature or request
untriaged
This issues has not yet been looked at by the Maintainers
Milestone
Motivation: Why do you think this is important?
Currently map_tasks does not provide an option to pass default arguments to the mapped function. The documentation suggests to create an additional input preparation task, to prepare parallelized input and default inputs in a single paralellizable list, which adds unnecessary complexity to the workflow execution graph.
The idea is, to add an option to pass default arguments to the map_task wrapper, similar to the functools.partial() method.
Goal: What should the final outcome look like, ideally?
The first task in the following example workflow uses the currently implemented map_task function, to parallelize the 'parallel_task' over a list of inputs.
The second task in the workflow is an example of how the map_task could be used with default arguments. The idea is, to parallelize the
parallel_task_with_default
over a list of inputs, where each element is passed toinp1
.inp2
should be a default input, equal for all parallel calls of the task.Describe alternatives you've considered
A potential workaround is explained in the documentation.
Propose: Link/Inline OR Additional context
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: