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

JP-3664: Testing changes for numpy 2.0 compatibility #8718

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

Conversation

tapastro
Copy link
Contributor

Resolves JP-3664

Closes #8580

This draft exists to remove jwst's upper pin on numpy, as well as provides a spot to test changes to coron3 unit tests that appear to be incompatible with np2.0.

Checklist for PR authors (skip items if you don't have permissions or they are not applicable)

  • added entry in CHANGES.rst within the relevant release section
  • updated or added relevant tests
  • updated relevant documentation
  • added relevant milestone
  • added relevant label(s)
  • ran regression tests, post a link to the Jenkins job below.
    How to run regression tests on a PR
  • All comments are resolved
  • Make sure the JIRA ticket is resolved properly

@tapastro tapastro requested a review from a team as a code owner August 21, 2024 20:17
@tapastro tapastro marked this pull request as draft August 21, 2024 20:17
Copy link

codecov bot commented Aug 21, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 66.99%. Comparing base (03ca10f) to head (b7358ab).
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #8718      +/-   ##
==========================================
- Coverage   76.92%   66.99%   -9.94%     
==========================================
  Files         498      377     -121     
  Lines       45810    38156    -7654     
==========================================
- Hits        35240    25561    -9679     
- Misses      10570    12595    +2025     
Flag Coverage Δ
nightly ?

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@braingram braingram force-pushed the jp-3664-np2p0 branch 3 times, most recently from 61f372c to bcba8a3 Compare September 17, 2024 19:34
@tapastro tapastro changed the title WIP JP-3664: Testing changes for numpy 2.0 compatibility JP-3664: Testing changes for numpy 2.0 compatibility Sep 20, 2024
@melanieclarke
Copy link
Collaborator

#8812 fixed most of the coron unit tests with numpy 2, but there's still one check that's barely out of spec on the Linux tests.

I think changing these lines to atol=1e-4, rtol=1e-5 should work:

npt.assert_allclose(aligned, truth_aligned, atol=1e-5)
npt.assert_allclose(shifts, truth_shifts, atol=1e-5)

CHANGES.rst Outdated Show resolved Hide resolved
@zacharyburnett
Copy link
Collaborator

@tapastro tapastro marked this pull request as ready for review January 10, 2025 20:57
@tapastro tapastro requested a review from a team as a code owner January 10, 2025 20:57
@tapastro
Copy link
Contributor Author

Reviving this PR, starting a fresh set of tests: https://github.com/spacetelescope/RegressionTests/actions/runs/12717188152

From comments on the JP ticket by David, I think we're ready to test and review this PR.

@melanieclarke
Copy link
Collaborator

melanieclarke commented Jan 13, 2025

Regression test results look mostly as expected, but there is a unit test for extract_1d (marked 'slow', so it doesn't run in CI) that failed: jwst/extract_1d/tests/test_extract_1d_step.py::test_extract_niriss_soss_96. I'm looking into it, but I haven't been able to reproduce it locally yet.

Update: looks like an optimization instability for the pathological testing data. I sent in a PR to fix the test with slightly less improbable input data: #9069

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

JWST issues with numpy 2.0
5 participants