Skip to content

Remove deprecations from 26.04#7928

Merged
rapids-bot[bot] merged 6 commits intorapidsai:mainfrom
jcrist:remove-deprecations-2604
Mar 31, 2026
Merged

Remove deprecations from 26.04#7928
rapids-bot[bot] merged 6 commits intorapidsai:mainfrom
jcrist:remove-deprecations-2604

Conversation

@jcrist
Copy link
Copy Markdown
Member

@jcrist jcrist commented Mar 24, 2026

  • Removes deprecated cuml.common.exceptions namespace
  • Removes deprecated support for 1-dimensional X
  • Moves mismatched feature names FutureWarnings to exceptions
  • Un-xfails a bunch of now passing sklearn compatibility tests

@jcrist jcrist self-assigned this Mar 24, 2026
@jcrist jcrist requested a review from a team as a code owner March 24, 2026 21:51
@jcrist jcrist requested a review from divyegala March 24, 2026 21:51
@jcrist jcrist added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change sklearn-api-compat Issues around cuml matching sklearn API conventions/standards labels Mar 24, 2026
@github-actions github-actions Bot added the Cython / Python Cython or Python issue label Mar 24, 2026
@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 24, 2026

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: bf6497d9-50c2-4ee9-9760-ce5a7a3ffc21

📥 Commits

Reviewing files that changed from the base of the PR and between 5e954f7 and 2462e0d.

📒 Files selected for processing (6)
  • python/cuml/cuml/common/exceptions.py
  • python/cuml/cuml/internals/validation.py
  • python/cuml/tests/test_sklearn_compatibility.py
  • python/cuml/tests/test_sklearn_import_export.py
  • python/cuml/tests/test_target_encoder.py
  • python/cuml/tests/test_validation.py
💤 Files with no reviewable changes (3)
  • python/cuml/tests/test_target_encoder.py
  • python/cuml/cuml/common/exceptions.py
  • python/cuml/tests/test_sklearn_import_export.py

📝 Walkthrough

Summary by CodeRabbit

  • Bug Fixes

    • Improved input validation with stricter error handling for non-2D inputs and mismatched feature names.
    • Fixed sklearn compatibility checks for multiple estimators.
  • Deprecation

    • Removed deprecated NotFittedError import path from cuml.common.exceptions.
  • Breaking Changes

    • Invalid input validation now raises errors immediately instead of warnings.

Walkthrough

This pull request removes deprecated deprecation shims and warning-based fallback behaviors across cuML. It eliminates the NotFittedError deprecation shim, converts input validation to raise immediate errors for non-2D inputs instead of warnings, removes xfail markers from sklearn compatibility tests, and updates test files to expect errors rather than warnings.

Changes

Cohort / File(s) Summary
Deprecation shim removal
python/cuml/cuml/common/exceptions.py
Removed NotFittedError module-level deprecation shim, including __all__ export and dynamic __getattr__ that previously emitted FutureWarning and imported from sklearn.
Input validation hardening
python/cuml/cuml/internals/validation.py
Converted non-2D input handling from warn-or-error pattern to immediate ValueError; removed deprecated _warn_or_error helper and replaced conditional warnings with direct errors in _get_n_features, _get_feature_names, and check_features.
Test configuration updates
python/cuml/tests/test_sklearn_compatibility.py
Removed 45 xfail entries for various estimators' check_fit1d and check_fit2d_predict1d tests; updated TSNE's check_fit2d_predict1d failure reason.
Warning removal from tests
python/cuml/tests/test_sklearn_import_export.py, python/cuml/tests/test_target_encoder.py, python/cuml/tests/test_validation.py
Removed warning suppression decorators and tests that validated FutureWarning behavior; updated validation tests to assert ValueError/TypeError instead of FutureWarning.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested labels

breaking

Suggested reviewers

  • divyegala
  • betatim
  • csadorf
🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title 'Remove deprecations from 26.04' directly and clearly summarizes the main purpose of the changeset, which is the removal of deprecated features and APIs.
Description check ✅ Passed The description is directly related to the changeset, providing specific details about four key removals: deprecated namespace, 1D input support, warnings converted to exceptions, and un-xfailed tests.
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

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

Copy link
Copy Markdown
Member

@dantegd dantegd left a comment

Choose a reason for hiding this comment

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

lgtm

@jcrist
Copy link
Copy Markdown
Member Author

jcrist commented Mar 31, 2026

/merge

@rapids-bot rapids-bot Bot merged commit 68990b4 into rapidsai:main Mar 31, 2026
171 of 174 checks passed
@jcrist jcrist deleted the remove-deprecations-2604 branch March 31, 2026 22:06
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 sklearn-api-compat Issues around cuml matching sklearn API conventions/standards

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants