Aris Koliopoulos
04/06/2022, 8:17 PM@op
def op1():
return None
@graph
def graph1():
op1()
@op
def op2():
return None
@graph(ins={"start_after": In(Nothing)})
def graph2(start_after):
op2()
@job
def runner():
graph2(start_after=graph1())
But I am getting
dagster.core.errors.DagsterInvalidDefinitionError: @graph 'graph2' has unmapped input 'start_after'. Remove it or pass it to the appropriate solid invocation.
Is this even possible? I have tried a number of things along those lines. I am trying to avoid importing a big number of ops
to compose everything in 1 go. Any help would be very much appreciated.
Thanks!!!Ben Jordan
04/06/2022, 8:38 PM@op(out={"clear": Out(Nothing)})
def first_op():
pass
@op(ins={"clear": In(Nothing)})
def second_op():
pass
Aris Koliopoulos
04/06/2022, 8:41 PM@graph
, or just with @op
?Ben Jordan
04/06/2022, 8:42 PMstart_after
is undefined, so defining it as the output made sense to meAris Koliopoulos
04/06/2022, 8:45 PM@op
def op1():
return None
@graph(out={"clear": GraphOut()})
def graph1():
return op1()
@op(ins={"clear": In(Nothing)})
def op2():
return None
@graph(ins={"clear": GraphIn()})
def graph2(clear):
op2(clear)
@job
def runner():
graph2(graph1())
Got it to work! Graph needs to pass Nothing
around as this is how Dagster tracks dependencies. Thanks Ben!