You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: jax.jit(analysis.fit_from) for FitPointDataset (point-source) #457
Extend Path A (jax.jit-wrapped analysis.fit_from) to FitPointDataset.
The imaging and interferometer MGE variants are already shipped; this is the
point-source analogue, which has a structurally different data layer (positions
instead of pixel/visibility arrays) and a PointSolver iterative root-finder.
Plan
Add _register_fit_point_pytrees in PyAutoLens/autolens/point/model/analysis.py mirroring the imaging wiring
Scaffold autolens_workspace_test/scripts/jax_likelihood_functions/point_source/point_pytree.py from mge_pytree.py + reference point_source/point.py
Register surfacing types: FitPointDataset, PointDataset, PointSolver (aux — internal solver state is static)
If the position solver surfaces a non-JIT-safe op, stop and write up the blocker
Detailed implementation plan
Affected Repositories
autolens_workspace_test (primary — new PoC script)
PyAutoLens (new _register_fit_point_pytrees site + FitPointDataset registration)
Enabled jax.jit(analysis.fit_from)(instance) for AnalysisPoint. Registered FitPointDataset, Tracer, and FitPositionsImagePair[All|Repeat|Pair] as JAX pytrees via a new _register_fit_point_pytrees classmethod called from fit_from when use_jax=True. Round-trip agreement verified against NumPy.
Session Notes
ps.Point / ps.PointFlux are handled by autofit.jax.pytrees.register_model; registering them a second time raises Duplicate custom PyTreeDef type registration. Left to the existing path.
_data / _noise_map on FitPositionsImagePair* are ArrayIrregular (NumPy-only). Treating them as per-analysis constants (no_flatten) is correct because the observed positions come from the on-disk PointDataset, not from traced model output.
Solver state is already aux (no_flatten on each FitPositions*); no iterative-solver blockers surfaced.
Activity
Jammy2211 commentedon Apr 19, 2026
Shipped — 2026-04-19
PRs
Summary
Enabled
jax.jit(analysis.fit_from)(instance)forAnalysisPoint. RegisteredFitPointDataset,Tracer, andFitPositionsImagePair[All|Repeat|Pair]as JAX pytrees via a new_register_fit_point_pytreesclassmethod called fromfit_fromwhenuse_jax=True. Round-trip agreement verified against NumPy.Session Notes
ps.Point/ps.PointFluxare handled byautofit.jax.pytrees.register_model; registering them a second time raisesDuplicate custom PyTreeDef type registration. Left to the existing path._data/_noise_maponFitPositionsImagePair*areArrayIrregular(NumPy-only). Treating them as per-analysis constants (no_flatten) is correct because the observed positions come from the on-diskPointDataset, not from traced model output.no_flattenon eachFitPositions*); no iterative-solver blockers surfaced.Jammy2211 commentedon May 28, 2026
Shipped via #458. Closing.