Add support FlyteFile in dataclass#710
Closed
pingsutw wants to merge 5 commits into
Closed
Conversation
Codecov Report
@@ Coverage Diff @@
## master #710 +/- ##
==========================================
+ Coverage 85.80% 85.81% +0.01%
==========================================
Files 358 362 +4
Lines 29793 30064 +271
Branches 2428 2454 +26
==========================================
+ Hits 25564 25800 +236
- Misses 3590 3621 +31
- Partials 639 643 +4
Continue to review full report at Codecov.
|
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
Signed-off-by: Kevin Su <pingsutw@apache.org>
3f9048d to
243d282
Compare
eapolinario
reviewed
Oct 27, 2021
| @dataclass_json | ||
| @dataclass | ||
| class FlyteFile(os.PathLike, typing.Generic[T]): | ||
| path: str = field(metadata=config(mm_field=fields.String())) |
Collaborator
There was a problem hiding this comment.
why do we need to specify metadata?
Member
Author
There was a problem hiding this comment.
if I remove it, will get the below error.
{"asctime": "2021-10-28 20:12:39,540", "name": "flytekit", "levelname": "WARNING", "message":
"failed to extract schema for object <class 'test_type_engine.TestFileStruct'>, (will run
schemaless) error: unsupported field type <fields.Field(dump_default=<marshmallow.missing>,
attribute=None, validate=None, required=False, load_only=False, dump_only=False, load_default=
<marshmallow.missing>, allow_none=False, error_messages={'required': 'Missing data for required
field.', 'null': 'Field may not be null.', 'validator_failed': 'Invalid value.'})>"}
Member
Author
There was a problem hiding this comment.
It's very wired, the error only happens with Flyte type.
Collaborator
There was a problem hiding this comment.
where were you seeing this? Was it in the test_flyte_file_in_dataclass test?
Signed-off-by: Kevin Su <pingsutw@apache.org>
8 tasks
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Signed-off-by: Kevin Su pingsutw@apache.org
TL;DR
Add support FlyteFile in dataclass
Type
Are all requirements met?
Complete description
Add additional metadata to serialize/deserialize FlyteFile.

Flyte Console:
Tracking Issue
https://github.com/lyft/flyte/issues/
Follow-up issue
NA