I have found a peculiar case where I can not succe...
# ask-the-community
l
I have found a peculiar case where I can not successfully register workflows. MRE is as follows:
Copy code
from 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).
Interestingly, things register when I specify
p1 >> p2.a
instead.
So, not much of an issue, but figured I’d post in case anyone runs into the same issue.
b
Issues are all in the toplevel flyte repo Thanks for flagging!
s
seeing the same thing, also in the case of node order assertion