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

Add Python 3.12. #213

Merged
merged 2 commits into from
Sep 18, 2024
Merged

Add Python 3.12. #213

merged 2 commits into from
Sep 18, 2024

Conversation

bdice
Copy link
Contributor

@bdice bdice commented May 31, 2024

Contributes to rapidsai/build-planning#40.

This PR adds Python 3.12 entries to conda/wheel build and test jobs.

To keep the total number of GPU test jobs fixed, I modified the Python versions used by some existing jobs.

See previous migration to Python 3.11: #176

@bdice
Copy link
Contributor Author

bdice commented May 31, 2024

I recommend we start rolling out Python 3.12 to RAPIDS repositories after these items:

@vyasr
Copy link
Contributor

vyasr commented Jun 3, 2024

It's worth noting that while we have historically talked about "we can't claim to support anything we don't test", we already violate that rule by only testing a subset, even in nightlies. Therefore I'd argue that the fact that this PR brings us to an even smaller subset isn't categorically bad.

@bdice bdice changed the base branch from branch-24.08 to branch-24.10 August 26, 2024 14:44
@bdice
Copy link
Contributor Author

bdice commented Aug 26, 2024

@jameslamb For awareness -- I updated this PR following #236. It should be ready for you to pick up when you're ready, perhaps after a bit more work on C++ wheels.

# arm64
- { ARCH: 'arm64', PY_VER: '3.10', CUDA_VER: '12.0.1', LINUX_VER: 'ubuntu20.04', GPU: 'a100', DRIVER: 'latest', DEPENDENCIES: 'latest' }
- { ARCH: 'arm64', PY_VER: '3.11', CUDA_VER: '12.0.1', LINUX_VER: 'ubuntu20.04', GPU: 'a100', DRIVER: 'latest', DEPENDENCIES: 'latest' }
nightly:
# amd64
- { ARCH: 'amd64', PY_VER: '3.10', CUDA_VER: '11.4.3', LINUX_VER: 'rockylinux8', GPU: 'v100', DRIVER: 'earliest', DEPENDENCIES: 'oldest' }
Copy link
Contributor Author

Choose a reason for hiding this comment

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

@seberg @vyasr @jameslamb Do we need CI coverage for "oldest dependencies + latest Python version"? I think it might be good to cover that somewhere in our CI to ensure that our pinnings are compatible with all the Python versions we support, but I'm not sure whether others think that is necessary.

Copy link
Contributor

Choose a reason for hiding this comment

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

I would lean towards not worrying too much about it and not do it if that is the only purpose of the job. I doubt it is a very common setup, and while I think having some tests with the oldest versions is important, I doubt that covering it for all Python versions is.

Copy link
Member

Choose a reason for hiding this comment

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

I could go either way on this... right now I'm weakly in favor of adding an "oldest dependencies + latest Python version" job right for nightlies.

To help myself think through this, I wrote out some specific examples below.

Problems I can envision such a job catching that none of the other CI jobs catch (for a fictional dependency somedep):

  1. somedep==1.2.0 does not have wheels for python={newest}
    • which we only catch in CI because compilation of an sdist fails, or there isn't an sdist available at all
  2. somedep==1.2.0 uses some parts of the Python standard library that were changed in some breaking way by python={newest}
    • most likely when somedep publishes py3-none wheels (pure Python like dask or not linking against Python like xgboost)
  3. somedep==1.2.0 has a restrictive pin on Python-requires

A CI job that exposes these types of things could inform more detailed pins for wheels, like this:

dependencies = [
  "somedep>=1.2.0 ; python_version < '3.10'",
  "somedep>=1.4.1 ; python_version >= '3.10'"
]

That richer detail is useful for folks using uv's support for solving to the oldest compatible versions (#228 (comment)) or for anyone in an environment where library versions are locked (e.g. with pip freeze) and who want to upgrade as rarely and as slowly as possible.

I've done exactly that before, actually... I worked on a team managing a medium-sized Apache Airflow deployment where a couple dozen Python codebases had to all share a single Python version... and share it with the service itself. When we went to upgrade the Python version in that system, we tried to upgrade as few libraries as possible, and to update them no further than absolutely necessary to support the next version of Python. In that exercise, I was happy to find out about issues like these via failed pip solves... and sad to find out about them at runtime 😅

Copy link
Member

Choose a reason for hiding this comment

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

Talked about this with @bdice offline.

I still support adding something like it.... but not for this release. We're getting close to burndown for the 24.10 release and trying to get a large amount of packaging changes in.

I think the matrix proposed here should be left as-is and we could come back to testing "latest Python + oldest dependencies" at some time in the future.

