revert: drop sentinel assertions in fitness_dispatch.py#29
Merged
Conversation
PyAutoFit reverts `use_jax_for_visualization` default from `Optional[bool] = None` (follow `use_jax`) back to `bool = False` (PyAutoLabs/PyAutoFit#1280). Updates the workspace integration assertions to match the reverted library behaviour: - Drop `assert_use_jax_true_implicitly_turns_on_visualization` — sentinel-on behaviour no longer exists. - Drop `assert_explicit_none_resolves_to_use_jax` — passing `None` is no longer the documented contract. - Drop `assert_use_jax_true_jit_dispatch_via_sentinel_default` — sentinel-default JIT dispatch no longer happens. - Add `assert_use_jax_true_defaults_visualization_off` confirming the reverted default: `Analysis(use_jax=True)._use_jax_for_visualization` is `False`. Explicit-opt-in assertion (`assert_explicit_false_opts_out_when_use_jax_true`) is unchanged — that path still works. 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
Reverts the workspace-side assertions that mirrored PyAutoFit PR #1278's
use_jax_for_visualizationsentinel-default behaviour. The library default is being reverted in PyAutoLabs/PyAutoFit#1280 because the new default broke every Nautilus quick-update underuse_jax=True(jax.jit(fit_from)was being called with aModelInstancethat isn't pytree-registered →TypeError, swallowed deep in the pipeline as all-zero source FITS on real Euclid runs).These integration assertions tested the sentinel-on behaviour that no longer exists. Updating them to match the reverted library default.
Scripts Changed
scripts/jax_assertions/fitness_dispatch.py— drop the three sentinel assertions (assert_use_jax_true_implicitly_turns_on_visualization,assert_explicit_none_resolves_to_use_jax,assert_use_jax_true_jit_dispatch_via_sentinel_default); replace with one assertion (assert_use_jax_true_defaults_visualization_off) confirmingAnalysis(use_jax=True)._use_jax_for_visualization is False(the post-revert default). The explicit-opt-in assertion (assert_explicit_false_opts_out_when_use_jax_true) is unchanged.Upstream PR
PyAutoLabs/PyAutoFit#1280
Test Plan
python scripts/jax_assertions/fitness_dispatch.pyexits 0 withfitness_dispatch: all assertions passed(verified locally)🤖 Generated with Claude Code