bored-beard-89967
02/14/2024, 1:05 AMfrom flytekit import task, workflow
from typing import NamedTuple
class MyNamedTuple(NamedTuple):
a: int
@task
def f1(x: int) -> int:
return x+1
@task
def f2(z: int) -> MyNamedTuple:
return MyNamedTuple(a=z)
@workflow
def my_workflow(x: int):
p1 = f1(x=x)
p2 = f2(z=7)
p1 >> p2
gives us the error: AttributeError: 'Output' object has no attribute 'ref'
. I added --verbose
to the pyflyte command, and saw that the error is happening in __rshift__
somewhere so I used that to trial-and-error comment out all cases where we use >>
to assert node order and found it.
I would have made an issue on github, but I don’t see issues tab on github (apologies in advance if it lives somewhere else).bored-beard-89967
02/14/2024, 1:07 AMp1 >> p2.a
instead.bored-beard-89967
02/14/2024, 1:07 AMagreeable-kitchen-44189
02/15/2024, 2:24 PMcold-translator-17075
02/21/2024, 3:07 AM