Skip to content

Add support for Python 3.14#7831

Merged
rapids-bot[bot] merged 15 commits intorapidsai:mainfrom
gforsyth:python-3.14
Mar 11, 2026
Merged

Add support for Python 3.14#7831
rapids-bot[bot] merged 15 commits intorapidsai:mainfrom
gforsyth:python-3.14

Conversation

@gforsyth
Copy link
Copy Markdown
Contributor

Description

Contributes to rapidsai/build-planning#205

This PR adds support for Python 3.14.

Notes for Reviewers

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

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

This will fail until all dependencies have been updated to Python 3.14

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

This can be merged whenever all CI jobs are passing.

@gforsyth gforsyth added non-breaking Non-breaking change improvement Improvement / enhancement to an existing function labels Feb 24, 2026
@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot bot commented Feb 24, 2026

Auto-sync is disabled for draft pull requests in this repository. Workflows must be run manually.

Contributors can view more details about this message here.

@github-actions github-actions bot added the conda conda issue label Feb 24, 2026
@gforsyth gforsyth marked this pull request as ready for review March 2, 2026 17:25
@gforsyth gforsyth requested review from a team as code owners March 2, 2026 17:25
@gforsyth gforsyth requested a review from bdice March 2, 2026 17:25
@coderabbitai
Copy link
Copy Markdown

coderabbitai bot commented Mar 2, 2026

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review
📝 Walkthrough

Walkthrough

Updated reusable GitHub workflow references to the python-3.14 release tag, bumped documented Python/Cython targets to 3.14, widened numba/numba-cuda dependency constraints, adjusted conda/recipe/matrix files for Python 3.14, and made ONNX test imports optional at runtime.

Changes

Cohort / File(s) Summary
GitHub Workflows
.github/workflows/build.yaml, .github/workflows/pr.yaml, .github/workflows/pr_issue_status_automation.yml, .github/workflows/test.yaml, .github/workflows/trigger-breaking-change-alert.yaml
Replaced reusable-workflow uses: references from main to the python-3.14 release tag across multiple jobs; inputs and conditional logic unchanged.
Docs & Build notes
BUILD.md, python/cuml/README.md
Bumped documented Python target to 3.14 and raised minimum Cython requirement to >=3.2.2.
Conda environment specs
conda/environments/all_cuda-129_arch-aarch64.yaml, conda/environments/all_cuda-129_arch-x86_64.yaml, conda/environments/all_cuda-131_arch-aarch64.yaml, conda/environments/all_cuda-131_arch-x86_64.yaml
Removed Python upper bound (python>=3.11,<3.14python>=3.11), bumped numba-cuda to >=0.22.2, and widened numba upper bound to <0.65.0; one file added additional deps.
Conda recipe
conda/recipes/cuml/recipe.yaml
Set py_runtime_latest to "3.14" and widened numba/numba-cuda constraints in host/run requirements.
Dependency matrices
dependencies.yaml
Added explicit python=3.14 entries, adjusted numba/numba-cuda constraints (0.22.10.22.2), and added TODOs for onnxruntime/skl2onnx on 3.14.
Python packaging
python/cuml/pyproject.toml
Bumped numba-cuda to >=0.22.2, widened numba upper bound to <0.65.0, removed onnxruntime/skl2onnx from optional test extras, and updated umap-learn constraint.
Python tests
python/cuml/cuml_accel_tests/test_onnx.py
Replaced unconditional imports of onnxruntime and skl2onnx with guarded/runtime-imports (pytest.importorskip) so tests skip when those deps are absent.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested labels

ci

Suggested reviewers

  • msarahan
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Add support for Python 3.14' clearly and concisely summarizes the main change across the changeset, which adds Python 3.14 support throughout workflow files, dependencies, and build configurations.
Description check ✅ Passed The description is directly related to the changeset, explaining the purpose of adding Python 3.14 support, referencing the upstream issue, and providing context about temporary workflow references and expected CI failures.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment

