Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Make get_param_names a class method on single GPU estimators to match Scikit-learn closer #6101

Open
wants to merge 11 commits into
base: branch-24.12
Choose a base branch
from

Conversation

dantegd
Copy link
Member

@dantegd dantegd commented Oct 7, 2024

Small difference between our estimators and Scikit-learn is that get_param_names are a classmethod in sklearn, and not in ours. This can make a few corner cases fail for using our estimators when Scikit-learn like estimators are expected. This PR fixes that.

Note: This will not include dask-based estimators for the time being since they depend on introspection at object creation time.

@dantegd dantegd requested a review from a team as a code owner October 7, 2024 22:43
@github-actions github-actions bot added the Cython / Python Cython or Python issue label Oct 7, 2024
Copy link
Member

@divyegala divyegala left a comment

Choose a reason for hiding this comment

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

Why were none of the Cython files changed?

@dantegd
Copy link
Member Author

dantegd commented Oct 8, 2024

lol because I wrote a script to do this and only checked .py files instead of .pyx files too

@dantegd dantegd changed the title Make get_param_names a class method to match Scikit-learn closer Make get_param_names a class method on single GPU estimators to match Scikit-learn closer Oct 8, 2024
@dantegd dantegd added improvement Improvement / enhancement to an existing function non-breaking Non-breaking change labels Oct 8, 2024
@betatim
Copy link
Member

betatim commented Oct 14, 2024

Do you want to make them private at the same time? On the one hand, then we'd be 100% the same. On the other hand, the fact that they are private in scikit-learn makes me wonder if this matters (as they aren't part of the public API)?

@dantegd
Copy link
Member Author

dantegd commented Oct 16, 2024

@betatim good point, I think matching as close as possible (i.e. entirely) is a good idea

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.

3 participants