-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
Array API tests fail on main #29396
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
I do have the same issues locally, it seems like the problem disappear when using Maybe @betatim or @OmarManzoor have some suggestions about this and whether this is expected? |
@lesteve Might be because of some updates in the new version of numpy. Will have to check this. |
For completeness, one of the potential reason this was not noticed before is that lock-file in the CI for the array API tests do use
|
The tests Stefanie ran don't require a GPU, so I thought that we run them in the normal CI as well. I'll investigate the failures. If someone else has time/interest to look at whether the tests run as part of the normal CI or not that would be nice. Otherwise I'll also look into that. In general I feel like we need to up our game around the array API tests. My (perceived) impression is that they constantly surprise us with "Ha, you thought the tests pass ... surprise! Tests don't actually pass!!" - which is a bit of time suck because you have these unscheduled "ok, lets fix up the tests once again" sessions :-/ |
xref numpy/numpy#26850 which I found while working on this |
Waiting for reactions on the above issue before trying to fix things. We could remove the check that the thing returned from |
I think part of this feeling is addressed by the CUDA CI. The other would be addressed by configuring a new PR job to run the tests on a GitHub Actions M1 worker but this requires some efforts. The fact that pytorch is holding back on a numpy<1 is temporary. I don't think we should blame our CI config for this particular inability of our CI to tests with the latest numpy. The only alternative would be to have a second array API enabled CI config with only |
Tim's opinion was that it probably makes sense to have it working for the latest versions IIUC: #29387 (comment) |
I agree we should not bother supporting older versions of But I agree we should fix the "TypeError: array iteration is not allowed in array-api-strict" problem asap seen on discovered in #29373. Back to the numpy 2 problem, the upstream fix is being developed at: but it's likely that it won't be shipped before numpy 2.1. Is it fine to wait or do we want to add some compat layer for numpy 2 in our internal numpy wrapper? EDIT: or maybe we should just fix/skip a few tests for numpy 2.0. |
It was more a general feeling that it seems with array API related things we have the situation "we thought this worked but it turns out it doesn't" more often than on the "not array API" side. Which is what provides the motivation for working on exciting things like the CUDA CI ;) |
What about installing |
Let's do that then. Let's fine a config that is already running numpy 2. |
Was there was a good reason to have Running locally |
It's only pinned in |
Having said that (array-api-compat in CPU CI), |
|
I started a PR to see if it's easy to fix numpy 2 support. I am testing locally. Feel free to open another PR for the lock files concurrently, otherwise I will do it in #29436 but probably not before tomorrow. |
About lock-files, I think we should merge #29388 first. The lock-files were not updated for a while for a variety of reasons ( |
Merged. I will update my PR with |
I will add |
The CI now runs the tests successfully with array-api-strict and numpy 2.0. @StefanieSenger please note that according to the output of |
Yes, thank you. I have noted this after submitting the issue and this is why I have edited the issue afterwards and added that with numpy 2.0 I have the same failures. So, I had noticed. |
Describe the bug
I ran the Array API tests on main and got 10 failing tests.
(Last week, with an older main and everything else the same, I had 4 failing tests.)
array_api_compat==1.7.1
I only ran the cpu tests.
Steps/Code to Reproduce
pytest sklearn/utils/tests/test_array_api.py
Expected Results
all tests pass
Actual Results
Versions
Also just tested with numpy==2.0.0, and the same failures.
The text was updated successfully, but these errors were encountered: