Skip to content

Increase scikit-learn compatibility to 1.5+#6666

Merged
rapids-bot[bot] merged 17 commits intorapidsai:branch-25.06from
csadorf:sklearn-compat-1.6
May 12, 2025
Merged

Increase scikit-learn compatibility to 1.5+#6666
rapids-bot[bot] merged 17 commits intorapidsai:branch-25.06from
csadorf:sklearn-compat-1.6

Conversation

@csadorf
Copy link
Copy Markdown
Contributor

@csadorf csadorf commented May 9, 2025

This PR updates the scikit-learn dependency requirements and adds dependency constraints for testing:

  • Relaxes scikit-learn version test requirement from ==1.5.* to >=1.5
  • Adds dependency constraints generation for wheel testing
  • Adds a new test matrix for "oldest-dep" CI runs, pinning scikit-learn to ==1.5.2

Based on #6608 .

@copy-pr-bot
Copy link
Copy Markdown

copy-pr-bot Bot commented May 9, 2025

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 conda conda issue Cython / Python Cython or Python issue ci labels May 9, 2025
@csadorf csadorf added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels May 9, 2025
@csadorf csadorf self-assigned this May 9, 2025
@csadorf
Copy link
Copy Markdown
Contributor Author

csadorf commented May 9, 2025

/ok to test eecf4f6

@csadorf
Copy link
Copy Markdown
Contributor Author

csadorf commented May 9, 2025

/ok to test cac0fd7

@csadorf csadorf marked this pull request as ready for review May 9, 2025 19:18
@csadorf csadorf requested review from a team as code owners May 9, 2025 19:18
@csadorf csadorf requested review from bdice, cjnolet and msarahan May 9, 2025 19:18
@csadorf csadorf changed the title Add compatibility with scikit-learn version 1.6. Update scikit-learn dependency to >=1.5 May 9, 2025
@csadorf csadorf changed the title Update scikit-learn dependency to >=1.5 Update scikit-learn compatibility to >=1.5 May 9, 2025
@csadorf csadorf linked an issue May 10, 2025 that may be closed by this pull request
2 tasks
@csadorf csadorf changed the title Update scikit-learn compatibility to >=1.5 Increase scikit-learn compatibility to 1.5+ May 10, 2025
Copy link
Copy Markdown
Member

@jcrist jcrist left a comment

Choose a reason for hiding this comment

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

Overall LGTM! Just a couple small questions/comments.

- reason: Test is failing with cuml.accel
- reason: Test should fail with cuml.accel (scikit-learn 1.5)
marker: cuml_accel_bugs
condition: "scikit-learn<1.6"
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Question around this condition - do these tests pass in scikit-learn 1.6 (and if so, why?)?

Or do the tests not exist in scikit-learn 1.6? If it's the latter, would removing the condition cause the test run to fail in some way (so typos/stale test markers are detectable)? Or is the condition technically not necessary in that case?

Same with the >= 1.6 case below.

Comment thread README.md

## Scikit-learn Compatibility

cuML is compatible with scikit-learn version 1.5 or higher.
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

"or higher" reads odd to me, but maybe it's just Monday morning. "and higher"? "and up"? Maybe just a version constraint? Feel free to ignore, maybe I'm just overthinking.

Suggested change
cuML is compatible with scikit-learn version 1.5 or higher.
cuML is compatible with scikit-learn >= 1.5.

Comment thread dependencies.yaml
Comment on lines +480 to +488
specific:
- output_types: [conda, requirements]
matrices:
# Package versions to user for the "oldest-dep" CI run
- matrix: {dependencies: "oldest"}
packages:
- scikit-learn==1.5.2
- matrix:
packages:
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Nitpick: we usually put specific after common.

@csadorf
Copy link
Copy Markdown
Contributor Author

csadorf commented May 12, 2025

Thanks a lot for the review comments. I intent to address all questions and suggestions in a follow-up.

@csadorf
Copy link
Copy Markdown
Contributor Author

csadorf commented May 12, 2025

/merge

@rapids-bot rapids-bot Bot merged commit 0e033ac into rapidsai:branch-25.06 May 12, 2025
91 of 92 checks passed
@csadorf csadorf deleted the sklearn-compat-1.6 branch May 12, 2025 15:15
rapids-bot Bot pushed a commit that referenced this pull request May 13, 2025
This PR makes scikit-learn a required dependency with a compatibility range matching that of the test range. It is a follow-up to #6666, which added compatibility with scikit-learn versions 1.5+. All conditional import logic for scikit-learn is removed.

Closes #6426.

Authors:
  - Tim Head (https://github.com/betatim)
  - Simon Adorf (https://github.com/csadorf)
  - Jim Crist-Harif (https://github.com/jcrist)

Approvers:
  - Jim Crist-Harif (https://github.com/jcrist)
  - Simon Adorf (https://github.com/csadorf)
  - Kyle Edwards (https://github.com/KyleFromNVIDIA)

URL: #6608
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci 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.

Support scikit-learn version 1.5+

5 participants