Skip to content

revert: drop sentinel assertions in fitness_dispatch.py - #29

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/jax-viz-default-broken
May 17, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/jax-viz-default-broken

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Reverts the workspace-side assertions that mirrored PyAutoFit PR #1278's use_jax_for_visualization sentinel-default behaviour. The library default is being reverted in PyAutoLabs/PyAutoFit#1280 because the new default broke every Nautilus quick-update under use_jax=True (jax.jit(fit_from) was being called with a ModelInstance that 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) confirming Analysis(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.py exits 0 with fitness_dispatch: all assertions passed (verified locally)
  • No other scripts touched in this workspace — only the assertions that referenced the dropped sentinel.

🤖 Generated with Claude Code

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>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label May 17, 2026
@Jammy2211
Jammy2211 merged commit 19ccae3 into main May 17, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/jax-viz-default-broken branch May 17, 2026 18:16
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 2026
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.

1 participant