-
Notifications
You must be signed in to change notification settings - Fork 307
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
FlyteRemote data context does not get used #993
Conversation
Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
flytekit/remote/remote.py
Outdated
@@ -145,7 +145,7 @@ def __init__( | |||
) | |||
|
|||
# Save the file access object locally, but also make it available for use from the context. | |||
FlyteContextManager.with_context( | |||
FlyteContextManager.push_context( |
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.
:(
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.
yeah i don't like this either.
* save context into remote and literals resolver constructor Signed-off-by: Yee Hing Tong <[email protected]> * nits Signed-off-by: Yee Hing Tong <[email protected]>
Codecov Report
@@ Coverage Diff @@
## master #993 +/- ##
==========================================
+ Coverage 86.29% 86.33% +0.04%
==========================================
Files 252 255 +3
Lines 24258 24323 +65
Branches 2768 2768
==========================================
+ Hits 20934 21000 +66
Misses 2851 2851
+ Partials 473 472 -1
Continue to review full report at Codecov.
|
Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
Signed-off-by: Eduardo Apolinario <[email protected]>
Signed-off-by: Yee Hing Tong <[email protected]>
TL;DR
@cosmicBboy found this issue when working on the unionml library. To summarize,
Even though the
FlyteRemote
object creates aFlyteContext
, when you use that remote object to fetch an execution, there is nothing tying thatLiteralsResolver
instance back to that context. So when you try to download/upload anything, you end up using the defaultFileAccessProvider
created at the module layer.To remediate, we can
LiteralsResolver
and cache the remote object's context when we get execution inputs/outputs.ctx
to be specified in the get function (but then the user has to manually use it at call-time).__call__
function). Granted using a prior execution's input/outputs in a workflow declaration would be quite weird, but still something to consider.Type
Are all requirements met?
Complete description
Doing option 1 - it's the least amount of code.
Tracking Issue
https://github.com/flyteorg/flyte/issues/
Follow-up issue
NA
OR
https://github.com/flyteorg/flyte/issues/