-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
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
Conversation
Maybe add a test that you can inherit from this class and overwrite |
Is there a documentation somewhere where we tell people how to develop an |
No this is not really officially supported and there's no docs. |
Although that's not really fair in the sense that we have no official
interfaces for inheritance but we tell people to go build other
libraries... And _run_search is intended as a small step towards an
interface for inheritance.
I would like to see things built on it
|
There was a problem hiding this 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
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? |
I think this is fine as it is for now. Thanks. |
…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
Fixes #12173
@jnothman , not sure about the error message though!