-
Notifications
You must be signed in to change notification settings - Fork 5.8k
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
[runtime env] Parse local pip/conda requirements files locally upon task/actor definition #18988
[runtime env] Parse local pip/conda requirements files locally upon task/actor definition #18988
Conversation
(EDIT: should be fixed by the next commit) @edoakes A couple issues here.
because it already got rewritten from filename -> file contents once, and during the second call it tries to interpret the file contents as a filename.
|
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.
Looks good to me, hopefully this works :)
This PR unfortunately does not address #19002, which I think probably has an unrelated root cause. |
Why are these changes needed?
When using Ray Client, the
.remote()
function for actors and tasks are run on the local driver and run a second time on the remote Client server.Previously, runtime env dict validation took place in
.remote()
. This caused a bug where a local file path was specified inthe"pip"
or"conda"
field, because when the validation was run in the Client server, the local file wouldn't be present.This PR fixes this by separating out the
pip
andconda
validation and moving it to the__init__
and.options()
methods for actors and tasks. Here when a filename string is given, it is parsed into the internal representationList[str]
(forpip
) orDict
(forconda
). Even though.options()
is called a second time on the client server, the validation is a no-op there because theconda
andpip
fields are already in the internal representation at that point.Related issue number
Closes #18976
Checks
scripts/format.sh
to lint the changes in this PR.