You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Feat: Allow multiple arguments to pass to mapper #19
I was trying to build a pipeline where I would have a list of tuples being returned from the first sequential task into a mapper, that should take one of the tuples and apply it for multiple args
Proposed API maybe something like this?
@broker.taskasyncdefget_list() ->list[tuple[int, int]]:
# some sort of process to obtain the args for the next functionreturn [(1, 2), (3, 4), (5, 6), ...]
@broker.taskasyncdefhandle_args(a: int, b: int) ->int:
returna*b# imagine this is more computationally expensivepipe=Pipeline(broker, get_list).map(handle_args, multiple_args=True) # if set, would be simialr to *argstask=awaitpipe.kiq()
result=awaittask.wait_result()
print(sum(result.return_value))
Activity
[-]Allow multiple arguments to pass to mapper[/-][+]Feat: Allow multiple arguments to pass to mapper[/+]