-
Notifications
You must be signed in to change notification settings - Fork 299
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
[BUG] Use models literal StructuredDataset to enable sd bypass task #2954
base: master
Are you sure you want to change the base?
[BUG] Use models literal StructuredDataset to enable sd bypass task #2954
Conversation
Signed-off-by: JiaWei Jiang <[email protected]>
Signed-off-by: JiaWei Jiang <[email protected]>
Follow-upBecause the reported bug is raised in the remote run (which involves communication with s3), I think it's hard to test in both unit test and integration test, as we've discussed before here. If there's any possibility to better test this fix, I'll handle it! |
@@ -197,12 +197,25 @@ def return_sd() -> StructuredDataset: | |||
return df | |||
|
|||
For details, please refer to this issue: https://github.com/flyteorg/flyte/issues/5954. | |||
|
|||
2. Need access to self._literal_sd when converting task output back to flyteidl, please see: | |||
https://github.com/flyteorg/flytekit/blob/master/flytekit/bin/entrypoint.py#L326 |
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.
Can we use github permanent link?
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.
Sure, let me fix it. Thanks!
Signed-off-by: JiaWei Jiang <[email protected]>
Signed-off-by: JiaWei Jiang <[email protected]>
Follow-upThe last commit aims at simplifying the building logic of The next steps are:
|
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #2954 +/- ##
==========================================
+ Coverage 75.14% 78.28% +3.13%
==========================================
Files 200 200
Lines 20919 20928 +9
Branches 2692 2693 +1
==========================================
+ Hits 15720 16383 +663
+ Misses 4445 3745 -700
- Partials 754 800 +46 ☔ View full report in Codecov by Sentry. |
Tracking issue
Closes flyteorg/flyte#5956.
Why are the changes needed?
For a flyte task with python
StructuredDataset
as a passthrough input, it fails to convert the task outputLiteralMap
back to flyte idl. On the highest level, the process of calling_dispatch_execute
(here) is illustrated as follows:As can be observed, the problem (marked as orange) occurs when the input
LiteralMap
is converted to python natives, during which aLiteral
is built with python nativeStructuredDataset
, instead of using the correctliterals.StructuredDataset
(please refer to this code snippet).This makes conversion from the task output
LiteralMap
back to flyte idl fail because python nativeStructuredDataset
has noto_flyte_idl
method.What changes were proposed in this pull request?
set_literal
, which enables external access to internal_set_literal
._literal_sd
of python nativeStructuredDataset
in methoddict_to_structured_dataset
.How was this patch tested?
After fixing,
outputs.pb
now can be successfully written to s3 storage.flytekit
installed by commit sha in this PR.Run the following command:
The remote sandbox test result is shown as follows:
Setup process
Check all the applicable boxes
Related PRs
#2914
Docs link