Skip to content

Fix jax 0.10+ issue where exit arrays were not identical anymore#976

Merged
matteobachetti merged 3 commits into
mainfrom
fix_jax_issue
Jun 2, 2026
Merged

Fix jax 0.10+ issue where exit arrays were not identical anymore#976
matteobachetti merged 3 commits into
mainfrom
fix_jax_issue

Conversation

@matteobachetti
Copy link
Copy Markdown
Member

@matteobachetti matteobachetti commented May 28, 2026

The tests test_get_mean_gaussian and test_get_mean_skew_gaussian used exact floating-point equality (==) to compare results, which broke in JAX 0.10.x due to a 1-ULP change in how XLA compiles broadcast array division; replaced with np.testing.assert_allclose. See failure at https://github.com/StingraySoftware/stingray/actions/runs/26394461791/job/77691734686

@@ -0,0 +1 @@
The tests `test_get_mean_gaussian` and `test_get_mean_skew_gaussian` used exact floating-point equality (`==`) to compare results, which broke in JAX 0.10.x due to a 1-ULP change in how XLA compiles broadcast array division; replaced with `np.testing.assert_allclose`.
Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

By "JAX 0.10.x", do you mean all possible versions starting from the 0.10.0? I see that JAX had a newer release on May, 20. I am wondering whether this bug still affects the latest version or only older ones.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Yes, all new versions since 0.10.0 have this problem, so this test will never work with the old syntax

@eleonorav89 eleonorav89 self-requested a review May 30, 2026 10:04
Copy link
Copy Markdown
Collaborator

@eleonorav89 eleonorav89 left a comment

Choose a reason for hiding this comment

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

Perfect then, thank you for answering my comment

@codecov
Copy link
Copy Markdown

codecov Bot commented May 31, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.23%. Comparing base (989e62f) to head (d1861a7).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #976   +/-   ##
=======================================
  Coverage   96.23%   96.23%           
=======================================
  Files          48       48           
  Lines       10099    10099           
=======================================
  Hits         9719     9719           
  Misses        380      380           

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

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@matteobachetti
Copy link
Copy Markdown
Member Author

The slack link seems not to work, but when you click on it it does. Merging

@matteobachetti matteobachetti added this pull request to the merge queue Jun 2, 2026
Merged via the queue into main with commit 840569c Jun 2, 2026
16 of 17 checks passed
@matteobachetti matteobachetti deleted the fix_jax_issue branch June 2, 2026 08:08
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