CI Fix cuml.svm compatibility with scikit-learn 1.9 deprecation of probability= - #7981
Merged
rapids-bot[bot] merged 3 commits intoApr 28, 2026
Merged
Conversation
probability scikit-learn 1.9 will deprecate the `probability` parameter of the SVC estimators. Our `as_sklearn` and some tests needed adjusting to either not pass this or pick up an new private attribute.
This comment was marked as outdated.
This comment was marked as outdated.
probability=probability=
This comment was marked as outdated.
This comment was marked as outdated.
betatim
commented
Apr 22, 2026
betatim
commented
Apr 22, 2026
betatim
commented
Apr 22, 2026
jcrist
reviewed
Apr 22, 2026
jcrist
left a comment
Member
There was a problem hiding this comment.
Thanks for working on this! I think this is a good path to get things in now.
In the medium term I am very pro deprecating our probability=True support in SVC (and LinearSVC, which sklearn doesn't do either). Internally we effectively use CalibratedClassifier, but we don't generate the same _probA/_probB that sklearn would currently. I'd be happy to see this complication gone and rely on CalibratedClassifier explicitly. Simpler code, better separation of concerns.
This comment was marked as outdated.
This comment was marked as outdated.
Contributor
Author
|
/ok to test 2fdb19c |
This comment was marked as outdated.
This comment was marked as outdated.
csadorf
approved these changes
Apr 28, 2026
Comment on lines
+204
to
+205
| # sklearn 1.9 changed the default of `probability` from False to the | ||
| # sentinel string "deprecated"; coerce to the bool cuml uses. |
Contributor
There was a problem hiding this comment.
(potential follow-up) Should we deprecate this for cuML's SVC as well?
Member
|
/merge |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
closes #7838
scikit-learn 1.9 will deprecate the
probabilityparameter of the SVC estimators. Ouras_sklearnand some tests needed adjusting to either not pass this or pick up an new private attribute.I've tried to transition all our tests to use the new recommended
CalibratedClassifierCV(SVC(), ensemble=False)pattern. There is one test that silences a warning, the one that tests round tripping (as_sklearn/from_sklearn). I think we should change ouras_sklearnto return aCalibratedClassifierCV(...)whenprobability=True. Or maybe we also dropprobabilityas a hyper-parameter? Bottom line, making that decision needs input from others and maybe makes the scope of this PR a bit too big. So for now I silenced the warning.