-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Pandas Copy-on-Write mode should be enabled in all tests #27879
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
Comments
Thanks @s-banach. It should be linked to: https://pandas.pydata.org/docs/dev/user_guide/copy_on_write.html#read-only-numpy-arrays We should probably modify |
Is it a Cython thing where you can just add |
Okay, I see this issue: cython/cython#5230 In |
Yep the signature is expecting something that is not read-only in the cython side. But I don't know if the estimator expect read-only data or it is expected to change the data inplace. I mean this is something that we will have to check for all estimators with the option activated. |
Oh, yeah. I would hope that the only public-api estimators that should ever try to modify data inplace would be ones with an explicit P.S. What I mean is that I have built sklearn from source with |
FYI, I searched and according to this pandas 3.0 is expected around April 2024. |
A quick and dirty attempt seems to highlight only two failing tests in our test suite:
In particular it seems like the |
|
If you find the time, it would be great if you create a separate issue about this with a bit more details 🙏 |
Describe the bug
Pandas COW will be enabled by default in version 3.0.
For example, today I just found that
TargetEncoder
doesn't work properly with it enabled.There are probably many other examples that could be uncovered by testing.
Steps/Code to Reproduce
Expected Results
No error.
Actual Results
Versions
The text was updated successfully, but these errors were encountered: