Re-introduce Array API Tests suite - #4433
Conversation
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
|
Please allow gh-action runs for this PR so we can see failures in CI. |
|
CC @ev-br |
ev-br
left a comment
There was a problem hiding this comment.
One small suggestion below.
The first run is expected to have a few failures. Once we see them, we'll be able to produce a set of relevant skips.
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
…/mlx into full-tests-compatability
|
@ev-br We need to address this PR data-apis/array-api-tests#459 See error log in CI |
|
Ah yes. Let's continue on the array-api-tests PR |
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
…/mlx into full-tests-compatability
|
@ev-br The test suite now runs. Thanks! I've tried adding a skip file in the latest commit (which may not be accurate, as I used AI to generate it); let's wait for another CI run. |
|
Thanks for the ping @prady0t! IMO the tentative skips file shows that the compatibility level is very high. To explain some context, which might not be immediately clear for those who do not deal with the Array API test suite regularly:
Having a non-empty skips file is actually expected: for example, here are skipfiles for jax, numpy and ndoonx. Quickly looking through the skips this PR adds, several classes of failures might be somewhat lower priority:
We could certainly refactor the xfails file to visually group failures. |
|
Can we have another CI run for this PR? |
I think having a skips file is enough. When working on CUDA backend we also had a big skips file and we just gradually fixed the items in the list. |
|
Thank you @zcbenz ! @prady0t : It'd be best to group the entries in the skips file, in a style similar to e.g. https://github.com/data-apis/array-api-compat/blob/main/torch-xfails.txt :
Let me know if you want to me to help with grouping and triage. |
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
Just to minimise some manual work, I again asked AI to regroup according to your suggestions. The last xfail file didn't work due to inline comments; those have now been removed in the latest commit. Feel free to change the group/order of the tests in the xfail file if you disagree. |
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
| pytest array_api_tests -v -c pytest.ini -n 2 --max-examples=1000 --derandomize --disable-data-dependent-shapes --disable-deadline --skips-file "${GITHUB_WORKSPACE}/xfail.txt" | ||
| pytest array_api_tests -v -c pytest.ini -n 2 --max-examples=1000 --derandomize --disable-data-dependent-shapes --disable-deadline -o strict_xfail=True --xfails-file "${GITHUB_WORKSPACE}/xfail.txt" | ||
|
|
There was a problem hiding this comment.
I've also added the xfail option (instead of the earlier skip option) with the strict option. This will help us catch when some tests start passing with future changes.
Signed-off-by: Pradyot Ranjan <99216956+pradyotRanjan@users.noreply.github.com>
|
@ev-br In the latest runs, apart from some missing/extra xfails, we have some crashes See the run: https://github.com/ml-explore/mlx/actions/runs/34209419794/job/102015510711 These are the tests: Would it make sense to put them in a skip file? |
|
A typical use case for both skips and xfails file is if something segfaults; then this something goes to the skips so that pytest does not even run it. Trying locally with
these all passed for me.
this fails with This is IIUC #4300 (comment) be best to add a link as a comment in the skips file, I'd think? |
|
It'd be great to
As an example, I worked through failures in While that's a bit of work, I think it'd be helpful to see which other failures are showstoppers (copy=False) and which are small discrepancies (atan2 scalar arguments) or even possibly just small bugs ( EDIT: checked |
Following #3526, we are in a much better shape to re-introduce the array-api-tests in CI.