Skip to content

test: JAX pytree leaf-type registration guard (guards PyAutoFit#1366)#42

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/jax-pytree-leaf-registration
Jul 13, 2026
Merged

test: JAX pytree leaf-type registration guard (guards PyAutoFit#1366)#42
Jammy2211 merged 1 commit into
mainfrom
feature/jax-pytree-leaf-registration

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Regression guard for the JAX shapelet-fit crash fixed in PyAutoFit#1366 (release-validation run 29266305445). Adds scripts/jax_assertions/pytree_leaf_registration.py: builds a model with an af.Model(int) sub-model (the shapelet n/m structure), then asserts leaf types (int/float/str/…) are not registered as pytree nodes, the real component class is, and jax.tree_util.tree_flatten/tree_unflatten round-trips.

Reproduces without autogalaxy (pure autofit). JAX assertions live here, not test_autofit/ (moved out in #1247).

Library-first gate

Merge after PyAutoFit#1366. Verified passing against that branch.

🤖 Generated with Claude Code

https://claude.ai/code/session_01TDCsgNCXacXqiWAPTswWCt

Reproduces af.Model(int) sub-model; asserts leaf types are NOT registered as
pytree nodes, the real component IS, and jax tree_flatten/unflatten round-trips.
Regression guard for the shapelet vmap crash. JAX assertions live here, not in
test_autofit (moved out in #1247).

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01TDCsgNCXacXqiWAPTswWCt
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 13, 2026
@Jammy2211
Jammy2211 merged commit 85e9ba7 into main Jul 13, 2026
4 checks passed
@Jammy2211
Jammy2211 deleted the feature/jax-pytree-leaf-registration branch July 13, 2026 18:42
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

pending-release PR queued for the next release build

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant