Skip to content

refactor: dispatch visualize_combined per Visualizer type in FactorGraphModel - #1340

Merged
Jammy2211 merged 1 commit into
mainfrom
feature/factor-graph-viz-dispatch
Jul 9, 2026
Merged

Jammy2211 merged 1 commit into
mainfrom
feature/factor-graph-viz-dispatch

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

FactorGraphModel.visualize_combined / perform_quick_update routed every factor into the lead factor's Visualizer.visualize_combined, crashing mixed-dataset graphs (first hit by AnalysisImaging + AnalysisWeak in the weak series; PyAutoLens papered over it with type filters in PyAutoLabs/PyAutoLens#587). This fixes the producer: factors group by their analysis Visualizer class (order preserved) and each group gets one combined call with its matching sub-instances. Homogeneous graphs form a single group — byte-identical previous behaviour. Closes #1339.

API Changes

None — internal dispatch; the public visualize surface is unchanged.

Test Plan

  • New test_visualize_combined_dispatch.py: homogeneous graph = one call with all factors/instances; mixed graph = one call per visualizer type with order-preserved sub-lists.
  • Full test_autofit/: 1424 passed, 14 skipped.

Validation checklist (--auto run)

🤖 Generated with Claude Code

FactorGraphModel.visualize_combined (and perform_quick_update) routed EVERY
factor into the lead factor's Visualizer.visualize_combined, which breaks
mixed-dataset graphs — the first one (AnalysisImaging + AnalysisWeak, the
weak series' combined strong+weak example) crashed until PyAutoLens's
visualizers grew type filters (PyAutoLabs/PyAutoLens#587). Fix the producer:
group (factor, instance) pairs by the analysis Visualizer class (order
preserved) and issue one combined call per group. Homogeneous graphs produce
exactly one group — byte-identical to the previous behaviour. The PyAutoLens
filters remain as defence in depth.

Closes #1339.

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Jul 9, 2026
@Jammy2211
Jammy2211 merged commit 4592990 into main Jul 9, 2026
5 checks passed
@Jammy2211
Jammy2211 deleted the feature/factor-graph-viz-dispatch branch July 9, 2026 14:28
@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.

refactor: FactorGraphModel per-type visualize_combined dispatch

1 participant