Skip to content
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

Prepare Python 3.11 support #31170

Merged
merged 52 commits into from
Jan 7, 2023
Merged

Prepare Python 3.11 support #31170

merged 52 commits into from
Jan 7, 2023

Conversation

csko
Copy link
Contributor

@csko csko commented Dec 17, 2022

Why are these changes needed?

Preliminary PR for adding Python 3.11 support, mapping out various dependencies, fixing issues.

Main changes

  • Upgrade cython to 0.29.32
  • Add CI/CD steps for 3.11 wheel
  • Change cython code to not use recursion_depth
  • Update cloudpickle to latest
  • Use newer manylinux2014 which has python3.11
  • Condition certain python packages in requirements.txt on <3.11 that don't yet have a 3.11 version

Checklist:

Current status:
Linux and mac wheels build in CICD. Docker images will come in a separate PR.

Related issue number

#27881

Checks

  • I've signed off every commit(by using the -s flag, i.e., git commit -s) in this PR.
  • I've run scripts/format.sh to lint the changes in this PR.
  • I've included any doc changes needed for https://docs.ray.io/en/master/.
  • I've made sure the tests are passing. Note that there might be a few flaky tests, see the recent failures at https://flakey-tests.ray.io/
  • Testing Strategy
    • Unit tests
    • Release tests
    • This PR is not tested :(

Signed-off-by: Kornel Csernai <[email protected]>
Signed-off-by: Kornel Csernai <[email protected]>
Signed-off-by: Kornel Csernai <[email protected]>
Signed-off-by: Kornel Csernai <[email protected]>
@csko
Copy link
Contributor Author

csko commented Dec 18, 2022

Some success building locally:

(venv) csko@cskos-MacBook-Air python % pip install -e . --verbose
...
Successfully installed ray-3.0.0.dev0
(venv) csko@cskos-MacBook-Air python % python
Python 3.11.0 (main, Oct 26 2022, 19:06:18) [Clang 14.0.0 (clang-1400.0.29.202)] on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import ray
>>>

Signed-off-by: Kornel Csernai <[email protected]>
Signed-off-by: Kornel Csernai <[email protected]>
Signed-off-by: Kornel Csernai <[email protected]>
Signed-off-by: Kornel Csernai <[email protected]>
Signed-off-by: Kornel Csernai <[email protected]>
@rickyyx rickyyx self-assigned this Dec 21, 2022
Signed-off-by: Kornel Csernai <[email protected]>
Signed-off-by: Kornel Csernai <[email protected]>
@rickyyx rickyyx assigned simon-mo and unassigned scv119 Jan 6, 2023
@csko
Copy link
Contributor Author

csko commented Jan 6, 2023

  • updated PR with a description of the major changes
  • merged with upstream
  • removed commented out code

@rickyyx
Copy link
Contributor

rickyyx commented Jan 6, 2023

Thanks so much. LGTM!

A few notes on test for other reviewers:

  1. Lint check is soft failing since the wheel from master branch hasn't been uploaded, so the URL in the doc is not valid yet. This should be auto-resovled once the PR is merged and CI runs on the master.
  2. Previous mac run see here: https://buildkite.com/ray-project/oss-ci-build-pr/builds/8659#01858375-6bb5-4733-b638-4a1d2c5a25ea
  3. I have manually tested the built wheels on Linux with Ray quick start installation, and we are tracking some incompatibility here: https://github.com/ray-project/ray/issues?q=is%3Aopen+is%3Aissue+milestone%3A%22Python+3.11+%22

Copy link
Contributor

@rickyyx rickyyx left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also - @csko could you update the PR discription (title) to reflect what we have left out in the PR and what have been included? Thanks!
Oh nvm, I think it's documented there.

@rickyyx rickyyx removed the @external-author-action-required Alternate tag for PRs where the author doesn't have labeling permission. label Jan 6, 2023
Copy link
Contributor

@krfricke krfricke left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

`Linux Python 3.8`_ `MacOS Python 3.8`_ `Windows Python 3.8`_
`Linux Python 3.7`_ `MacOS Python 3.7`_ `Windows Python 3.7`_
`Linux Python 3.6`_ `MacOS Python 3.6`_
`Linux Python 3.11`_ `MacOS Python 3.10`_ `Windows Python 3.10`_
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

can we avoid this "off by one" format? maybe just put 3.11 at the bottom (and label as experimental if necessary?)

Signed-off-by: Kornel Csernai <[email protected]>
Copy link
Contributor

@richardliaw richardliaw left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ricky, the table doesn't seem to render anymore

Signed-off-by: Kornel Csernai <[email protected]>
Copy link
Contributor

@pcmoritz pcmoritz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks good to me, but I did notice that the download link for the Python 3.11 wheels in the docs is currently not working. Will that be automatically fixed once the PR is merged or do we need to do anything else?

@pcmoritz pcmoritz dismissed richardliaw’s stale review January 7, 2023 17:58

This has been fixed now

@pcmoritz
Copy link
Contributor

pcmoritz commented Jan 7, 2023

I checked that wheels are only uploaded after the PR is merged -- let's try to merge it :)

@pcmoritz pcmoritz merged commit 0c8b59d into ray-project:master Jan 7, 2023
@pcmoritz
Copy link
Contributor

pcmoritz commented Jan 7, 2023

After merging and the master build finished, the link is now indeed working 🎉

AmeerHajAli pushed a commit that referenced this pull request Jan 12, 2023
Preliminary PR for adding Python 3.11 support, mapping out various dependencies, fixing issues.

### Main changes

- Upgrade cython to 0.29.32
- Add CI/CD steps for 3.11 wheel
- Change cython code to not use `recursion_depth`
- Update cloudpickle to latest
- Use newer manylinux2014 which has python3.11
- Condition certain python packages in requirements.txt on <3.11 that don't yet have a 3.11 version

### Checklist:

- cython
  - [x] remove deprecated `recursion_depth`
  - [x] exc_type cython/cython#4500
- [ ] package dependencies https://pyreadiness.org/3.11/
  - [ ] llvmlite numba/llvmlite#869
  - [ ] numba numba/numba#8304
  - [ ] pyarrow
  - [ ] scikit-learn
  - [ ] pydantic
  - [x] cloudpickle
  - [x] upgrade cython to 0.29.32
  - [ ] tensorflow tensorflow/tensorflow#58032
  - [ ] torch pytorch/pytorch#86566
  - [ ] miniconda conda/conda#11170
    - [ ] `docker/base-deps/Dockerfile`
- [x] claim to support 3.11 in setup.py
- [ ] cicd
  - [ ] .buildkite/
    - [ ] .buildkite/pipeline.build.yml
  - [ ] ci/
    - [ ] ci/build/test-wheels.sh
    - [ ] ci/build/build-docker-images.py
  - [ ] release tests
  - [ ] docker/retag-lambda/python_versions.txt
  - [ ] download_wheels.sh
  - [ ] wheels
    - [ ] `python/build-wheel-macos.sh`
    - [ ] `python/build-wheel-windows.sh`
- [ ] Tests
  - [ ] pytest ray/serve/tests
  - [ ] python python/ray/serve/examples/echo_full.py
  - [ ] bazel test //:core_worker_test
  - [ ] bazel test --build_tests_only //:all
  - [ ] //python/ray/tests:test_pydantic_serialization fastapi/fastapi#5048
  - [ ] //python/ray/train:test_torch_utils
- [ ] Documentation
  - [x] installation.rst

Current status: 
Linux and mac wheels build in CICD. Docker images will come in a separate PR.
tamohannes pushed a commit to ju2ez/ray that referenced this pull request Jan 25, 2023
Preliminary PR for adding Python 3.11 support, mapping out various dependencies, fixing issues.

### Main changes

- Upgrade cython to 0.29.32
- Add CI/CD steps for 3.11 wheel
- Change cython code to not use `recursion_depth`
- Update cloudpickle to latest
- Use newer manylinux2014 which has python3.11
- Condition certain python packages in requirements.txt on <3.11 that don't yet have a 3.11 version

### Checklist:

- cython
  - [x] remove deprecated `recursion_depth`
  - [x] exc_type cython/cython#4500
- [ ] package dependencies https://pyreadiness.org/3.11/
  - [ ] llvmlite numba/llvmlite#869
  - [ ] numba numba/numba#8304
  - [ ] pyarrow
  - [ ] scikit-learn
  - [ ] pydantic
  - [x] cloudpickle
  - [x] upgrade cython to 0.29.32
  - [ ] tensorflow tensorflow/tensorflow#58032
  - [ ] torch pytorch/pytorch#86566
  - [ ] miniconda conda/conda#11170
    - [ ] `docker/base-deps/Dockerfile`
- [x] claim to support 3.11 in setup.py
- [ ] cicd
  - [ ] .buildkite/
    - [ ] .buildkite/pipeline.build.yml
  - [ ] ci/
    - [ ] ci/build/test-wheels.sh
    - [ ] ci/build/build-docker-images.py
  - [ ] release tests
  - [ ] docker/retag-lambda/python_versions.txt
  - [ ] download_wheels.sh
  - [ ] wheels
    - [ ] `python/build-wheel-macos.sh`
    - [ ] `python/build-wheel-windows.sh`
- [ ] Tests
  - [ ] pytest ray/serve/tests
  - [ ] python python/ray/serve/examples/echo_full.py
  - [ ] bazel test //:core_worker_test
  - [ ] bazel test --build_tests_only //:all
  - [ ] //python/ray/tests:test_pydantic_serialization fastapi/fastapi#5048
  - [ ] //python/ray/train:test_torch_utils
- [ ] Documentation
  - [x] installation.rst

Current status: 
Linux and mac wheels build in CICD. Docker images will come in a separate PR.

Signed-off-by: tmynn <[email protected]>
@grizzlybearg
Copy link

Are there any plans for windows python 3.11 wheels?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants