-
Notifications
You must be signed in to change notification settings - Fork 671
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 feature] Support for Native JSON types in flyte #5318
Comments
To support native JSON types in Flyte, you propose introducing a new Would you like more detail on how to implement this feature or any potential challenges? Sources: This is an AI-generated response and your feedback is appreciated! Please leave a 👍 if this is helpful and 👎 if it is not. Mention @RunLLM to ask follow-up questions. See runllm.com for more! |
Related to #4505 |
#take |
From #4505 (comment), I see the follow Python types that can use
@kumare3 Are you considering other Python types that would use |
I am saying wholesale migration to json for these unsupported types from struct |
The PRs will be created as follows:
|
follow up: |
follow up 2: |
what is this now and what should it be? |
now: Dict[int, dataclasss] not supported, and Dict[int, dataclasss] not supported with attribute access |
This case can be supported, but we don't have backward compatible issue now, since no users report about this before. # Status is an Enum class
@dataclass
class DC:
grid: Dict[str, List[Optional[Union[int, str, float, bool, Status, InnerDC]]]] = field(default_factory=lambda: {
'all_types': [InnerDC()],
}) Mashumaro Issue: Fatal1ty/mashumaro#252 |
As you can witness from all the PRs in this issue, there was a lot of movement in this area, and we can finally close this issue as we officially released 1.14.0 last week, which adds an improved support for dataclasses, untyped dictionaries, and pydantic models. Check the full release log in https://github.com/flyteorg/flytekit/releases/tag/v1.14.0. |
Motivation: Why do you think this is important?
Currently flyte supports JSON through protobuf Struct. This causes a lot of problems for the users, especially when using ints as Structs only store numbers - which are double values.
Goal: What should the final outcome look like, ideally?
Support a new FlyteIDL.LiteralType called LiteralType.JSON. So users can simply use any object that dumps to a JSON using binary / bytearray as the transport layer.
It should be possible to also have customer json serializers and deserializers for the data like JsonPickle etc
Describe alternatives you've considered
New literalType called LiteralType.JSON
This maps to a Literal of type binary (wire format)
Optionally the metadata / schema can be extracted and stored
Propose: Link/Inline OR Additional context
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: