You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Take dataclass as an example, if you use a dataclass as a task's input or output, and you use the flytekit remote API to fetch the result, you will get an error.
example code
fromflytekit.remote.remoteimportFlyteRemotefromflytekit.configurationimportConfigremote=FlyteRemote(
Config.for_endpoint("localhost:30080", True),
)
o=remote.get("flyte://v1/flytesnacks/development/am8tmmtmlnht4627qc4z/dataclassexamplet1/o") # this is a datacalss or pydantic basemodelprint(o['o0'])
fromflytekit.remote.remoteimportFlyteRemotefromflytekit.configurationimportConfigremote=FlyteRemote(
config=Config.for_endpoint("localhost:30080", True),
)
o=remote.get("flyte://v1/flytesnacks/development/a7g427xqqw94d222rsmz/easyexamplet1/o")
# o['o0'] this will failtask_data=remote.fetch_task(project="flytesnacks", domain="development", name="easy_example.t1",)
print(task_data)
print(task_data.interface.outputs['o0'].type) # flytekit.models.types.LiteralType# We can use `guess_python_type` to convert json schema (stored in the metadata to python types)
Describe the bug
Take dataclass as an example, if you use a
dataclass
as a task's input or output, and you use the flytekit remote API to fetch the result, you will get an error.example code
error
Expected behavior
This should work.
Additional context to reproduce
Screenshots
No response
Are you sure this issue hasn't been raised already?
Have you read the Code of Conduct?
The text was updated successfully, but these errors were encountered: