Andrei Duralei
12/19/2022, 2:12 PM@op(out={"output1": Out(is_required=True), "output2": Out(is_required=False)})
def op1():
if something:
yield Output()
else:
yield Output()
yield Output()
@op
def op2(output1: str, output2: Optional[str] = None):
#do something
@graph
def my_graph():
output1, output2 = op1()
op2(output1, output2)
Adam Ward
12/19/2022, 2:49 PMoutput2
to an empty string instead (''
)? This is only a guess but I suspect that op2 does not trigger as it does not have a value for all dependencies.Andrei Duralei
12/19/2022, 2:56 PMAdam Ward
12/19/2022, 3:01 PMop2
and defining a non-argument dependency. If I'm understanding what you are looking for, that should allow you to execute op2
without waiting for input from output2
.Andrei Duralei
12/19/2022, 3:12 PMAdam Ward
12/19/2022, 3:16 PM@op(out={"output": Out(is_required=True)})
def op1():
if something:
yield (Output(), '')
else:
yield (Output(), Output())
@op
def op2(output: tuple):
#do something
Think that might work?Andrei Duralei
12/19/2022, 3:24 PMAdam Ward
12/19/2022, 3:29 PMAndrei Duralei
12/19/2022, 3:29 PMAdam Ward
12/19/2022, 3:29 PM