-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG+3] move NotFittedError to sklearn.base #4309
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
fine with me |
LGTM as well. Maybe @amueller you want to have a look as well. What about the warnings though. Could also argue that it's part of the public API as it's possible to catch them (although probably a less common idiom than for an exception). |
I think all the warnings should then be in the same place too. otherwise LGTM. |
Could we have a file |
I thought of adding a |
Both options seem fine to me. |
No strong opinions. Although to be fair I think that I think using a dedicated module to host our custom exceptions and warnings will help make our project organization more readable to newcomers. |
That sounds legit... :) @GaelVaroquaux Would you mind sharing your views on this? |
Merge? Has +1 from @agramfort @ogrisel and me as far as I can tell. |
you need to rebase |
The thing is that we now have a released version that tells users to import from |
Meh. I'm moving ChangedBehaviorWarning here #4309. We should really be clear about what is public in |
+1 with deprecating the exceptions and warnings and moving them to an officially public module that is not under
|
Could we simplify and group warnings and exceptions both under exceptions.py as done in sympy? |
Yes but not under |
Fair enough! |
+1 |
@larsmans Would you mind if I took over this and added a |
Bump for the sprint. |
I was asked to share my opinion: +1 for sklearn/exceptions. With regards to hierarchy: let's try and keep it as simple as possible for now, elsewhere it will take ages to merge. At the sprint, we are taking this one over. |
@GaelVaroquaux You might want to review #4826 ;) |
This can be closed, as #4826 has been merged. |
This moves the recently added
NotFittedError
tosklearn.base
so user code that wants to catch it does not have to import it fromsklearn.utils.validation
. I'm not sure if we've made a decision regarding the public status of (parts of)sklearn.utils
yet, but in any case, an exception that is thrown at the user is a public thing, and it is not a utility.Ping @ogrisel.