Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Failure during flytekit remote launch w/ dataclass flytekit.core.type_engine.TypeTransformerFailedError: Type of Val 'XXXX' is not an instance of <class 'XXXX'> #2844

Closed
2 tasks done
CalvinLeather opened this issue Sep 2, 2022 · 3 comments
Assignees
Labels
bug Something isn't working flytekit FlyteKit Python related issue

Comments

@CalvinLeather
Copy link

Describe the bug

Originally reported in https://flyte-org.slack.com/archives/CREL4QVAQ/p1661266231263149, also encountered by our team. When launching a remote execution of a task that takes a dataclass as input, the type is incorrectly inferred. This results in a failure in flytekit before the task is launched. This error looks like:

flytekit.core.type_engine.TypeTransformerFailedError: Type of Val '<Level2proxyparametersSchema(many=False)>' is not an instance of <class 'types.Level2proxyparametersSchema'>

We also found something that may be a related bug... if we do not pass default_project and default_domain when creating the remote, we get a related error (missing project/domain) when actually launching the launchplan/worfklow.

The workaround is to use type_hints to pass in the class for the dataclass explicitly.

This may be related to #2502, but is happening for dataclasses.

Expected behavior

The workflow/launch (which exists) launches and the dataclass provided is accepted.

Additional context to reproduce

No response

Screenshots

Screenshot of related issue from not setting default_project/domain in remote init

image

Are you sure this issue hasn't been raised already?

  • Yes

Have you read the Code of Conduct?

  • Yes
@CalvinLeather CalvinLeather added bug Something isn't working untriaged This issues has not yet been looked at by the Maintainers labels Sep 2, 2022
@CalvinLeather
Copy link
Author

@pingsutw pingsutw self-assigned this Sep 6, 2022
@pingsutw pingsutw added flytekit FlyteKit Python related issue and removed untriaged This issues has not yet been looked at by the Maintainers labels Sep 6, 2022
@eapolinario
Copy link
Contributor

@pingsutw , can we close this?

@pingsutw
Copy link
Member

pingsutw commented Sep 9, 2022

yes, closed it.

@pingsutw pingsutw closed this as completed Sep 9, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working flytekit FlyteKit Python related issue
Projects
None yet
Development

No branches or pull requests

3 participants