Skip to content
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

Drop Python 3.9; test on Python 3.13; drop NumPy 1.21; skip CUDA install #304

Open
wants to merge 11 commits into
base: main
Choose a base branch
from

Conversation

crusaderky
Copy link
Contributor

@crusaderky crusaderky commented Apr 10, 2025

Follow-up from #266

  • Bump up minimum NumPy version from 1.21 to 1.22, in alignment with scikit-learn minimum
  • Bump up minimum Python version from 3.9 to 3.10; again this is possible thanks to a recent dependency bump in scikit-learn (closes Drop Python 3.9 #230)
  • Run tests on Python 3.13
  • Only test on lowest and highest Python versions
  • Don't install CUDA stack (closes CI installs GPU libraries #284)
  • Don't install alternative backends when testing numpy 1.x and dev
  • Closes post 1.11 cleanup tasks #258
  • Run array-api-tests locally with --max-examples 100000 on NumPy 1.22
  • Run array-api-tests locally with --max-examples 1000 on all other numpy versions
  • Disable fail-fast (I lost count of how many times it caused attrition)

@@ -100,8 +95,6 @@ version.
- As with NumPy, type annotations and positional-only arguments may not
exactly match the spec for functions that are not wrapped at all.

The minimum supported PyTorch version is 1.13.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not advertise what you don't test.

@@ -131,8 +124,6 @@ For `linalg`, several methods are missing, for example:
- `matrix_rank`
Other methods may only be partially implemented or return incorrect results at times.

The minimum supported Dask version is 2023.12.0.
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do not advertise what you don't test. Also helplessly obsolete; we know for sure that less than 2024.9.0 won't work.

@@ -24,11 +23,14 @@ classifiers = [

[project.optional-dependencies]
cupy = ["cupy"]
dask = ["dask"]
dask = ["dask>=2024.9.0"]
Copy link
Contributor Author

@crusaderky crusaderky Apr 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It may be a good idea to completely remove all mentions of minimum versions until we have unit tests in place for them (i.e. not anytime soon).

numpy = ["numpy"]
# Note: array-api-compat follows scikit-learn minimum dependencies, which support
# much older versions of NumPy than what SPEC0 recommends.
numpy = ["numpy>=1.22"]
pytorch = ["torch"]
sparse = ["sparse>=0.15.1"]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

same.

# attributes are np.float32 instead of float
# (see also https://github.com/data-apis/array-api/issues/405)
array_api_tests/test_data_type_functions.py::test_finfo[float32]
array_api_tests/test_data_type_functions.py::test_finfo[complex64]

# Rounding error near infinity
array_api_tests/test_operators_and_elementwise_functions.py::test_clip
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems to crop up only when the test is run on its own

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__imod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[remainder(x1, x2)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Tested these and could reproduce none of the core dumps

array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__imod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x, s)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[__mod__(x1, x2)]
array_api_tests/test_operators_and_elementwise_functions.py::test_remainder[remainder(x1, x2)]
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could reproduce none of these

@crusaderky crusaderky changed the title Drop Python 3.9; Test on Python 3.13; drop NumPy 1.21; skip CUDA install Drop Python 3.9; test on Python 3.13; drop NumPy 1.21; skip CUDA install Apr 10, 2025
@crusaderky crusaderky marked this pull request as ready for review April 10, 2025 17:36
@crusaderky
Copy link
Contributor Author

@ev-br ready for review

This reverts commit 3bc8ffa.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

CI installs GPU libraries post 1.11 cleanup tasks Drop Python 3.9
1 participant