astonishing-lizard-78628
05/19/2022, 10:09 AMFlyteRemote
and now I understand how to ask my question lol. My remote workflow looks like this:
@dataclass_json
@dataclass
class WrappedList:
s: str
@flytekit.workflow
def count_files_test_workflow(
in: WrappedList,
):
How do I call this workflow with FlyteRemote
? If I try to do:
remote = FlyteRemote(...)
lp = remote.fetch_launch_plan(...)
remote.execute(lp, inputs={'in': WrappedList("foo")})
Then I get FlyteTypeException: Type error! Received: <class '__main__.WrappedList'> with value: WrappedList(s='foo'), Expected: <class 'types.WrappedlistSchema'>
. I looked into the type_hints
argument to remote.execute
, but I don't think that's the right thing here. What I really need to be able to do is specify inputs={'in': x}
where x is an instance of types.WrappedListSchema.astonishing-lizard-78628
05/19/2022, 10:11 AMtypes.WrappedListSchema
comes from the flytekit type engine and transformers, etc. that gets a bit complicated quickly.
I'm not sure what to call to transform my WrappedList("foo")
value into a types.WrappedListSchema
instance (that is part of the remote interface).astonishing-lizard-78628
05/19/2022, 10:12 AMglamorous-carpet-83516
05/19/2022, 12:47 PMfreezing-airport-6809
high-accountant-32689
05/19/2022, 7:04 PMexecute
, like so:
remote.execute(lp, inputs={'in': WrappedList("foo")}, type_hints={'in': WrappedList})