-
-
Notifications
You must be signed in to change notification settings - Fork 26.3k
[WIP] improving equality test in sklearn's clone function #5525
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
sklearn/tests/test_base.py
Outdated
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.
I would rather raise a SkipTest('pandas required')
exception to make it more explicit that this test was not run.
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.
yes indeed. thanks.
|
@ogrisel: No, |
sklearn/tests/test_base.py
Outdated
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.
we have a mock dataframe object.
I am not sure I understand why this works. maybe @GaelVaroquaux can say something about it. Shouldn't we be deepcopying the dataframe? We deepcopy numpy arrays, right? |
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.
The fix looks good (although it took me a minute to realize why :) )
We deepcopy everything that is not an estimator (line 49 of base.py). |
yeah but why is |
yeah but why is is true after deepcopying something?
I don't understand your question.
|
Argh... so both me and @GaelVaroquaux where a little unclear on what is happening here. I'll post the correct fix in a minute. |
I think #5540 is a better fix. |
This PR addresses issue #5522.