fix: AnalysisPoint.__init__ kwargs passthrough#506
Merged
Conversation
AnalysisPoint's explicit __init__ omitted **kwargs, so any kwarg not in its named-parameter list (notably use_jax_for_visualization from the autofit base Analysis) raised TypeError instead of being forwarded to super. This left use_jax_for_visualization=True silently unusable on al.AnalysisPoint despite the point visualizer dispatching via fit_for_visualization (autolens/point/model/visualizer.py:67). Mirrors the AnalysisInterferometer fix in PR #500. The autolens_workspace_test point_source scripts (visualization.py, visualization_jax.py, modeling_visualization_jit.py) follow in PyAutoLabs/autolens_workspace_test#90 sibling PR. ag.AnalysisInterferometer has the same **kwargs gap on the autogalaxy side; deferred to Phase 1C of the JAX visualization roadmap.
This was referenced May 14, 2026
Collaborator
Author
|
Workspace PR: PyAutoLabs/autolens_workspace_test#91 |
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
PyAutoLens
AnalysisPoint.__init__defined its own explicit signature without**kwargs, so any kwarg not in its named-parameter list (notablyuse_jax_for_visualizationfrom the autofit baseAnalysis) raisedTypeErrorinstead of being forwarded to super.This left
use_jax_for_visualization=Truesilently unusable onal.AnalysisPointdespite:fit_for_visualization(autolens/point/model/visualizer.py:67)AnalysisInterferometerin fix: AnalysisInterferometer.__init__ kwargs passthrough #500This PR adds
**kwargsto the parameter list and forwards it in thesuper().__init__()call. TheAgAnalysisparent already accepts and forwards**kwargs(confirmed via #500's interferometer test plan), so this just plugs the gap in the subclass override.Discovered during planning for autolens_workspace_test #90 (Phase 1B of the JAX visualization roadmap). The workspace_test scripts (
point_source/visualization.py+visualization_jax.py+modeling_visualization_jit.py) ship as a sibling PR on autolens_workspace_test.API Changes
al.AnalysisPoint.__init__gains a**kwargspassthrough — strictly additive. Any caller that previously worked is unaffected. New: callers can now passuse_jax_for_visualization=True(or any other kwarg accepted by the autofit baseAnalysis) withoutTypeError.See full details below.
Test Plan
pytest test_autolens/point/ test_autolens/analysis/— all passFull API Changes (for automation & release notes)
Changed Signature
al.AnalysisPoint.__init__now accepts**kwargsand forwards them tosuper().__init__(). Strictly additive — no existing call site is affected.Migration
None required. Callers that previously passed only the named arguments continue to work.
Follow-ups not in this PR
ag.AnalysisInterferometer.__init__— same**kwargsgap on the autogalaxy side. Deferred to Phase 1C of the JAX visualization roadmap (PyAutoPrompt/autogalaxy_workspace_test/jax_viz_dataset_coverage.md).🤖 Generated with Claude Code