How can I connect an `op` to a number of upstream ...
# ask-community
i
How can I connect an
op
to a number of upstream ops? E.g. I have 100 ops and I need one op downstream which waits for all 100 to be finished.
o
hi @Ignas Kizelevičius! I suspect this ties into your above yaml question, but the standard way of doing this is creating a
Nothing
type input for the downstream op, then passing in a list of upstream outputs into that input. Something like
Copy code
@op(ins={"start_after": In(Nothing)})
def my_downstream():
    # do stuff ...

@graph
def lots_of_stuff():
    ops_finished = [op1(), op2(), op3(), ...]
    my_downstream(start_after=ops_finished)
i
Cool! I was not aware that it is possible to pass a list of op outputs to make it dependent, thanks!