Cleanup SGD/MBSGDClassifier/MBSGDRegressor#7504
Merged
rapids-bot[bot] merged 6 commits intorapidsai:release/25.12from Nov 19, 2025
Merged
Cleanup SGD/MBSGDClassifier/MBSGDRegressor#7504rapids-bot[bot] merged 6 commits intorapidsai:release/25.12from
SGD/MBSGDClassifier/MBSGDRegressor#7504rapids-bot[bot] merged 6 commits intorapidsai:release/25.12from
Conversation
44 tasks
jcrist
commented
Nov 18, 2025
Member
Author
|
|
csadorf
approved these changes
Nov 19, 2025
Contributor
csadorf
left a comment
There was a problem hiding this comment.
LGTM, just a few minor comments for posterity and one recommendation.
This method doesn't make sense since: - It only works on binary classification problems - It doesn't validate that the model is a classifier - It doesn't follow our typical conventions Proposing removing it as a breaking change. FWIW no other solver has a classification method, it's unused, and doesn't match a typical name of any sklearn method.
Member
Author
|
/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.
This:
SGD,MBSGDClassifier, andMBSGDRegressor, following all the guidelines in [TRACKER] Cleanup python estimator implementations #7317.fit_sgdfunction to handle fitting a linear model using SGD. This was the last part of Deprecate and removesolver_model#6938 sans deprecation/removal of the solver classes themselves.solver_modelattribute in favor of storing the fitted attributes on the models themselves.MBSGDClassifier, bringing it in line with our other classifiersMBSGDClassifierto ensure it's fitting a binary classification problem, since multiclass is currently not supported.SGD.predictClassmethod. This method is now unused. It didn't validate theSGDrepresented a classification problem, didn't handle non [0, 1] classes, and didn't match any standard method name or interface. Our other solvers only support regression problems, with the caller required to convert the output to solve a classification problem when needed. I dropped it as a breaking change here since I doubt anyone is using it, but could back off to a deprecation if people feel strongly. Dropping it lets us rip outtarget_dtypesooner/easier.Breaking Change Summary:
SGD.predictClassMBSGDClassifier.classes_is now always anumpy.ndarray(mirroring the recent work on our other classifiers)With this cleanup,
target_dtypeis no longer used. After this is in we can remove that bit from our api decorators/base class to simplify our internals further.Part of #7317.
Fixes #6938.