-
-
Notifications
You must be signed in to change notification settings - Fork 10.9k
BUG: false positive in the heuristic for old Accelerate #25433
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
🤷, not sure if this serves too much purpose anymore. The test is a bit awkward since it isn't super precise (I have no idea what the actual failure is supposed to be). The error looks a bit more like a problem with |
IIRC there were problems in older Apple Clang with floating-point errors, so that could explain it. But it could be many things, hard to untangle.
Agreed. It's not even clear to me what will still break on what macOS versions. I'd say we try to make the test more specific than "any warning" (I think it can be narrowed down to |
So the original issue seems to have been a |
This avoids triggering a hard import error on any warning; something that may be due to other reasons than using old Accelerate (e.g., numpygh-25433 is for a specific combination of Clang, macOS and OpenBLAS). Closes numpygh-25433
I kept the error in case a |
This avoids triggering a hard import error on any warning; something that may be due to other reasons than using old Accelerate (e.g., numpygh-25433 is for a specific combination of Clang, macOS and OpenBLAS). Closes numpygh-25433
It was observed in spack/spack#41742 that this error was triggered despite the numpy build not being linked to Accelerate and no other packages being loaded:
A run of the test suite after disabling the
_mac_os_check
check innumpy/__init__.py
confirmed that thenumpy
install was basically fine, with the only failures of interest being:The
numpy.polynomial
tests are separate code from the_mac_os_check
heuristic, but both do the same thing and rely on a full-rank check after a call tonp.linalg.lstsq
. This seems to be sensitive to the particular build config in the linked Spack issue, which is:This is a problem, because the heuristic failing makes NumPy unimportable with a misleading error message.
Finally, it's worth pointing out that the
lstsq
call usesnp.errstate
to suppress warnings exactly like the one that's making the heuristic fail:numpy/numpy/linalg/_linalg.py
Lines 2466 to 2468 in 0032ede
The question is what to do about this. We should probably at least change the hard error to a warning.
The text was updated successfully, but these errors were encountered: