test: remove jax from unit tests (moved to autogalaxy_workspace_test)#384
Merged
test: remove jax from unit tests (moved to autogalaxy_workspace_test)#384
Conversation
Two changes to keep test_autogalaxy/ numpy-only so the no-jax CI matrix stays green and local pytest runs don't pay the jax import cost: - conftest.py: drop the pytest_configure hook that did `jnp.sum(jnp.array([0.0]))` to force JAX backend init at session start. This eagerly imported jax even when no jax tests would run. - test_deflections.py: delete the two np-vs-jnp parity tests (test__hessian_from__np_richardson_matches_jax_jacfwd_to_float64, test__magnification_2d_via_hessian_from__np_jnp_agree_to_float64). Both moved to scripts/jax_assertions/hessian_parity.py in autogalaxy_workspace_test. The other 27 tests in this file are pure numpy and stay. No library code changes. Local pytest: 843 passed. Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Two changes to keep
test_autogalaxy/numpy-only so the no-jax CI matrix stays green and local pytest runs don't pay the jax import cost.Changes
test_autogalaxy/conftest.py: drop thepytest_configurehook that didjnp.sum(jnp.array([0.0]))to force JAX backend init at session start. This eagerly imported jax even when no jax tests would run.test_autogalaxy/operate/test_deflections.py: delete the two np-vs-jnp parity tests (test__hessian_from__np_richardson_matches_jax_jacfwd_to_float64,test__magnification_2d_via_hessian_from__np_jnp_agree_to_float64). Both moved toscripts/jax_assertions/hessian_parity.pyin autogalaxy_workspace_test. The other 27 tests in this file are pure numpy and stay.No library code changes.
Merge dependency
Depends on autogalaxy_workspace_test#23 merging first, so the moved assertions exist on main before the source tests are removed.
Test plan