i want to define a graph/job with some ops that ca...
# ask-community
i want to define a graph/job with some ops that can run simultaneously (independent) and when they finish - a final op will start. I have something like this in my graph:
for i in range(len(sublists)):
#finally, this op should execute after all the others are successful
Note the extra () on getCritOp and combineCritdata - these are op factories
Currently in this state , 3 ops will start, and the first two will finish, then the combineCritdata will start prematurely (i have max_concurrent = 3 configured) . I need it to require the other 3 (or however many it will be, i dont know) to finish first.
🌈 1
👏 1
🤖 1
in order to define dependencies, you'll want to pass in the fanouts to the op invocation, rather than the op factory itself. So this would look something like
, assuming combineCritdata looks something like
Copy code
def combineCritdata():
    @op(name="combineCritdata", ins={"start_after": In(Nothing)})
    def my_op():
    return my_op
This worked thank you so much!