-
Notifications
You must be signed in to change notification settings - Fork 669
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
[Docs] Use Pure Dataclass In Example #5829
[Docs] Use Pure Dataclass In Example #5829
Conversation
Signed-off-by: Future-Outlier <[email protected]>
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #5829 +/- ##
=======================================
Coverage 36.35% 36.35%
=======================================
Files 1304 1304
Lines 110148 110148
=======================================
+ Hits 40042 40043 +1
+ Misses 65939 65938 -1
Partials 4167 4167
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I left a few questions and suggestions -- let me know what you think!
`from dataclasses_json import dataclass_json` instead of inheriting from Mashumaro's `DataClassJSONMixin`. | ||
|
||
If you're using Flytekit version >= v1.11.1, you don't need to decorate with `@dataclass_json` or | ||
If you're using Flytekit version below v1.11.1, your dataclass will need to decorate with `@dataclass_json` or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just to clarify, this means that if you are using Flytekit < 1.11.1, you either need to decorate your dataclass with @dataclass_json
or create a class that inherits DataClassJSONMixin
, but that you don't need to do both? If you inherit from DataClassJSONMixin
, do you need to do from mashumaro.mixins.json import DataClassJSONMixin
as well?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
yes!
Co-authored-by: Nikki Everett <[email protected]> Signed-off-by: Future-Outlier <[email protected]>
Co-authored-by: Nikki Everett <[email protected]> Signed-off-by: Future-Outlier <[email protected]>
Co-authored-by: Nikki Everett <[email protected]> Signed-off-by: Future-Outlier <[email protected]>
`from dataclasses_json import dataclass_json` instead of inheriting from Mashumaro's `DataClassJSONMixin`. | ||
|
||
If you're using Flytekit version >= v1.11.1, you don't need to decorate with `@dataclass_json` or | ||
If you're using Flytekit version below v1.11.1, your dataclass will need to decorate with `@dataclass_json` or |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you're using Flytekit version below v1.11.1, your dataclass will need to decorate with `@dataclass_json` or | |
If you're using Flytekit version greater than v1.10 and less than v1.11.1, you will need add `from mashumaro.mixins.json import DataClassJSONMixin` to your imports and either decorate your dataclass with `@dataclass_json` or create a class that inherits from `DataClassJSONMixin`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let me know if this is accurate!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it's not, but I can update it
Signed-off-by: Future-Outlier <[email protected]>
Co-authored-by: Nikki Everett <[email protected]> Signed-off-by: Future-Outlier <[email protected]>
Docs link
flyte dataclass: https://flyte--5829.org.readthedocs.build/en/5829/user_guide/data_types_and_io/dataclass.html