Add support for Python 3.10 (#21221)

Signed-off-by: acxz <17132214+acxz@users.noreply.github.com>
This commit is contained in:
Akash Patel 2022-08-26 14:01:12 -04:00 committed by GitHub
parent 455fa664e5
commit 96d579a4fe
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 29 additions and 11 deletions

View file

@ -147,14 +147,22 @@
- if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
- python ./ci/build/build-docker-images.py --py-versions py39 --device-types cu111 cu112 cu113 cu116 --build-type BUILDKITE --build-base
- label: ":docker: Build Images: py310"
- label: ":docker: Build Images: py310 (1/2)"
conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
commands:
- LINUX_WHEELS=1 ./ci/ci.sh build
- pip install -q docker aws_requests_auth boto3
- ./ci/env/env_info.sh
- if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
- python ./ci/build/build-docker-images.py --py-versions py310 --device-types cpu --build-type BUILDKITE --build-base
- python ./ci/build/build-docker-images.py --py-versions py310 --device-types cpu cu101 cu102 --build-type BUILDKITE --build-base
- label: ":docker: Build Images: py310 (2/2)"
conditions: ["RAY_CI_LINUX_WHEELS_AFFECTED"]
commands:
- LINUX_WHEELS=1 ./ci/ci.sh build
- pip install -q docker aws_requests_auth boto3
- if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then python .buildkite/copy_files.py --destination docker_login; fi
- python ./ci/build/build-docker-images.py --py-versions py310 --device-types cu110 cu111 cu112 --build-type BUILDKITE --build-base
- label: ":book: Lint"
commands:
@ -316,6 +324,12 @@
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/ci.sh test_minimal 3.9
- label: ":python: Minimal install 3.10"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
commands:
- cleanup() { if [ "${BUILDKITE_PULL_REQUEST}" = "false" ]; then ./ci/build/upload_build_info.sh; fi }; trap cleanup EXIT
- ./ci/ci.sh test_minimal 3.10
- label: ":python: Default install"
conditions: ["RAY_CI_PYTHON_AFFECTED"]
commands:

View file

@ -192,7 +192,7 @@ def _build_docker_image(
)
# TODO(https://github.com/ray-project/ray/issues/16599):
# remove below after supporting ray-ml images with Python 3.9+
# remove below after supporting ray-ml images with Python 3.9/3.10
if image_name == "ray-ml" and py_version in {"py39", "py310"}:
print(f"{image_name} image is currently unsupported with " "Python 3.9/3.10")
return
@ -453,7 +453,7 @@ def push_and_tag_images(
continue
# TODO(https://github.com/ray-project/ray/issues/16599):
# remove below after supporting ray-ml images with Python 3.9
# remove below after supporting ray-ml images with Python 3.9/3.10
if image_name in ["ray-ml"] and (
PY_MATRIX[py_name].startswith("3.9")
or PY_MATRIX[py_name].startswith("3.10")
@ -607,7 +607,8 @@ if __name__ == "__main__":
choices=list(PY_MATRIX.keys()),
default="py37",
nargs="*",
help="Which python versions to build. " "Must be in (py36, py37, py38, py39)",
help="Which python versions to build. "
"Must be in (py36, py37, py38, py39, py310)",
)
parser.add_argument(
"--device-types",

View file

@ -87,7 +87,7 @@ if [[ "$platform" == "linux" ]]; then
# Check that the other wheels are present.
NUMBER_OF_WHEELS="$(find "$ROOT_DIR"/../../.whl/ -mindepth 1 -maxdepth 1 -name "*.whl" | wc -l)"
if [[ "$NUMBER_OF_WHEELS" != "4" ]]; then
if [[ "$NUMBER_OF_WHEELS" != "5" ]]; then
echo "Wrong number of wheels found."
ls -l "$ROOT_DIR/../.whl/"
exit 2
@ -95,11 +95,12 @@ if [[ "$platform" == "linux" ]]; then
elif [[ "$platform" == "macosx" ]]; then
MACPYTHON_PY_PREFIX=/Library/Frameworks/Python.framework/Versions
PY_WHEEL_VERSIONS=("36" "37" "38" "39")
PY_WHEEL_VERSIONS=("36" "37" "38" "39" "310")
PY_MMS=("3.6"
"3.7"
"3.8"
"3.9")
"3.9"
"3.10")
for ((i=0; i<${#PY_MMS[@]}; ++i)); do
PY_MM="${PY_MMS[i]}"

View file

@ -12,6 +12,8 @@ else
PYTHON_VERSION=${PYTHON-3.8}
elif [ "$1" = "3.9" ]; then
PYTHON_VERSION=${PYTHON-3.9}
elif [ "$1" = "3.10" ]; then
PYTHON_VERSION=${PYTHON-3.10}
else
echo "Unsupported Python version."
exit 1

View file

@ -58,7 +58,7 @@ You can install the nightly Ray wheels via the following links. These daily rele
.. note::
Python 3.10 support is currently experimental.
Python 3.9/3.10 support is currently experimental.
.. note::

View file

@ -36,4 +36,4 @@ lambda invoke --function-name DockerTagLatest \
--cli-read-timeout 600 \
--payload "{\"source_tag\" : \"$IMAGE\", \"destination_tag\" : \"latest\"}" /dev/stdout
echo -e "Please check logs before rerunning!!!!\n\nAt the time of writing, Autoscaler Images are not built & Ray-ML Images are not built for Py39\nSo retagging errors for those images are expected!"
echo -e "Please check logs before rerunning!!!!\n\nAt the time of writing, Autoscaler Images are not built & Ray-ML Images are not built for Py39/Py310\nSo retagging errors for those images are expected!"

View file

@ -2,4 +2,4 @@ py36
py37
py38
py39
py310
py310