Comment @coderabbitai help to get the list of available commands and usage tips.

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@BUILD.md`:
- Line 65: The Python version statement earlier in BUILD.md ("Python (>= 3.11
and <= 3.13)") conflicts with the new conda command `conda create -n cuml_dev
python=3.14`; update that earlier Python version text to reflect the supported
range that includes 3.14 (e.g., adjust to "Python (>= 3.11 and <= 3.14)" or a
specific compatible version list) so the documentation is consistent; edit the
string on line containing `Python (>= 3.11 and <= 3.13)` to match the `conda
create -n cuml_dev python=3.14` instruction.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 133ea47 and 7a482c4.

📒 Files selected for processing (12)
  • .github/workflows/build.yaml
  • .github/workflows/pr.yaml
  • .github/workflows/pr_issue_status_automation.yml
  • .github/workflows/test.yaml
  • .github/workflows/trigger-breaking-change-alert.yaml
  • BUILD.md
  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • conda/environments/all_cuda-129_arch-x86_64.yaml
  • conda/environments/all_cuda-131_arch-aarch64.yaml
  • conda/environments/all_cuda-131_arch-x86_64.yaml
  • conda/recipes/cuml/recipe.yaml
  • dependencies.yaml

@gforsyth gforsyth requested a review from a team as a code owner March 2, 2026 19:03
@gforsyth gforsyth requested a review from viclafargue March 2, 2026 19:03
@github-actions github-actions bot added the Cython / Python Cython or Python issue label Mar 2, 2026
Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@conda/recipes/cuml/recipe.yaml`:
- Around line 101-102: The conda recipe lists "numba-cuda >=0.22.1" which is out
of sync with other files; update the dependency in recipe.yaml to "numba-cuda
>=0.22.2" so it matches python/cuml/pyproject.toml, dependencies.yaml, and
environment files; modify the dependency line where "numba-cuda" is declared in
the conda/recipes/cuml/recipe.yaml to use the >=0.22.2 constraint.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 7a482c4 and d08cbe5.

📒 Files selected for processing (9)
  • BUILD.md
  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • conda/environments/all_cuda-129_arch-x86_64.yaml
  • conda/environments/all_cuda-131_arch-aarch64.yaml
  • conda/environments/all_cuda-131_arch-x86_64.yaml
  • conda/recipes/cuml/recipe.yaml
  • dependencies.yaml
  • python/cuml/README.md
  • python/cuml/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (2)
  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • BUILD.md

@gforsyth
Copy link
Copy Markdown
Contributor Author

gforsyth commented Mar 2, 2026

/ok to test

@gforsyth
Copy link
Copy Markdown
Contributor Author

gforsyth commented Mar 3, 2026

Test failures in fuzzy_simplicial_sets that I don't understand.

For Python 3.14, there is no conda package yet for onnxruntime

xref conda-forge/onnxruntime-feedstock#169
xref conda-forge/onnxruntime-feedstock#163

Also onnxruntime tests suite segfaults on Python 3.14 on version 1.24.2
xref microsoft/onnxruntime#27392

@gforsyth
Copy link
Copy Markdown
Contributor Author

gforsyth commented Mar 3, 2026

/ok to test

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🧹 Nitpick comments (1)
python/cuml/cuml_accel_tests/test_onnx.py (1)

9-12: Consider removing redundant commented imports.

These commented-out imports duplicate what's now being imported at lines 34-35. Keeping both creates confusion about the intended state.

✂️ Proposed cleanup
 # TODO: restore these after onnxruntime has 3.14 support
-# import onnxruntime as ort
-# from skl2onnx import convert_sklearn
-# from skl2onnx.common.data_types import FloatTensorType

Once onnxruntime has 3.14 support, you can remove the pytest.importorskip calls and restore the direct imports at the top of the file.

🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed.

