Skip to content

API make a few estimators' init args kw-only #16474

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

Merged
merged 1 commit into from
Feb 20, 2020

Conversation

adrinjalali
Copy link
Member

Since SLEP009 is accepted, we can start making certain args keyword only. AFAIK we never ended up doing the data-drive-API-design we wanted to do (or did we?). Therefore this PR starts that process by making some of the init args keyword only, in a rather conservative way (or I'd like to think), i.e. it puts the * after the arg which I feel may be used often w/o its name.

One purpose of this PR is for us to get a feeling about how we'd like to proceed, and therefore is not complete and only touches a few estimators.

cc @scikit-learn/core-devs since it touches the API.

Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

LGTM if all goes green

@adrinjalali
Copy link
Member Author

Please note that ideally we'd apply the change in a single release. Therefore it'd be nice if we move this forward before it gets too close to the release :)

@jnothman jnothman merged commit 2467e1b into scikit-learn:master Feb 20, 2020
@jnothman
Copy link
Member

Thanks for pushing this along, @adrinjalali

@amueller
Copy link
Member

Nice! Do you think we'll get any feedback from the dev version? I figure people will only notice once we release so I guess we have to just go for it and see what happens?

@adrinjalali
Copy link
Member Author

Yeah. I'll try to write a blog post and tweet and stuff, with links to the nightly build, hopefully that'll give us some feedback. Otherwise since it doesn't really break people's code, if we get the feedback that in certain places we should accept more parameters as positional, then we can just do that in a bug fix release.

@adrinjalali adrinjalali deleted the kwonly/1 branch February 20, 2020 17:36
thomasjpfan pushed a commit to thomasjpfan/scikit-learn that referenced this pull request Feb 22, 2020
panpiort8 pushed a commit to panpiort8/scikit-learn that referenced this pull request Mar 3, 2020
gio8tisu pushed a commit to gio8tisu/scikit-learn that referenced this pull request May 15, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants