Closed PietropaoloFrisoni closed 1 month ago
Hello. You may have forgotten to update the changelog!
Please edit doc/releases/changelog-dev.md
with:
All modified and coverable lines are covered by tests :white_check_mark:
Project coverage is 99.70%. Comparing base (
de54c54
) to head (7691a95
). Report is 3 commits behind head on master.
:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.
@rashidnhm Please ignore the failures related to JAX 0.4.28 and NumPy 1.26.4 (we'll decide what to do with them at a later stage). I asked for your review mostly for the workflow structure. Thanks!
Context: In #6061, we started using by default NumPy 2 (instead of NumPy 1) on the CI to test every PR targeting the master branch. Some jobs (for example, those requiring
tensorflow
) still automatically downgrade to NumPy 1.26 since not all interfaces are supported at the current stage.This PR aims to create another workflow to test some jobs with NumPy 1.26 (those that don't automatically downgrade to NumPy 1 during the day). Such a workflow should run at night to ensure PennyLane is still compatible with NumPy 1.26.
We'll keep this workflow only temporarily (probably a quarter, but this still has to be established). After that, we'll get rid of it.
Finally, It has been verified (see here) that the tests introduced with this PR are green. This has been verified a second time (see here before merging this PR into master).
Description of the Change: As above.
Benefits: We ensure that PennyLane is still compatible with NumPy 1.26.
Possible Drawbacks:
This issue was discovered accidentally (and potentially fixed) during this PR. The
TestSinglePrecision
class in thetest_jax_jit_qnode.py
file contains tests that change the JAX precision withjax.config.update("jax_enable_x64", False)
. When running the jax tests using multiple workers, we can face race conditions if some workers change jax configuration, because other workers in other test classes downgrade to a single precision causing numerous failures. To avoid this, we add --dist=loadscope as additional pytest arg for jax tests, grouping tests by module for test functions and by class for test methods.The new workflow is it is to a large extent a (very simplified) copy of
interface-unit-tests.yml
. This is against the principle of avoiding code duplication whenever possible. Still, this is just a temporary workflow that lasts for a few months at most (and runs only at night), and it may be convenient to disentangle it as much as possible from the usual test interface.Related GitHub Issues: None.
Related Shortcut Stories: [sc-73744]