In `@python/cuml/cuml_accel_tests/test_onnx.py` around lines 9 - 12, Remove the
redundant commented import lines for onnxruntime, convert_sklearn, and
FloatTensorType at the top (the three commented lines) since those modules are
conditionally imported later with pytest.importorskip; keep the conditional
pytest.importorskip usage that imports onnxruntime and skl2onnx (referenced by
onnxruntime/ort, convert_sklearn, and FloatTensorType) and add a short comment
if desired about restoring direct imports once onnxruntime 3.14 is supported.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@python/cuml/cuml_accel_tests/test_onnx.py`:
- Around line 28-37: The module-level try/except silently allows onnxruntime to
be present while skl2onnx is missing, causing NameError later; replace the
try/except with pytest.importorskip for skl2onnx and then import the required
symbols (ensure convert_sklearn and FloatTensorType are imported after calling
pytest.importorskip) so tests are skipped at import time when skl2onnx is
absent; update the import block that currently references ort, convert_sklearn,
and FloatTensorType to use pytest.importorskip("skl2onnx") before importing
those symbols.

---

Nitpick comments:
In `@python/cuml/cuml_accel_tests/test_onnx.py`:
- Around line 9-12: Remove the redundant commented import lines for onnxruntime,
convert_sklearn, and FloatTensorType at the top (the three commented lines)
since those modules are conditionally imported later with pytest.importorskip;
keep the conditional pytest.importorskip usage that imports onnxruntime and
skl2onnx (referenced by onnxruntime/ort, convert_sklearn, and FloatTensorType)
and add a short comment if desired about restoring direct imports once
onnxruntime 3.14 is supported.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 354f513 and 1e3bad9.

📒 Files selected for processing (15)
  • .github/workflows/build.yaml
  • .github/workflows/pr.yaml
  • .github/workflows/pr_issue_status_automation.yml
  • .github/workflows/test.yaml
  • .github/workflows/trigger-breaking-change-alert.yaml
  • BUILD.md
  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • conda/environments/all_cuda-129_arch-x86_64.yaml
  • conda/environments/all_cuda-131_arch-aarch64.yaml
  • conda/environments/all_cuda-131_arch-x86_64.yaml
  • conda/recipes/cuml/recipe.yaml
  • dependencies.yaml
  • python/cuml/README.md
  • python/cuml/cuml_accel_tests/test_onnx.py
  • python/cuml/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (12)
  • .github/workflows/test.yaml
  • conda/recipes/cuml/recipe.yaml
  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • conda/environments/all_cuda-131_arch-aarch64.yaml
  • conda/environments/all_cuda-129_arch-x86_64.yaml
  • dependencies.yaml
  • .github/workflows/pr.yaml
  • BUILD.md
  • .github/workflows/build.yaml
  • .github/workflows/pr_issue_status_automation.yml
  • .github/workflows/trigger-breaking-change-alert.yaml
  • python/cuml/pyproject.toml

@gforsyth
Copy link
Copy Markdown
Contributor Author

gforsyth commented Mar 3, 2026

/ok to test

Copy link
Copy Markdown

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

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

Actionable comments posted: 1

🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.

Inline comments:
In `@python/cuml/cuml_accel_tests/test_onnx.py`:
- Around line 30-33: Change the unconditional pytest.importorskip() calls to
only run on Python 3.14+ and do normal imports on older Pythons so missing
packages raise ImportError (failing the test) rather than being skipped: check
sys.version_info >= (3,14) and if true call pytest.importorskip("onnxruntime")
and pytest.importorskip("skl2onnx"), otherwise perform direct imports of
onnxruntime and skl2onnx and then import convert_sklearn and FloatTensorType as
before.

ℹ️ Review info

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1e3bad9 and a61f325.

📒 Files selected for processing (7)
  • conda/environments/all_cuda-129_arch-aarch64.yaml
  • conda/environments/all_cuda-129_arch-x86_64.yaml
  • conda/environments/all_cuda-131_arch-aarch64.yaml
  • conda/environments/all_cuda-131_arch-x86_64.yaml
  • dependencies.yaml
  • python/cuml/cuml_accel_tests/test_onnx.py
  • python/cuml/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (1)
  • conda/environments/all_cuda-129_arch-aarch64.yaml

packages:
- scikit-learn==1.5.0
- umap-learn==0.5.7
- numpy==1.23
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

but also shouldn't oldest be on the oldest supported numpy? added here

Comment on lines +41 to +44
@pytest.mark.xfail(
Version(numba.__version__) >= Version("0.62.0"),
reason="Upstream regression in umap with numba >= 0.62.0",
)
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Comment on lines +43 to +49
- reason: UMAP using removed numpy function `in1d`
marker: cuml_accel_no_numpy_in1d
condition: umap-learn<=0.5.7 and numpy>=2.4
tests:
- "umap.tests.test_aligned_umap::test_aligned_update"
- "umap.tests.test_aligned_umap::test_aligned_update_params"
- "umap.tests.test_aligned_umap::test_neighbor_local_neighbor_accuracy"
Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Sufficiently old umap-learn uses the removed-in-numpy-2.4 numpy.in1d

chore: gate importorskip on version

chore(deps): test constraining numpy<2.4

chore(deps): test constraining numpy<2.3

chore(deps): pin `numba` to 0.61.2

chore(deps): pin `numba` to 0.62.0

Revert "chore(deps): pin `numba` to 0.62.0"

This reverts commit 7ced126.

Revert "chore(deps): pin `numba` to 0.61.2"

This reverts commit 73888b7.

Revert "chore(deps): test constraining numpy<2.3"

This reverts commit bf15971.

Revert "chore(deps): test constraining numpy<2.4"

This reverts commit dd04a86.
Adding it to the existing flaky upstream tests
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Tracking these new xfails in #7873 .

Copy link
Copy Markdown
Member

@jameslamb jameslamb left a comment

Choose a reason for hiding this comment

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

Changes look good to me. I've been following the conversation around UMAP and the other stuff, all the choices look good to me.

@gforsyth
Copy link
Copy Markdown
Contributor Author

/merge

@rapids-bot rapids-bot bot merged commit 9e39580 into rapidsai:main Mar 11, 2026
188 of 190 checks passed
@gforsyth gforsyth deleted the python-3.14 branch March 11, 2026 18:22
@coderabbitai coderabbitai bot mentioned this pull request Mar 12, 2026
@gforsyth gforsyth mentioned this pull request Mar 19, 2026
2 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

conda conda issue Cython / Python Cython or Python issue improvement Improvement / enhancement to an existing function non-breaking Non-breaking change

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants