-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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] Remote whl support #39407
Conversation
Signed-off-by: Jonathan Nitisastro <[email protected]>
@jonathan-anyscale is this ready for review or still WIP? |
still WIP, doing some refactor instead of this method and trying to test it right now |
Sounds good! You can "mark as draft" in that case https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/changing-the-stage-of-a-pull-request#converting-a-pull-request-to-a-draft |
Signed-off-by: Jonathan Nitisastro <[email protected]>
Signed-off-by: Jonathan Nitisastro <[email protected]>
Signed-off-by: Jonathan Nitisastro <[email protected]>
Signed-off-by: Jonathan Nitisastro <[email protected]>
Signed-off-by: Jonathan Nitisastro <[email protected]>
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 overall, just a few minor comments and questions. @jjyao can you review this as well?
Signed-off-by: Jonathan Nitisastro <[email protected]>
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.
The last round of changes looks good! One question is that now we're allowing a user to set a working_dir
to a remote .whl file. Even though it technically makes sense because a whl file happens to be a zip of a directory, I think it might be confusing for users, so it would be better to just disallow it. What do you think? We can always add it later if users ask for it.
Also, please update the documentation in this PR to reflect the change. It's on this page https://docs.ray.io/en/latest/ray-core/handling-dependencies.html
Looks like one or more tests may need to be updated, e.g.: https://buildkite.com/ray-project/oss-ci-build-pr/builds/36008#018a8c11-1593-4e10-9d3d-11694b724e24/3606-4413 |
Okk make sense, I didn't check before that local whl is not supported for |
Signed-off-by: Jonathan Nitisastro <[email protected]>
Signed-off-by: Jonathan Nitisastro <[email protected]>
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! If there are failing tests that look unrelated, you can check against https://flaky-tests.ray.io/ to see if they're flaky on master, list out the ones that failed and mark the PR with the tests-ok.
Just had a few minor nits. |
Co-authored-by: angelinalg <[email protected]> Signed-off-by: jonathan-anyscale <[email protected]>
Co-authored-by: angelinalg <[email protected]> Signed-off-by: jonathan-anyscale <[email protected]>
Co-authored-by: angelinalg <[email protected]> Signed-off-by: jonathan-anyscale <[email protected]>
# Don't modify the .whl filename. See | ||
# https://peps.python.org/pep-0427/#file-name-convention | ||
# for more informationl. | ||
package_name = pkg_uri.split("/")[-1] |
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.
Will this cause conflict since we only use the filename of whl instead of the entire uri? Like if I have both s3:https://A/package.whl
and s3:https://B/package.whl
.
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.
Should be fine since whl filename is uniquely generated when we create it. The only conflict is when the user want to use package with same name which is unlikely.
Also, this filename will only used to save locally, which the file will be deleted after installation so shouldn't be any conflict.
@@ -883,3 +901,34 @@ def delete_package(pkg_uri: str, base_directory: str) -> Tuple[bool, int]: | |||
deleted = True | |||
|
|||
return deleted | |||
|
|||
|
|||
async def install_wheel_package( |
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.
why do we move to here?
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.
Initially I thought working_dir
will support remote wheel as well but it isn't by our definition of working_dir.
But this function is generally used to install wheel package, so might as well move it outside from py_modules
for general usage later.
Signed-off-by: Jonathan Nitisastro <[email protected]>
Signed-off-by: Jonathan Nitisastro <[email protected]>
Signed-off-by: Jonathan Nitisastro <[email protected]>
Refactor runtime_env to support remote wheel for py_modules Signed-off-by: Jonathan Nitisastro <[email protected]> Signed-off-by: jonathan-anyscale <[email protected]> Co-authored-by: angelinalg <[email protected]>
Refactor runtime_env to support remote wheel for py_modules Signed-off-by: Jonathan Nitisastro <[email protected]> Signed-off-by: jonathan-anyscale <[email protected]> Co-authored-by: angelinalg <[email protected]> Signed-off-by: Victor <[email protected]>
Why are these changes needed?
Refactor runtime_env to support remote wheel for
py_modules
Unit test: Combined in
test_runtime_env_working_dir_remote_uri.py
Related issue number
Closes #35804
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.method in Tune, I've added it in
doc/source/tune/api/
under thecorresponding
.rst
file.