-
Notifications
You must be signed in to change notification settings - Fork 167
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
[SCSB-155] build with Numpy 2.0 #8527
[SCSB-155] build with Numpy 2.0 #8527
Conversation
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## master #8527 +/- ##
==========================================
+ Coverage 59.93% 60.47% +0.53%
==========================================
Files 372 369 -3
Lines 38330 38408 +78
==========================================
+ Hits 22973 23226 +253
+ Misses 15357 15182 -175 ☔ View full report in Codecov by Sentry. |
numpy>=2.0.0rc2
in build-system.requires
8a04927
to
eb64187
Compare
Would you run regression tests with this change with numpy 1.x? |
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So are we ready, willing, able to merge this now? We're OK with switching from numpy 1.x to 2.0? I'm actually surprised that the regtests did NOT show any differences. I would've expected at least small numerical differences. What am I missing?
Looks like the tests ran with numpy < 2.0 |
The changes in this PR don't quite switch numpy to 2.0. As @stscirij noted the tests all ran with numpy 1.x (as expected) since many of the jwst dependencies do not yet have released versions that support numpy 2.0. The main change in this PR is that this makes the jwst C extension compatible with both numpy 2.0 and numpy 1.x. This is related to the 5th item in the "Key guidance for users and downstream package authors" list here: numpy/numpy#24300 (comment) We might want to consider making a patch release with Line 27 in f57f0b0
If this isn't pinned a user that installs the pipeline after the numpy 2 release may end up also installing numpy 2.0 and experience issues. |
That entry is used primarily for pypi releases and local installs where the package is "built". The numpy docs cover several combinations: We could delay this PR until:
If we delay (or not) we should still consider pinning |
bacd018
to
6a30bcc
Compare
I'm tracking Numpy 2.0 builds and testing here: https://github.com/orgs/spacetelescope/projects/45/views/2 I've only added SCSB ones so far within this "calibration pipeline" sphere of dependencies
I'll go through the devdeps testing and make sure |
What's the status and intent of this? Are stakeholders happy enough to merge it? |
In line https://github.com/spacetelescope/jwst/pull/8527/files#diff-50c86b7ed8ac2cf95bd48334961bf0530cdc77b5a56f852c5c61b89d735fd711R27 should we have an upper limit pin on numpy in order to avoid using 2.0 yet? |
Oof, I see now that I edited #8527 (comment) instead of "Quote reply" Sorry about that @hbushouse
Pinning to "<2.0" in the release branch seems worth doing (as we haven't been able to test against numpy 2.0 due to dependency issues). Pinning in the main branch will make devdeps testing difficult. I'm happy with the changes as they currently stand. I just added the devdeps label so we can see the remaining failures (likely mostly from dependencies not having releases with numpy 2.0 support). |
The label didn't trigger the jobs but perhaps the resync when the changelog is updated will trigger this. |
This could use |
Any idea why the docs failed? EDIT: I see, it hadn't yet picked up the numpy<2 pin |
e120ba5
to
10b7366
Compare
10b7366
to
aa41b86
Compare
resolves SCSB-155
Numpy 2.0 is scheduled for release on June 19th. Due to the C ABI updates, Python projects that build C extensions are required to build against Numpy 2.0 in order to use Numpy 2.0 in runtime.
This is backwards-compatible with Numpy versions in runtime as far back as
1.26
this PR pins
numpy>=2.0.0rc2
inbuild-system.requires
Note
this PR was generated automatically by
batchpr
🤖Checklist for PR authors (skip items if you don't have permissions or they are not applicable)
CHANGES.rst
within the relevant release sectionHow to run regression tests on a PR