Skip to content

Remove deprecated legacy output types - #8439

Merged
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
jcrist:remove-legacy-output-types
Aug 4, 2026
Merged

Remove deprecated legacy output types#8439
rapids-bot[bot] merged 3 commits into
NVIDIA:mainfrom
jcrist:remove-legacy-output-types

Conversation

@jcrist

@jcrist jcrist commented Aug 3, 2026

Copy link
Copy Markdown
Member

This removes support for the following deprecated output_type values:

  • "numba"
  • "dataframe"
  • "series"
  • "df_obj"
  • "array"

The latter 4 are all aliases for other concrete types (e.g. "array" is the same as "cupy"). For "numba", cuml now treats numba inputs the same as any other non-cupy input type that implements __cuda_array_interface__ (coerces to cupy, and returns cupy outputs by default). This code path is still tested in the generic estimator input/output types, but in most other places where numba was explicitly part of the parametrized tests we've opted to simplify to remove that branch as duplicative of cupy inputs.

This also removes the deprecated sparse_pairwise_distances function. This should have been handled in #8435, but was accidentally missed. This is the only remaining deprecation in need of removal for 26.10 - I'm including it here to avoid another PR.

Part of #8225.

@jcrist jcrist self-assigned this Aug 3, 2026
@jcrist
jcrist requested a review from a team as a code owner August 3, 2026 22:31
@jcrist
jcrist requested a review from betatim August 3, 2026 22:31
@jcrist jcrist added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Aug 3, 2026
@github-actions github-actions Bot added the Cython / Python Cython or Python issue label Aug 3, 2026
@coderabbitai

coderabbitai Bot commented Aug 3, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Enterprise

Run ID: de7560aa-dda7-43b7-8bba-90b9c35df52c

📥 Commits

Reviewing files that changed from the base of the PR and between 05a7356 and 5d2f8df.

📒 Files selected for processing (17)
  • docs/source/api/cuml.metrics.rst
  • python/cuml/cuml/internals/base.py
  • python/cuml/cuml/internals/outputs.py
  • python/cuml/cuml/metrics/__init__.py
  • python/cuml/cuml/metrics/pairwise_distances.pyx
  • python/cuml/cuml/model_selection/_split.py
  • python/cuml/cuml/testing/test_preproc_utils.py
  • python/cuml/tests/explainer/test_sampling.py
  • python/cuml/tests/test_compose.py
  • python/cuml/tests/test_dataset_generator_types.py
  • python/cuml/tests/test_make_arima.py
  • python/cuml/tests/test_metrics.py
  • python/cuml/tests/test_preprocessing.py
  • python/cuml/tests/test_reflection.py
  • python/cuml/tests/test_svm.py
  • python/cuml/tests/test_train_test_split.py
  • wiki/python/ESTIMATOR_GUIDE.md
💤 Files with no reviewable changes (7)
  • docs/source/api/cuml.metrics.rst
  • python/cuml/tests/test_metrics.py
  • python/cuml/tests/test_compose.py
  • python/cuml/tests/test_dataset_generator_types.py
  • python/cuml/tests/test_make_arima.py
  • python/cuml/tests/test_preprocessing.py
  • python/cuml/tests/test_svm.py
🚧 Files skipped from review as they are similar to previous changes (9)
  • python/cuml/cuml/testing/test_preproc_utils.py
  • python/cuml/cuml/metrics/init.py
  • wiki/python/ESTIMATOR_GUIDE.md
  • python/cuml/cuml/internals/base.py
  • python/cuml/tests/test_train_test_split.py
  • python/cuml/cuml/internals/outputs.py
  • python/cuml/tests/test_reflection.py
  • python/cuml/tests/explainer/test_sampling.py
  • python/cuml/cuml/model_selection/_split.py

📝 Walkthrough

Summary by CodeRabbit

  • Breaking Changes

    • Removed support for deprecated output types, including numba, array, dataframe, series, and df_obj.
    • Updated output conversion and inference to support only current NumPy, CuPy, cuDF, pandas, and input-based types.
    • Removed the deprecated sparse_pairwise_distances metric.
  • Documentation

    • Updated estimator and metrics documentation to reflect supported output types and metrics.

Walkthrough

The PR removes deprecated output types, Numba array handling, related warnings, and the sparse_pairwise_distances public API. Tests, fixtures, and documentation now cover the remaining output types and metrics.

Changes

Legacy API removal

Layer / File(s) Summary
Output-type contracts and conversions
python/cuml/cuml/internals/outputs.py
OUTPUT_TYPES and conversion paths now exclude legacy aliases and Numba arrays.
Runtime output handling and split integration
python/cuml/cuml/internals/base.py, python/cuml/cuml/model_selection/_split.py
Base estimator output handling and train_test_split no longer use deprecated warnings or Numba conversions.
Sparse pairwise distance API removal
python/cuml/cuml/metrics/..., docs/source/api/cuml.metrics.rst
The deprecated wrapper, export, and documentation entry are removed.
Test coverage and output-type documentation
python/cuml/cuml/testing/..., python/cuml/tests/..., wiki/python/ESTIMATOR_GUIDE.md
Tests, fixtures, warning filters, and documentation now cover only supported output types and APIs.

Estimated code review effort: 3 (Moderate) | ~25 minutes

Possibly related issues

  • rapidsai/cuml#8225: Directly tracks removal of deprecated output_type and Numba output handling.

Possibly related PRs

Suggested reviewers: betatim, dantegd, jameslamb

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 26.47% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the primary change: removing deprecated legacy output types.
Description check ✅ Passed The description directly explains the removal of deprecated output types and the deprecated sparse_pairwise_distances function.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests

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

jcrist added 3 commits August 3, 2026 18:22
Removes support for the following `output_type` values:

- `"array"`
- `"dataframe"`
- `"series"`
- `"df_obj"`
- `"numba"`
@jcrist
jcrist force-pushed the remove-legacy-output-types branch from 05a7356 to 5d2f8df Compare August 3, 2026 23:25
@csadorf

csadorf commented Aug 4, 2026

Copy link
Copy Markdown
Contributor

/merge

@rapids-bot
rapids-bot Bot merged commit ba9a2b3 into NVIDIA:main Aug 4, 2026
97 checks passed
@jcrist
jcrist deleted the remove-legacy-output-types branch August 4, 2026 13:55
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

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.

4 participants