Skip to content

refactor: FactorGraphModel per-type visualize_combined dispatch #1339

Closed

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).

Activity

  1. Jammy2211 commented on Jul 9, 2026

    @Jammy2211
    CollaboratorAuthor

    Shipped ✅ — PR #1340 merged, CI green. Mixed-dataset factor graphs now dispatch one combined-visualization call per Visualizer type (homogeneous graphs byte-identical to before); the PyAutoLens type filters from PyAutoLabs/PyAutoLens#587 remain as defence in depth. Closing.

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