-
-
Notifications
You must be signed in to change notification settings - Fork 25.9k
MNT Ignore pandas deprecation warning for PyArrow #28258
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
Probably you need a similar thing in To update the lock-files:
Alternatively you could try to rebase your commit on the scikit-learn-bot PR #28216 |
setup.cfg
Outdated
@@ -23,6 +23,8 @@ addopts = | |||
|
|||
filterwarnings = | |||
ignore:the matrix subclass:PendingDeprecationWarning | |||
# The following warning is raised when PyArrow is not installed on pandas 2.2 | |||
ignore:Pyarrow will become a required dependency of pandas:DeprecationWarning |
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 merged something in skrub 2 days ago. If this is regex, you need to add (?s).*
at the beginning because this is a multiline string and .*
at the end.
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.
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.
Not 100% sure whether this is a regex or not. According to sure https://docs.python.org/3/library/warnings.html#the-warnings-filter it depends:
message is a string containing a regular expression that the start of the warning message must match, case-insensitively. In -W and PYTHONWARNINGS, message is a literal string that the start of the warning message must contain (case-insensitively), ignoring any whitespace at the start or end of message.
We might be in the -W or PYTHONWARNINGS case depending on how pytest filterwarnings gets passed down by pytest? If we do it in test_script.sh
(which I think is slightly better) this looks more like -W
, in setup.cfg
not sure.
For the documentation, it would be nice to check that we don't display the warning if this is possible. |
Not sure but I would say, even if the warning is shown, this is not a blocker since this will be only in the dev doc so we have time to reevaluate the situation until we release 1.5 ... If we are lucky, the ignore thing may also hide the warning not 100% sure. |
I agree that I would prefer to have a CI running if I want to prioritize. |
Alternatively we can have pyarrow installed in CI. That's what we did in |
The fact that |
+1 on this. We might give this feedback or upvote on having a lean |
I agree. This is being discussed in apache/arrow#38536.
|
@lesteve the script raises an error, the end of which is:
and the whole thing: |
To be honest, let's do the simplest thing possible for now and pin pandas<2.2 to avoid the warning to unlock other things. I have opened #28273 Not sure about the error, what is your conda version? The |
I just installed new conda. This is why I don't like the lock files @lesteve , I've never been able to run the script to update them. |
Completely get your annoyance if every single time you tried you did not manage to run it ... hopefully things can be fixed though. Try updating For reference my
|
This is what I have:
|
So it turns out the issue was that I didn't have Not it's running, but it's been running |
OK weird, IIRC ubuntu_atlas is a pip-based build and in my experience they don't take that much time to generate lock-file |
Also Olivier added recently |
This build is failing with > warnings.warn(msg, DeprecationWarning, stacklevel=2)
E DeprecationWarning: `np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this will not modify any behavior and is safe. If you specifically wanted the numpy scalar type, use `np.bool_` here.
E Deprecated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations
attr = 'bool'
msg = '`np.bool` is a deprecated alias for the builtin `bool`. To silence this warning, use `bool` by itself. Doing this wil...recated in NumPy 1.20; for more details and guidance: https://numpy.org/devdocs/release/1.20.0-notes.html#deprecations'
val = <class 'bool'> I'm very confused as where it's coming from, and trying it locally with the same conda lock file I can't reproduce. The complete log of the run for the record: |
I may have found a slightly simpler way to avoid the warning in |
Getting a bunch of
with old numpy=1.19 from 2020 (why are we supporting that? 😁 ) on this build. Trying to figure that out. |
@lesteve why are we missing |
pooch does not seem to be in the lock-file for the build that errors:
It probably needs to be added explicitly there, maybe this is needed for recent Scipy, not sure ... apparently for Scipy>=1.10 according to #24521 It is definitely added in some build in update_environment_and_lock_files.py |
@lesteve would have any idea why https://dev.azure.com/scikit-learn/scikit-learn/_build/results?buildId=63247&view=logs&j=aabdcdc3-bb64-5414-b357-ed024fe8659e&t=b7b3ba55-d585-563b-a032-f235636c22b0 is failing here? We're a bit at a loss here, especially since your PR doesn't trigger the same issue. |
No I don't know, I haven't followed why you needed to do the float64 change in |
@lesteve what should I do here to update the lock files?