@jameslamb
Copy link
Member

I've moved this out of draft, and started the process of opening up PRs to test. See rapidsai/build-planning#40 for a list of those.

I recommend we start rolling out Python 3.12 to RAPIDS repositories after these items:
...
C++ wheels, at least for most of RAPIDS: rapidsai/build-planning#33

To be clear... most of rapidsai/build-planning#33 is NOT done yet, but we've decided to try to get Python 3.12 out in this upcoming release anyway, given that the first Python 3.13 is only a month away: https://devguide.python.org/versions/.

rapids-bot bot pushed a commit to rapidsai/kvikio that referenced this pull request Sep 4, 2024
Contributes to rapidsai/build-planning#40

This PR adds support for Python 3.12.

## Notes for Reviewers

This is part of ongoing work to add Python 3.12 support across RAPIDS.
It temporarily introduces a build/test matrix including Python 3.12, from rapidsai/shared-workflows#213.

A follow-up PR will revert back to pointing at the `branch-24.10` branch of `shared-workflows` once all
RAPIDS repos have added Python 3.12 support.

### This will fail until all dependencies have been updates to Python 3.12

CI here is expected to fail until all of this project's upstream dependencies support Python 3.12.

This can be merged whenever all CI jobs are passing.

Authors:
  - James Lamb (https://github.com/jameslamb)

Approvers:
  - Bradley Dice (https://github.com/bdice)

URL: #458
@jameslamb
Copy link
Member

I won't delete the python-3.12 branch here until we've updated all the repos currently referencing it.

raydouglass pushed a commit to rapidsai/cudf that referenced this pull request Sep 18, 2024
All RAPIDS libraries have been updated with Python 3.12 support, so
Python 3.12 changes
have been merged into `branch-24.10` of `shared-workflows`:
rapidsai/shared-workflows#213

This updates GitHub Actions configs here to that branch.
raydouglass pushed a commit to rapidsai/cugraph that referenced this pull request Sep 18, 2024
All RAPIDS libraries have been updated with Python 3.12 support, so
Python 3.12 changes
have been merged into `branch-24.10` of `shared-workflows`:
rapidsai/shared-workflows#213

This updates GitHub Actions configs here to that branch.
raydouglass pushed a commit to rapidsai/cuml that referenced this pull request Sep 18, 2024
All RAPIDS libraries have been updated with Python 3.12 support, so
Python 3.12 changes
have been merged into `branch-24.10` of `shared-workflows`:
rapidsai/shared-workflows#213

This updates GitHub Actions configs here to that branch.
raydouglass pushed a commit to rapidsai/cuvs that referenced this pull request Sep 18, 2024
All RAPIDS libraries have been updated with Python 3.12 support, so
Python 3.12 changes
have been merged into `branch-24.10` of `shared-workflows`:
rapidsai/shared-workflows#213

This updates GitHub Actions configs here to that branch.
raydouglass pushed a commit to rapidsai/integration that referenced this pull request Sep 18, 2024
All RAPIDS libraries have been updated with Python 3.12 support, so
Python 3.12 changes
have been merged into `branch-24.10` of `shared-workflows`:
rapidsai/shared-workflows#213

This updates GitHub Actions configs here to that branch.
raydouglass pushed a commit to rapidsai/pynvjitlink that referenced this pull request Sep 18, 2024
All RAPIDS libraries have been updated with Python 3.12 support, so
Python 3.12 changes
have been merged into `branch-24.10` of `shared-workflows`:
rapidsai/shared-workflows#213

This updates GitHub Actions configs here to that branch.
@jameslamb
Copy link
Member

There are 0 remaining references to this branch in the rapidsai org: https://github.com/search?q=org%3Arapidsai%20%22%40python-3.12%22&type=code, so I'm deleting this branch.

If we end up needing it for any reason, it'd be easy to manually recreate from the small diff on this PR.

@jameslamb jameslamb deleted the python-3.12 branch September 18, 2024 20:54
AjayThorve pushed a commit to rapidsai/jupyterlab-nvdashboard that referenced this pull request Sep 24, 2024
We recently observed some issues with Python 3.12 + older `flake8`
versions across RAPIDS:
rapidsai/build-planning#101.

This proposes updating all the pre-commit hooks in this repo
(`pre-commit autoupdate`) to avoid such issues the next time someone
comes to push new commits here.

While doing this, I also discovered that wheel CI here was broken by
rapidsai/shared-workflows#213 (see
#205 (comment)).
This fixes that as well.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
improvement Improves an existing functionality non-breaking Introduces a non-breaking change
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants