8000 BaseSearchCV._run_search raises NotImplementedError instead of being an abstractmethod by adrinjalali · Pull Request #12182 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

BaseSearchCV._run_search raises NotImplementedError instead of being an abstractmethod #12182

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 6 commits into from
Sep 28, 2018

Conversation

adrinjalali
Copy link
Member

Fixes #12173

@jnothman , not sure about the error message though!

@amueller
Copy link
Member

Maybe add a test that you can inherit from this class and overwrite fit without defining _run_search?

@amueller amueller added this to the 0.20.1 milestone Sep 27, 2018
@adrinjalali
Copy link
Member Author

Is there a documentation somewhere where we tell people how to develop an XSearchCV?

@amueller
Copy link
Member

No this is not really officially supported and there's no docs.

@jnothman
Copy link
Member
jnothman commented Sep 28, 2018 via email

Copy link
Member
@jnothman jnothman left a comment

Choose a reason for hiding this comment

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

And we do test but not publicly document such usage

@adrinjalali
Copy link
Member Author

To some extent, our Contributing page has a bunch of content which can be seen as Developer Guid IMO. Rolling your own estimator is an example.

One thing we could do, is to extract the parts of the "contributing" guide which have to do with coding guidelines, and put them in a "developer's guide", and hint to it from our "contributing" page. Then we could improve the coding guidelines and include things such as "how to write your own grid search cv", etc.

Does that sound sensible and/or something you'd like to see happen?

@amueller
Copy link
Member

I think this is fine as it is for now. Thanks.

@amueller amueller merged commit 239482f into scikit-learn:master Sep 28, 2018
@adrinjalali adrinjalali deleted the bug/basesearchcv branch September 29, 2018 12:15
jnothman pushed a commit to jnothman/scikit-learn that referenced this pull request Oct 15, 2018
…an abstractmethod (scikit-learn#12182)

* _run_search raises NotImplementedError instead of being and abstractmethod

* add error message

* test for a BaseSearchCV child w/o a _run_search

* make the test python2 compatible, still in 0.20 zone.

* specify cv in tests not to trigger the related FutureWarning

* PEP8
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants
0