-
Notifications
You must be signed in to change notification settings - Fork 304
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
[WIP] Msgspec Dataclass Type Transformer #2211
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #2211 +/- ##
===========================================
- Coverage 83.25% 53.70% -29.55%
===========================================
Files 309 180 -129
Lines 24029 17855 -6174
Branches 3481 3481
===========================================
- Hits 20005 9589 -10416
- Misses 3401 7842 +4441
+ Partials 623 424 -199 ☔ View full report in Codecov by Sentry. |
Thank you for your interest in the original issue. With flyteorg/flyte#4485 (comment), I think it's best to go with mashumaro directly. |
Thank you, will take a look! |
Can we really remove marshmallow- if so let's do it |
Thank you, will take a look |
Signed-off-by: Future-Outlier <[email protected]>
Signed-off-by: Future-Outlier <[email protected]>
0e08ae4
to
f12eb09
Compare
Signed-off-by: Future-Outlier <[email protected]>
@Future-Outlier My original motivation for I prefer not to add |
Thank you, I will try to remove |
Signed-off-by: Future-Outlier <[email protected]>
@thomasjpfan, @pingsutw |
@jcrist Hi, here's a question. |
Signed-off-by: Future-Outlier <[email protected]>
It could be faster, but I do not think that is Flyte's bottleneck right now or there is a demand for
This use case is also supported by mashumaro: https://github.com/Fatal1ty/mashumaro#supported-serialization-formats. In the end, I want to not require from mashumaro.codecs.json import JSONDecoder, JSONEncoder
from dataclasses import dataclass
@dataclass
class MyModel:
a: int
b: bool
model = MyModel(a=10, b=False)
encoder = JSONEncoder(MyModel)
decoder = JSONDecoder(MyModel)
result = encoder.encode(model)
print(result)
out = decoder.decode(result)
print(out)
# {"a": 10, "b": false}
# MyModel(a=10, b=False) |
Ok, I will try to go for
|
To clarify, I want to remove the |
No problem, thank you! |
Just create a PR here. So I will close this PR. |
Tracking issue
flyteorg/flyte#4485
Why are the changes needed?
What changes were proposed in this pull request?
How was this patch tested?
python example
Setup process
Screenshots
Check all the applicable boxes
Related PRs
Docs link