cool-lifeguard-49380
06/19/2024, 10:16 AMfrom typing import Union
from dataclasses import dataclass
from flytekit import task, workflow
@dataclass
class A:
a: int
@dataclass
class B:
b: int
@task
def foo(inp: Union[A, B]):
...
@workflow
def wf():
foo(inp=B(b=1))
if __name__ == "__main__":
wf()
Our users want to do something like this and I also would have naively expected this should work but it actually doesn’t. Details in 🧵
Would be curious if somebody knows how to fix this 🙏cool-lifeguard-49380
06/19/2024, 10:16 AMfreezing-airport-6809