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
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))
The text was updated successfully, but these errors were encountered:
fubuloubu
changed the title
Allow multiple arguments to pass to mapper
Feat: Allow multiple arguments to pass to mapper
Oct 25, 2024
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?
The text was updated successfully, but these errors were encountered: