Skip to content

feat: remove fit_quick.png — quick updates write the normal fit subplot #680

Closed

Description

@Jammy2211

Overview

The quick-update hook (Analysis.perform_quick_update) writes a special lighter-weight fit_quick.png for the PyAutoLens dataset types (imaging, interferometer, point, weak), while full visualization writes fit.png. The user has to visually recognise two different fit-plot layouts for the same fit. PyAutoGalaxy's quick path already just writes the normal subplot_fit — PyAutoLens should do the same, and PyAutoFit's live display should only look for fit.png.

Plan

  • In the four PyAutoLens model plotters, the quick_update=True path plots the normal fit subplot (writing fit.png) and then returns — mirroring PyAutoGalaxy — instead of calling subplot_fit_quick. The quick path still skips heavy extras (log10, planes, tracer, dirty-image variants, FITS).
  • Delete the four subplot_fit_quick functions + the uncalled subplot_fit_combined_quick, and all fit_quick filenames, from the PyAutoLens plot modules.
  • In PyAutoFit, reduce _DISPLAY_CANDIDATES to ("fit.png",) in autofit/non_linear/quick_update.py; update comments and tests.
  • Update the three autolens_workspace_test visualization-jit scripts to assert fit.png instead of fit_quick.png.
Detailed implementation plan

Work Classification

Both — library (PyAutoLens primary, PyAutoFit) + workspace (autolens_workspace_test follow-up behind the library-first merge gate).

Affected Repositories

  • PyAutoLens (primary)
  • PyAutoFit
  • autolens_workspace_test

Branch Survey

Repository Current Branch Dirty?
./PyAutoLens main clean
./PyAutoFit main clean
./autolens_workspace_test main clean

Suggested branch: feature/remove-fit-quick-plots
Worktree root: ~/Code/PyAutoLabs-wt/remove-fit-quick-plots/ (created by /start_library)

Concurrent-claim note (human-approved): PyAutoLens is also claimed by #672 / #678 / autolens_workspace#442, and autolens_workspace_test by #672. Only #678 (point/model) plausibly overlaps this task's autolens/point/model/plotter.py; pre-merge origin/main before opening the PR.

Implementation Steps

  1. PyAutoLens/autolens/imaging/model/plotter.py — remove the subplot_fit_quick import and the if quick_update: block (~l.79–86); make the subplot_fit block run on should_plot("subplot_fit") or quick_update, returning after it when quick_update is set.
  2. PyAutoLens/autolens/interferometer/model/plotter.py — same restructure in both fit methods (quick block ~l.89); fit_interferometer_combined already uses the normal combined subplot for its quick path.
  3. PyAutoLens/autolens/point/model/plotter.py — quick path plots the normal subplot_fit_point (reusing the already-computed critical-curve lines) then returns.
  4. PyAutoLens/autolens/weak/model/plotter.py — quick path plots the normal subplot_fit_weak then returns.
  5. Delete subplot_fit_quick from autolens/{imaging,interferometer,point,weak}/plot/fit_*_plots.py and subplot_fit_combined_quick (zero callers) from fit_imaging_plots.py.
  6. PyAutoFit/autofit/non_linear/quick_update.py — _DISPLAY_CANDIDATES = ("fit.png",); fix stale comments; sweep test_autofit/non_linear/test_quick_update.py for fit_quick references.
  7. autolens_workspace_test/scripts/{imaging,point_source,interferometer}/visualization/modeling_visualization_jit.py — assert fit.png is produced instead of fit_quick.png (verify each script's plots.yaml keeps the assertion meaningful, i.e. only the quick path writes it).
  8. Visualizers keep the quick_update flag unchanged — it still forces the essential subplot and skips expensive extras; only the figure written changes. PyAutoCTI accepts the flag and never special-cases it — no change.

Key Files

  • autolens/{imaging,interferometer,point,weak}/model/plotter.py — quick-update routing
  • autolens/{imaging,interferometer,point,weak}/plot/fit_*_plots.py — subplot_fit_quick definitions to delete
  • autofit/non_linear/quick_update.py — live-display filename candidates
  • autolens_workspace_test/scripts/*/visualization/modeling_visualization_jit.py — assertions

Testing

  • Full test_autofit/ and test_autolens/ suites (no existing tests reference the lens quick plots; PyAutoFit's test_quick_update.py does and is updated).
  • The three workspace_test visualization scripts via smoke after the library changes.

Trade-off (accepted): quick updates now render the full fit.png subplot rather than the lighter 6-panel figure, so each quick update is somewhat slower.

Original Prompt

Click to expand starting prompt

Remove special fit_quick.png for all types of Analysis, instead just plotting the normal fit, same for any other quick plot. ultimately it was annoying having to visually recognise two types of fit plot.

Prompt file: PyAutoMind/draft/feature/autolens/remove_fit_quick_plots.md (advances to active/ on issue creation).

Activity

  1. Jammy2211 commented on Jul 31, 2026

    @Jammy2211
    CollaboratorAuthor

    Library PRs Created

    Full suites green (test_autofit 1637 passed/2 skipped; test_autolens 498 passed). Shipped under human-authorized Heart-RED override; RED reason (verbatim, unrelated nightly): release validation FAILED (stage integrate).

    Workspace impact: (ii) API migration — three autolens_workspace_test visualization-jit scripts assert fit_quick.png and must switch to fit.png; workspace PR follows behind the library-first merge gate.

  2. Jammy2211 commented on Jul 31, 2026

    @Jammy2211
    CollaboratorAuthor

    All PRs open — awaiting merge

    Validation summary:

    • test_autofit/ 1637 passed / 2 skipped; test_autolens/ 498 passed + 4 new quick-update routing tests (each asserts the normal fit subplot is written, fit_quick.png is not, extras skipped).
    • End-to-end: the imaging visualization-jit wst script ran under the branch — quick update fired and wrote fit.png, no fit_quick.png on disk. (Run later OOM-killed in the unrelated end-of-search latent phase under concurrent machine load; earlier one-off failure was a pre-existing Part 1 timing-flake assertion.)
    • Known behaviour notes: quick updates now render the full normal subplot (slower per update, accepted trade-off); weak fits write subplot_fit_weak.png, which the live viewer (now fit.png-only) does not surface — pre-existing filename quirk of the weak module.
  3. Jammy2211 commented on Jul 31, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped — all three PRs merged 2026-07-31 (library first): PyAutoLens#682 (8064fe1db), PyAutoFit#1438 (1d9a268a6), autolens_workspace_test#241 (6e66917). Quick updates now write the normal fit subplot for every Analysis type; fit_quick.png is gone.

    Timing note from a control probe (loaded WSL box): the old fit_quick quick update measured cold 199 s / warm 184 s vs ~296 s first-call for the new normal-subplot path — cold ≈ warm, so quick-update cost is recurring fit-quantity computation + rendering, not one-off JAX compile (the fit_for_visualization compile itself is ~27 s and shared by both paths). Quick-update plotting cost is a candidate for a future profiling task.

    Completion record: PyAutoMind/complete/2026/07/remove-fit-quick-plots.md.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions