Add support for Python 3.14#7831
Conversation
|
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. |
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
📝 WalkthroughWalkthroughUpdated reusable GitHub workflow references to the Changes
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~20 minutes Possibly related PRs
Suggested labels
Suggested reviewers
🚥 Pre-merge checks | ✅ 3✅ Passed checks (3 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches🧪 Generate unit tests (beta)
Comment |
There was a problem hiding this comment.
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
📒 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.yamlBUILD.mdconda/environments/all_cuda-129_arch-aarch64.yamlconda/environments/all_cuda-129_arch-x86_64.yamlconda/environments/all_cuda-131_arch-aarch64.yamlconda/environments/all_cuda-131_arch-x86_64.yamlconda/recipes/cuml/recipe.yamldependencies.yaml
There was a problem hiding this comment.
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
📒 Files selected for processing (9)
BUILD.mdconda/environments/all_cuda-129_arch-aarch64.yamlconda/environments/all_cuda-129_arch-x86_64.yamlconda/environments/all_cuda-131_arch-aarch64.yamlconda/environments/all_cuda-131_arch-x86_64.yamlconda/recipes/cuml/recipe.yamldependencies.yamlpython/cuml/README.mdpython/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
|
/ok to test |
|
Test failures in For Python 3.14, there is no conda package yet for xref conda-forge/onnxruntime-feedstock#169 Also |
|
/ok to test |
There was a problem hiding this comment.
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 FloatTensorTypeOnce onnxruntime has 3.14 support, you can remove the
pytest.importorskipcalls 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
📒 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.yamlBUILD.mdconda/environments/all_cuda-129_arch-aarch64.yamlconda/environments/all_cuda-129_arch-x86_64.yamlconda/environments/all_cuda-131_arch-aarch64.yamlconda/environments/all_cuda-131_arch-x86_64.yamlconda/recipes/cuml/recipe.yamldependencies.yamlpython/cuml/README.mdpython/cuml/cuml_accel_tests/test_onnx.pypython/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
|
/ok to test |
There was a problem hiding this comment.
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
📒 Files selected for processing (7)
conda/environments/all_cuda-129_arch-aarch64.yamlconda/environments/all_cuda-129_arch-x86_64.yamlconda/environments/all_cuda-131_arch-aarch64.yamlconda/environments/all_cuda-131_arch-x86_64.yamldependencies.yamlpython/cuml/cuml_accel_tests/test_onnx.pypython/cuml/pyproject.toml
🚧 Files skipped from review as they are similar to previous changes (1)
- conda/environments/all_cuda-129_arch-aarch64.yaml
dependencies.yaml
Outdated
| packages: | ||
| - scikit-learn==1.5.0 | ||
| - umap-learn==0.5.7 | ||
| - numpy==1.23 |
There was a problem hiding this comment.
but also shouldn't oldest be on the oldest supported numpy? added here
python/cuml/tests/test_simpl_set.py
Outdated
| @pytest.mark.xfail( | ||
| Version(numba.__version__) >= Version("0.62.0"), | ||
| reason="Upstream regression in umap with numba >= 0.62.0", | ||
| ) |
There was a problem hiding this comment.
| - 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" |
There was a problem hiding this comment.
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
To quickly detect when they no longer fail.
to quickly detect when the issue is fixed
jameslamb
left a comment
There was a problem hiding this comment.
Changes look good to me. I've been following the conversation around UMAP and the other stuff, all the choices look good to me.
|
/merge |
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
mainbranch ofshared-workflowsonce allRAPIDS 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.