-
Notifications
You must be signed in to change notification settings - Fork 6k
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] Support python 3.10 for runtime_env conda #30970
[runtime env] Support python 3.10 for runtime_env conda #30970
Conversation
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
@scv119 If there is a "release process" for new Python versions, could this PR be linked there and added as a step? We could make this more futureproof by removing the |
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.
@architkulkarni is there a way we can fail very loudly when Ray runs a new python version but it isn't supported in this enum? At a minimum we can add a small CI test (just check current py version vs. this map)
Or maybe the existing test is good enough... just checking we catch this as early as possible |
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
@edoakes Good point, the existing tests will just pass even if a new version is added. I added a constant Unfortunately, there's still no way to auto-update the |
elif py_version_str in ["38", "39"]: | ||
darwin_os_string = "macosx_10_15_x86_64" | ||
else: | ||
darwin_os_string = "macosx_10_15_universal2" |
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.
New OS string just dropped.
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.
lol
|
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.
minor comments
@@ -1304,7 +1308,7 @@ def get_release_wheel_url( | |||
ray_commit: str = ray.__commit__, | |||
sys_platform: str = sys.platform, | |||
ray_version: str = ray.__version__, | |||
py_version: str = f"{sys.version_info.major}{sys.version_info.minor}", | |||
py_version: Tuple[int, int] = sys.version_info[:2], |
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 fix this? The previous code seems to be easier to understand
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.
No strong reason, I just think it's better not to convert it to a string until the very end of the data flow, when we actually generate the wheel name.
But I agree that sys.version_info[:2]
is harder to understand. I'll change it to (sys.version_info.major, sys.version_info.minor)
python/ray/tests/test_runtime_env.py
Outdated
# NOTE: These should not be changed for releases. | ||
ray_version = "3.0.0.dev0" | ||
for sys_platform in ["darwin", "linux", "win32"]: | ||
for py_version in ["36", "37", "38", "39"]: | ||
if sys_platform == "win32" and py_version == "36": | ||
for py_version in [(3, 6), (3, 7), (3, 8), (3, 9), (3, 10)]: |
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.
Use the same constant?
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com>
This PR updates the release tests wheel_urls to make it compatible with the internal API change in PR #30970. Previously the release test was breaking with File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/_private/utils.py", line 1266, in get_wheel_filename assert py_version in ray_constants.RUNTIME_ENV_CONDA_PY_VERSIONS, py_version AssertionError: 36
Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com> conda environments are isolated, so when runtime_env sets up a conda environment it must download the Ray wheel into the conda environment. It must download the wheel that matches the current Python and Ray version running, otherwise there will be incompatibility issues between the workers that use this runtime_env and the other workers and Ray processes. This PR updates the wheel name format logic to support Python 3.10.
This PR updates the release tests wheel_urls to make it compatible with the internal API change in PR #30970. Previously the release test was breaking with File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/_private/utils.py", line 1266, in get_wheel_filename assert py_version in ray_constants.RUNTIME_ENV_CONDA_PY_VERSIONS, py_version AssertionError: 36
…30970) Signed-off-by: Archit Kulkarni <architkulkarni@users.noreply.github.com> conda environments are isolated, so when runtime_env sets up a conda environment it must download the Ray wheel into the conda environment. It must download the wheel that matches the current Python and Ray version running, otherwise there will be incompatibility issues between the workers that use this runtime_env and the other workers and Ray processes. This PR updates the wheel name format logic to support Python 3.10. Signed-off-by: tmynn <hovhannes.tamoyan@gmail.com>
This PR updates the release tests wheel_urls to make it compatible with the internal API change in PR ray-project#30970. Previously the release test was breaking with File "/home/ray/anaconda3/lib/python3.7/site-packages/ray/_private/utils.py", line 1266, in get_wheel_filename assert py_version in ray_constants.RUNTIME_ENV_CONDA_PY_VERSIONS, py_version AssertionError: 36 Signed-off-by: tmynn <hovhannes.tamoyan@gmail.com>
Signed-off-by: Archit Kulkarni architkulkarni@users.noreply.github.com
Why are these changes needed?
conda
environments are isolated, so whenruntime_env
sets up a conda environment it must download the Ray wheel into the conda environment. It must download the wheel that matches the current Python and Ray version running, otherwise there will be incompatibility issues between the workers that use thisruntime_env
and the other workers and Ray processes.This PR updates the wheel name format logic to support Python 3.10.
Related issue number
Closes #30929
Checks
git commit -s
) in this PR.scripts/format.sh
to lint the changes in this PR.