-
-
Notifications
You must be signed in to change notification settings - Fork 5k
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
BUG: stats: distribution methods emit unnecessary warnings from Boost #14901
Comments
Not sure anymore it's NumPy since I cannot reproduce locally. Will have a look at the other deps. I am pretty sure it's not on our side since the issue appeared after 14341ea. In the PR CI passed while after the merge it did not anymore. |
|
I'm not sure it's to do with the The most obvious thing is that a previously valid calculation is now not happening correctly. However, I'm not sure that a RuntimeWarning should be raised, these can be easy to ignore, should it be a RuntimeError instead? |
I can reproduce this on my machine, with this code (from the docs):
Happy to share details about my system info. (Running the latest macOS on M1.) |
I think CI is on Macos Intel. |
It's on intel and apparently not failing on Travis for the wheels. Might be the macOS version as you said. |
This is getting annoying, I will try to silence these warnings before the PyData Global sprint tomorrow. |
The relevant tests and code seems to not have been touched after being introduced in the big Boost PR (gh-13328). |
See scipygh-14901 for details. [skip azp] [skip github]
@mckib2 if you have any memory of that code and some idea of what this could be, that would be great to hear (not very high-prio, we can live with just silencing the failures for a while). |
* TST: silence test failures on macOS for `beta.ppf` overflow See gh-14901 for details. [skip azp] [skip github] Co-authored-by: Tyler Reddy <tyler.je.reddy@gmail.com>
That warning was introduced by gh-14618, we've seen some other instances of strange behavior when building on different platforms, e.g. gh-14833. The only levers I know to pull in cases like this are the Boost.Math policy defines in the setup.py. Hard to experiment without local hardware though |
) * TST: silence test failures on macOS for `beta.ppf` overflow See scipygh-14901 for details. [skip azp] [skip github] Co-authored-by: Tyler Reddy <tyler.je.reddy@gmail.com>
So this happened on Intel macOS in CI; I'm seeing them locally with a conda build on arm64 macOS, and gh-14722 sees them on arm64 macOS too (miniforge-from-Homebrew install). Looking at a fix or some skips for |
Looking this over again and am a little confused as to why a |
@mckib2 some of these have been fixed in Boost, do you know if the fixes have made their way into SciPy yet? It would be good to close this before 1.10 branches, if possible. |
|
@mdhaber please make sure I am reading this right. I used this CI run's values where df = 21, nc = 1.0560466, and x = 6.77671634 or 21.36270226 or 49.09451392 to generate overflow. I was not able to re-produce overflow (only FE_INEXACT) with the following platform:
Are there other test values that are know to cause overflow with |
Thanks for your patience @mborland. I don't know the details because I can't reproduce locally, but I think they will become more clear once we get all these fixes you've made into SciPy. We'll let you know if it's not already resolved. Just another note relevant to this issue: we're now seeing these warnings in CI (e.g. gh-17853) again after gh-13699 was merged:
We may xfail or skip these tests to silence the CI failure. Part of closing this issue will be removing the xfail/skip mark. |
Do you have the test cases that cause those two to overflow? If they are like the others it is floating-point environment oddities. |
I think you already looked into these (#14901 (comment)), so I don't think there's anything new to be done yet.
For
|
I think for those I would disable failure. They were setting the flag for |
Let's hope that this got ameliorated by #17865, but unless that gets backported, this issue is not for 1.10 anymore - I adapted the milestone. |
No, gh-17865 just treated one of the symptoms, silencing warnings in two tests. The |
@mckib2 was there anything else you wanted to investigate here (e.g. I'm not sure if you saw #17432 (comment)), or do we just wait for upstream changes? @tupui Do you think #17432 (comment) and the |
@mdhaber looks like you covered all the warnings. +1 to close from me then. |
+1 to wait for upstream resolution, I think this issue can be closed |
Thanks everyone! |
I still have problems with Boost warnings on macOS running on M2 using SciPy 1.11.3. The following code throws a warning:
The warnings looks like:
Tested the same code on a Linux machine and no warnings. |
This might be a similar/identical issue
scipy version: |
@mborland looks like we have another one of these warnings. from scipy.stats import ncf
ncf.sf(2., 1., 1., 1.) Can you help us? Thank you! |
I will take a look |
@mdhaber Fix for has been merged on my end. |
Thanks @mborland! |
Describe your issue
Several statistical distribution methods emit warnings stemming from Boost. This issue tracks the status of all of them.
beta.ppf
as reported here; should be fixed by short-circuit overflow protection for M1 Mac clang boostorg/math#827ncf
as reported in BUG: stats: spurious warning fromncf.cdf
#17101, should be fixed by Fix for issue 845 boostorg/math#846nct
- I'm not sure that this has been reported separately yet. Is it caused by the same sort of thing?ncx2
- Ditto.gh-17272 will silence the failures in SciPy's tests temporarily, but as many of these marks as possible should be removed when gh-17207 merges.
Original Post
Describe your issue.
macOS CI is failing due to an overflow. I am still trying to reproduce locally.
NumPy was updated to 1.21.3, could be this or another dependency.
https://github.com/scipy/scipy/runs/3960228039
Reproducing Code Example
Error message
SciPy/NumPy/Python version information
master on macOS/CI
The text was updated successfully, but these errors were encountered: