-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[WIP] Clean up of cross_validation
et al. and model_selection
refactoring
#4254
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
4380634
to
e7fb55b
Compare
e7fb55b
to
0945b5b
Compare
I have a convoluted hack in mind... You probably don't want this... but could you just share your views on such an approach? To warn, whenever the a particular module is used from
So after this
And
This will -
|
You can have module-level deprecation triggered upon import. I won't be On 17 February 2015 at 20:48, ragv notifications@github.com wrote:
|
+1 for a module level deprecation warning that will be raised upon import of this module. |
The idea of moving modules together with redoing the CV objects is that we have a cleaner deprecation path, right? so the cross_validation module will have the old objects and the model_selection module the new objects? |
I'm wondering about ways to get a cleaner diff. |
Btw, the point of my first comment was that if we want to be backward compatible, there will be both the old and the new code in the PR, right? |
(If I understand your comment correctly), we could just import the respective stuff from the new module into the old The reason why I suggested that convoluted hack is :
with ref to the above could someone ping me whenever there is any PR that makes changes to
I've got one more ugly hack based on my question at stack overflow here. Not sure if I myself am +1 for that... but please do take a look |
Also thanks for neat suggestion on using PR to a new branch... I'll do that after rebasing... :) This is my plan to split the PRs -
1 and 2 should be easier to do perhaps in 3 or 4 days... 3 and 4 can now be done without the worry of deprecation / huge diff etc but parts ( or full, depending on how git handles the new files ) still have to be manually rebased for the time the "mov..." branch remains active... do you feel this seems like a sane approach? |
As for the double PR matter: That should make the diff cleaner and easier to review. @amueller, do you see any problem with merging the first PR (moving grid_search to model_selection as it is, docs and test updates, deprecation of grid_search) onto master ASAP? It should be a pretty straightforward change. |
What I understood from the old PR (maybe my misunderstanding) is that we would do renaming together with doing the new CV interface so that we have a decent deprecation path. But then how would you do the deprecation? How would the GridSearchCV object know which cross-validation interface to use? Duck-typing? Btw see this comment by @jnothman refering to @GaelVaroquaux :
|
Btw if we don't go the code duplication way, I would suggest not doing the rename now, and only implement the new interface. The renaming is not super urgent imho. |
Ducktyping should be fine. One sort of CV object will have a split method On 25 February 2015 at 14:48, Andreas Mueller notifications@github.com
|
If you think there will be no trouble (and I don't see any), then I'd rather just do that and don't move around objects just before a release. |
cross_validation
et al. and model_selection
refactoring
Isn't this superseded by #4294? |
Yes :) |
fixes #1848
Based off #3340 by @pignacio