Repository navigation
Description
Overview
Finish community PR #1709 by @samlange04 (proposal PyAutoLabs/.github#38): per-component corner-plot labels, per-component corner plots, and a latent-parameter corner plot. Instead of another review round, the maintainer pushes the review fixes onto the contributor's branch (as done for PyAutoGalaxy#635) and merges. The work then continues to PyAutoGalaxy's latent declarations and, after release, the workspace config/docs PRs.
Plan
- Phase 1 (this issue): PyAutoFit. Push the review fixes plus the four Witness tests onto
samlange04:fix/corner-anesthetic-duplicate-labels, then merge Corner plots: fix the silent failure on repeated labels; per-component labels and plots; latent parameters #1709. - Phase 2: PyAutoGalaxy. Land the contributor's
feature/latent-parametersdeclarations and update thenotation.yamlsuperscript comments. - Phase 3: workspaces, after release.
plots_search.yamlkeys andnotation.yamldocs in autofit/autogalaxy/autolens_workspace, HowToGalaxy and HowToLens (contributor'sfeature/corner-plot-labelsbranches), plus the release note. - Community: progress updates on Corner plots: fix the silent failure on repeated labels; per-component labels and plots; latent parameters #1709 and discussion Aggregator With Tag #38, mark the verdict as the discussion's answer, and tell the contributor on release.
Maintainer decisions (2026-10-21):
- (a) Superscripts are the component's dot-joined path everywhere, including the
model.resultstext. - (b) The latent corner plot stays a separate plot, behind
plots_search.yamlnest.corner_anesthetic_latent(default off), written next tocorner_anesthetic.png.
Tier: glance — merge mode: human /prm (Heart RED override in force: merge needs an explicit /prm with every check green)
Detailed implementation plan
Work Classification
Both. Library first (PyAutoFit, then PyAutoGalaxy); the workspaces follow after release.
Worktree root
~/Code/PyAutoLabs-wt/finish-pr-1709-corner-plots/ (created by /start_library)
Affected Repositories
- PyAutoFit (primary, phase 1)
- PyAutoGalaxy (phase 2)
- autolens_workspace, HowToGalaxy, HowToLens (+ autofit/autogalaxy workspaces) (phase 3)
Branch Survey
| Repository | Current Branch | Dirty? |
|---|---|---|
| ./PyAutoFit | main | clean |
| ./PyAutoGalaxy | main | clean |
| ./autolens_workspace | main | 1 file |
| ./HowToGalaxy | main | clean |
| ./HowToLens | main | clean |
Branch: phase 1 tracks the contributor's samlange04:fix/corner-anesthetic-duplicate-labels (maintainer edits are allowed) so the commits land on #1709. Later phases use feature/finish-pr-1709-corner-plots.
Implementation Steps (phase 1, base: PR head bf43aa623)
corner_anestheticgating (autofit/non_linear/search/posterior_kind.pyplot_results):corner_anesthetic_componentsfalls back to thecorner_anestheticvalue instead ofdefault=True.- Latent plot exception safety (
posterior_kind.pyplot_latent_results,updater.py): wrap it in@log_plot_exception, as_model_latent_parametersalready is, and skip it in test mode. A raising latent conversion is then logged and no longer escapes the finalvisualize; today the updater only catchesFileNotFoundError. - Switch for model latents (
autofit/non_linear/analysis/latent.py): a newoutput.yamllatent-block key,latent_model_parameters: true, gates appending declared latents tosamples.csv,latent.resultsandlatent_summary.json. Document that per-component latent plots followcorner_anesthetic_components. - Unique deep-path labels (
autofit/mapper/prior_model/abstract.pysuperscript_from_component_pathand its caller): truncate later names to 3 characters only while the labels stay unique, otherwise lengthen the cut. This fixeslens.bulge_inner.shear/lens.bulge_outer.shearboth givinglens.bul.she, andlens.bulgevslens.bul.0. Cachecomponent_paths. - Shared priors (
abstract.py_prior_owner_and_leaf_names): collect every holder of a shared prior, not just the last one on the path walk, so a power law'sell_compslinked into a multipole still gives the mass'saxis_ratio/anglelatents. - Periodic recentring: recentre for plots only and write the raw angle branch to
latent.csv, so it doesn't depend on the fit. Documented in the docstrings andoutput.yaml. - Minor: a component literally named
modelmust not collide with the root group label. - Testing:
- New tests for Witness items (i)–(iv), in
test_nest_plotters.py,test_updater.py,test_latent_parameters.pyandtest_model_mapper.py. - Re-check the
test_samples_text.pyexpectations against decision (a). - Full
test_autofitrun, plus/smoke_teston autofit/autogalaxy workspace_test.
- New tests for Witness items (i)–(iv), in
Key Files
autofit/non_linear/search/posterior_kind.py— corner / per-component / latent plot gatingautofit/non_linear/search/updater.py— visualize exception handlingautofit/non_linear/analysis/latent.py— model latent outputautofit/mapper/prior_model/abstract.py— superscripts, prior ownershipautofit/mapper/prior_model/latent_parameters.py— latent declarationsautofit/config/output.yaml,autofit/config/visualize/plots_search.yaml— new keys and docs
Heart RED override (AUTONOMY.md "Human override for Heart RED (development only)")
Authorization from the live maintainer, 2026-10-21, for this task: "do 2, Override and proceed".
The override covers commit, push and PR work only. Merge needs a separate /prm with every required check green. Release is excluded. This branch makes no claim to fix Heart.
Heart RED reasons at start (Heart: RED — Release RED; monitoring RED · 14/100 · 464 unresolved):
[red] PyAutoFit: CI failure — https://api.github.com/repos/PyAutoLabs/PyAutoFit/actions/runs/39111874604[red] PyAutoFit: PyAutoFit: CI failure[red] PyAutoFit/Tests: failure[red] PyAutoFit/workflows/Tests: failure[red] PyAutoHands/workflows/Python Version Matrix: failure[red] PyAutoHeart/workflows/Workspace Smoke: failure[red] PyAutoMind/workflows/Spawn Drift: failure[red] PyAutoArray/Tests: red[red] PyAutoArray/Tests: red[red] PyAutoFit/Tests: red[red] PyAutoFit/Tests: red[red] PyAutoFit/Tests: red[red] PyAutoFit/Tests: red[red] autofit_workspace_test/Smoke Tests: red[red] autogalaxy_workspace_test/Smoke Tests: red[red] autolens_workspace_test/Smoke Tests: red[red] CI wall-clock: 27 gates · slowest PyAutoBrain Nightly Release 49m · 9 hang events[red] PyAutoFit: PyAutoFit: CI failure[red] Workspace validation: NOT ready — 1414p / 1f / 133s @ cloud#39224774724[red] euclid: red[red] test_run: red[red] PyAutoArray: red[red] autolens_inference: red[red] autolens_profiling: red[red] Worktree drift: 5 orphan / 0 missing / 4 dirty[red] euclid_strong_lens_modeling_pipeline: red
Passed branch gates: recorded at ship time.
Original Prompt
Click to expand starting prompt
Finish community PR PyAutoFit#1709…
Type: feature
Target: PyAutoFit
Repos:
- PyAutoFit
- PyAutoGalaxy
- autolens_workspace
- HowToGalaxy
- HowToLens
Difficulty: too-large
Autonomy: supervised
Priority: high
Memory: wiki/galaxies/sources/massive-ellipticals.md; reading-queue.md; wiki/lensing/sources/dark-matter-substructure.md
Status: formalised
Consequence: glance
Witness: PyAutoFit PR Corner plots: fix the silent failure on repeated labels; per-component labels and plots; latent parameters #1709 CI green with new tests for (i)corner_anesthetic: falseand the components key absent writes no per-component plots, (ii) a raising latent conversion logs instead of propagating from the final visualize, (iii) a power law's ell_comps linked into a multipole still yields the mass's axis_ratio/angle latents, (iv) deep-path labels stay unique
Review-minutes: 3
Unattended: needs-slicing
Finish community PR PyAutoFit#1709 (corner plots: per-component labels, per-component plots, latent-parameter corner plot) — maintainer applies the review changes
Community PR #1709 by @samlange04 from proposal PyAutoLabs/.github#38 (Ideas & Proposals). Maintainer decision 2026-10-21: (a) superscripts become the component's dot-joined path everywhere including model.results text; (b) the latent corner plot stays a separate plot, switched from config (visualize/plots_search.yaml nest.corner_anesthetic_latent, default off), written next to corner_anesthetic.png inside PyAutoFit. The maintainer will push the review fixes onto the contributor's branch (as done for PyAutoGalaxy#635) and merge, rather than asking for another round. user-facing: post a progress update on the PR and the discussion, mark the discussion verdict as the answer, and update the contributor on release.
Review findings to resolve (PR head bf43aa6; 91 targeted tests pass, 158 across the touched test files)
- Per-component plots ignore
corner_anestheticand default on whencorner_anesthetic_componentsis absent (posterior_kind.py:134-146) → fall back to thecorner_anestheticvalue. latent_parameters_frominplot_latent_results(posterior_kind.py:173) runs outside@log_plot_exception; updater catches onlyFileNotFoundError(updater.py:239) → guard like_model_latent_parameters; also respect test mode.- Model latents appended to
latent/samples.csv,latent.results,latent_summary.jsonwith no switch (analysis/latent.py:165,277,380) → add a key inoutput.yaml's latent block (default on); give per-component latent plots their own control or document the coupling tocorner_anesthetic_components. - Deep-path 3-char truncation collides (
lens.bulge_inner.shear/lens.bulge_outer.shear→lens.bul.she; shared-centre basis readslens.bulgeandlens.bul.0) (abstract.py:181) → truncate only while unique. - Shared prior between differently named components follows the last holder (
_prior_owner_and_leaf_names,abstract.py:2557): power-law ell_comps linked into a multipole can drop the mass's latents → declarations must see shared priors from every holder; add the test. - Periodic recentring writes a fit-dependent angle branch into
latent.csv→ decide (recommend: recentre for plots only) and document. - Docs:
notation.yamlsuperscript:block now applies only to a bare unnamedModel→ update comments in PyAutoGalaxy and the three workspacenotation.yaml, release note; land workspaceplots_search.yamlkey PRs (contributor has branchesfeature/corner-plot-labelson autofit/autogalaxy/autolens_workspace, HowToLens, HowToGalaxy) and PyAutoGalaxyfeature/latent-parameters. - Minor: component literally named
modelcollides with root group; cachecomponent_paths.
Delivery
PyAutoFit first (push onto contributor's branch samlange04:fix/corner-anesthetic-duplicate-labels, merge #1709), then PyAutoGalaxy latent declarations PR, then workspace config/docs PRs after release (workspace smoke CI installs the released library).
Activity
Corner plots: resolve the PyAutoLabs#1709 review (maintainer changes)
Jammy2211 commentedon Oct 21, 2026
Library PR updated (phase 1)
Maintainer changes pushed onto the contributor's branch, now #1709 at
f9377f3f6, labelledpending-release.pytest test_autofitbf43aa623pyauto-heart smoke)f9377f3f6Next:
/prmonce CI is green (glance tier, but the RED override means merging needs a human/prm). Then phase 2, the PyAutoGalaxy declarations, which the contributor will open as their own PR after release, and phase 3, the workspace keys andnotation.yamldocs.Jammy2211 commentedon Oct 21, 2026
Shipped (phase 1)
#1709 merged (
d3a772129, 2026-10-21) with the contributor's work plus the maintainer changesf9377f3f6. Labelledpending-release: it reaches users in the next PyAutoFit release.corner_anesthetic_latent, default off)./prmand with every required check green.Remaining scope, re-filed as Mind prompts:
af.Periodicfor shear, ellipticity and multipoles). The contributor will open the PR after the release.plots_search.yaml/output.yamlkeys (corner_anesthetic_latent_components,latent_model_parameters), update thenotation.yamlsuperscript comments, and write the release note. This needs the released library.Closing this issue for phase 1.