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

[Core][flytekit] TypeTransformer support for Pydantic Models #1823

Closed
2 tasks done
kumare3 opened this issue Nov 11, 2021 · 1 comment
Closed
2 tasks done

[Core][flytekit] TypeTransformer support for Pydantic Models #1823

kumare3 opened this issue Nov 11, 2021 · 1 comment
Assignees
Labels
enhancement New feature or request flytekit FlyteKit Python related issue

Comments

@kumare3
Copy link
Contributor

kumare3 commented Nov 11, 2021

Motivation: Why do you think this is important?

Currently Flytekit supports dataclasses as supported user defined types. We should also support Pydantic, as it provides similar benefits as Dataclasses_json to extract the schema and serialize to JSON with a nice extensible format.

Goal: What should the final outcome look like, ideally?

from typing import List
from pydantic import BaseModel


class Foo(BaseModel):
    count: int
    size: float = None

Support as a valid transform

Describe alternatives you've considered

dataclasses are already supported, but they allow limited extensibility to schema extraction as they use marshmallow underneath

Propose: Link/Inline OR Additional context

No response

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

  • Yes

Have you read the Code of Conduct?

  • Yes
@kumare3 kumare3 added enhancement New feature or request flytekit FlyteKit Python related issue labels Nov 11, 2021
@pingsutw pingsutw self-assigned this Nov 15, 2021
@cosmicBboy
Copy link
Contributor

duplicate of #2686

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request flytekit FlyteKit Python related issue
Projects
None yet
Development

No branches or pull requests

3 participants