Repository navigation
test: jax_assertions/assertions_traced.py pins add_assertion on the JAX path (PyAutoFit#1581) - #100
Merged
Merged
Conversation
…AX path (PyAutoFit#1581) Witness for the PyAutoFit change that evaluates model assertions as a traced penalty: a top-level ordering assertion, a compound-prior ordering between two components (the Euclid two-basis MGE shape), the jit and vmap Fitness surfaces, a child-attached assertion gathered from the tree, and the unchanged NumPy path. Violating vectors return the resample figure of merit with no exception; satisfying vectors match the NumPy value. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015RALRY9yekWDTtbVfok64a
…ces, traced compound case Review follow-up: enable x64 before importing jax (autonerves reads the env at import; in a plain shell the -1e99 sentinel overflowed to -inf and the sentinel check failed), compare against the sentinel as JAX represents it, use rtol=0, and run the compound-prior ordering under jit and vmap as well as eagerly. Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015RALRY9yekWDTtbVfok64a
Collaborator
Author
|
Independent review: Codex CLI ( |
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
Witness script for PyAutoFit#1581, which makes
model.add_assertion(...)enforceable on the JAX likelihood path. Before that change a violating sample letFitExceptionescape from a non-vmapped JAXFitness, and the vmappedFitnessNautilus builds by default failed at trace time for every vector. The script pins the new contract on everyFitnesssurface and confirms the NumPy path is unchanged. Motivated by the Euclid two-basis MGE label degeneracy (euclid_strong_lens_modeling_pipeline#54).Scripts Changed
scripts/jax_assertions/assertions_traced.py— new; top-level ordering assertion, compound-prior ordering between two components, jit and vmap surfaces, child-attached assertion gathered from the tree, NumPy path unchanged (ENV: jax)Upstream PR
PyAutoLabs/PyAutoFit#1583
Test Plan
python scripts/jax_assertions/assertions_traced.pyprintsassertions_traced: all assertions passedagainst the branch PyAutoFitpython scripts/jax_assertions/fitness_dispatch.pystill passes in the same environmentGenerated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_015RALRY9yekWDTtbVfok64a