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

Add testing against NumPy nightlies #643

Draft
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

agriyakhetarpal
Copy link
Collaborator

@agriyakhetarpal agriyakhetarpal commented Sep 25, 2024

This description is a stub and will be updated soon.

This PR enables testing against NumPy nightlies, which were added in #632 and later disabled to be split out here, because some tests were failing on PyPy for Windows. I have yet to figure out a reproducer. It is to be noted that Windows was not tested with PyPy earlier, so it's probably okay to skip or xfail the test, too, if we can't fix it.

Related to #630

@agriyakhetarpal
Copy link
Collaborator Author

The great thing here is that the previous failing test for PyPy 3.9 on Windows does not fail anymore, because the NumPy development version available on https://anaconda.org/scientific-python-nightly-wheels/numpy/files does not support PyPy 3.9 anymore (so, it fails beforehand when installing). The PyPy 3.10 on Windows tests pass, as expected.

I think what's left to do here is to add some logic to determine when to run the nightly tests and to skip them if a wheel is not available for the desired Python implementation + version duo. This might require a bit of hacking and setting up a dynamic GHA matrix with some JSON – I should be able to figure that out.

@agriyakhetarpal agriyakhetarpal marked this pull request as draft September 25, 2024 19:30
@fjosw
Copy link
Collaborator

fjosw commented Oct 13, 2024

Hey @agriyakhetarpal, sorry I got a bit lost and am trying to catch up. I had a look at the failing windows pypy test and this looks quite odd to me. To me it is still not clear to which degree we need to explicitly ensure that the code is also working properly with pypy considering the additional maintenance cost that comes with it. From my perspective it would probably be more valueable to focus on potential issues with future CPython and NumPy versions so I appreciate your work towards nightly tests. Is there any explict input you need for this PR?

@agriyakhetarpal
Copy link
Collaborator Author

Thanks for offering to see through this, @fjosw! As discussed on 14/10/2024, I'll rework this PR to make it simpler. Putting the plan out in public here:

  • as a pure Python package, we'll test the NumPy nightlies against just the latest Python version for now (3.13 at the time of writing) on all platforms instead of trying to devise a convoluted solution that tests all Python versions that are available for the nightlies. If that strains our CI (I don't think it would, since our CI is quite fast now), we'll test just Linux and Python 3.13. We'll avoid testing against PyPy for the nightlies, since we are not sure if we have enough time to fix and escalate bugs that can arise on a not-as-conventional Python implementation.
  • We'll test against free-threaded NumPy on Python 3.13t locally first (I'm yet to do it on my M-series macOS device). If there's a bug, that will be organised as a bug report for NumPy upstream and we can organise a CI job with free-threaded wheels for the three platforms that have wheels. https://py-free-threading.github.io/ is a very helpful resource about free-threading and offers advice on how to set up testing infrastructure related to this.
  • Since we are testing against the nightlies anyway, we should be fine with a slightly more relaxed upper bound on NumPy instead of the recommended N+3 minor version number (2.4). We can leave it as <3 or ~2, which helps us since we are in maintenance mode right now.

I'll split out the second and third points into their own, separate PRs. We should be good to go with this PR once I address the first point!

@agriyakhetarpal
Copy link
Collaborator Author

The test_logsumexp1 failure looks quite cryptic to me...

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.

2 participants