[MRG+3] move NotFittedError to sklearn.base#4309
[MRG+3] move NotFittedError to sklearn.base#4309larsmans wants to merge 1 commit intoscikit-learn:masterfrom
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
NotFittedErrortosklearn.baseso 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.utilsyet, but in any case, an exception that is thrown at the user is a public thing, and it is not a utility.Ping @ogrisel.