Skip to content

refactor: FactorGraphModel per-type visualize_combined dispatch #1339

Description

@Jammy2211

Overview

FactorGraphModel.visualize_combined (autofit/graphical/declarative/collection.py) routes EVERY factor into the lead factor's Visualizer.visualize_combined. Mixed-dataset graphs (AnalysisImaging + AnalysisWeak, first built by the weak series' combined strong+weak example) crashed until PyAutoLens's visualizers grew type filters (PyAutoLabs/PyAutoLens#587). This fixes the producer.

Plan

  • Group model_factors by their analysis Visualizer class; for each group call the group lead's visualize_combined with that group's factors and the matching sub-instances (order preserved).
  • Homogeneous graphs: exactly one group → today's call, byte-identical behaviour.
  • The PyAutoLens type filters stay as defence in depth.
  • Unit test with two stub Visualizer classes recording which factors/instances they received.

Work-type refactor (cap safe); --auto continuation 2026-07-09 with in-session merge authorization. Branch feature/factor-graph-viz-dispatch (parallel to the EP tasks' PyAutoFit claims — disjoint files).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions