Skip to content

fix: add quick_update kwarg to VisualizerExample.visualize_combined - #1267

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/visualize-combined-quick-update-kwarg
May 15, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/visualize-combined-quick-update-kwarg

Conversation

@Jammy2211

@Jammy2211 Jammy2211 commented May 15, 2026 •

Copy link
Copy Markdown
Collaborator

Summary

Adds the `quick_update: bool = False` kwarg to `VisualizerExample.visualize_combined` (`autofit/example/visualize.py:177`). Mirrors the plumbing introduced by commit a1e3605 ("Fix `AnalysisFactor.visualize_combined` dispatch in FactorGraph") which updated the base `Visualizer.visualize_combined` and `AnalysisFactor.visualize_combined` to accept and forward `quick_update` — but missed `VisualizerExample`.

Today any `FactorGraphModel` fit that uses the example Analysis class crashes on the first quick-update iteration with `TypeError: VisualizerExample.visualize_combined() got an unexpected keyword argument 'quick_update'`. This broke four integration / tutorial scripts:

  • `autofit_workspace_test/scripts/graphical/simultaneous.py`
  • `autofit_workspace_test/scripts/graphical/hierarchical.py`
  • `autofit_workspace/scripts/features/graphical_models.py`
  • `autofit_workspace/scripts/cookbooks/multiple_datasets.py`

The change is purely additive — the kwarg defaults to `False` and the body remains `pass` (the example does not implement combined visualization).

A matching one-line fix for `PyAutoGalaxy/autogalaxy/imaging/model/visualizer.py` ships in parallel on the same branch name in PyAutoLabs/PyAutoGalaxy#414.

This was a follow-up surfaced during the validation phase of #1262 (priors-jax-native). The other follow-up surfaced in that work — a deeper `log_prior_from_value` sign-convention bug across the Gaussian-family priors — is tracked separately in #1266.

API Changes

Added `quick_update: bool = False` kwarg to `VisualizerExample.visualize_combined`. Purely additive — existing call sites still work because the kwarg has a default.
See full details below.

Test Plan

  • `pytest test_autofit` — 1242 passed, 1 skipped on this branch (full sweep)
  • `pytest test_autofit/graphical` — 184 passed (covers `AnalysisFactor.visualize_combined` forwarder)
  • `autofit_workspace_test/scripts/graphical/simultaneous.py` — previously broken, now passes
  • `autofit_workspace_test/scripts/graphical/hierarchical.py` — previously broken, now passes
  • `autofit_workspace/scripts/features/graphical_models.py` — previously broken, now passes
  • `autofit_workspace/scripts/cookbooks/multiple_datasets.py` — previously broken, now passes
Full API Changes (for automation & release notes)

Added

  • `VisualizerExample.visualize_combined(analyses, paths, instance, during_analysis, quick_update=False)` — new `quick_update` kwarg matching the base class signature.

Migration

None required. Pure addition with a default value.

🤖 Generated with Claude Code

Mirror the quick_update plumbing added by commit a1e3605 ("Fix
AnalysisFactor.visualize_combined dispatch in FactorGraph"). The base
Visualizer.visualize_combined and AnalysisFactor.visualize_combined both
accept and forward quick_update=quick_update, but VisualizerExample was
missed at the time. Result: any FactorGraphModel fit using the example
Analysis class raised TypeError on the first quick-update iteration —
broke autofit_workspace_test/scripts/graphical/{simultaneous,hierarchical}.py
and autofit_workspace/scripts/{features/graphical_models,cookbooks/multiple_datasets}.py.

Pure additive — kwarg defaults to False, body unchanged.

Refs #1262

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label May 15, 2026
@Jammy2211
Jammy2211 merged commit a3d9ce4 into main May 15, 2026
3 checks passed
@Jammy2211
Jammy2211 deleted the feature/visualize-combined-quick-update-kwarg branch May 15, 2026 08:13
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Sep 4, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant