Skip to content

Show the model figure beside every model.info, and the EP state figure (PyAutoFit#1620) - #154

Merged
Jammy2211 merged 2 commits into
mainfrom
feature/model-figures-rollout-autofit
Sep 13, 2026
Merged

Jammy2211 merged 2 commits into
mainfrom
feature/model-figures-rollout-autofit

Conversation

@Jammy2211

Copy link
Copy Markdown
Collaborator

Summary

Phase 6a of the model-figures rollout (PyAutoLabs/PyAutoFit#1620): every script that prints a model's info now draws af.ModelPlotter(model).figure() beside it, so the reader sees the map (structure: which component owns which parameter, what is fixed, shared, related or asserted) before the legend (the priors and values info lists). The first figure in each script introduces that reading; later ones say what changed. features/expectation_propagation.py additionally draws the global model where the factor graph is composed, refreshes the EP state figure every sweep (visualise_interval=1), and after the fit shows af.EPPlotter(kind="state") from the result's swept factor graph, reading factor status, update age and confirmed reverted updates off the graph.

Explicit exceptions: cookbooks/result.py prints three aggregator-loaded models in a loop, so one figure follows the loop for the last model (all three share one structure); result*.info and samples.info are not model prints. cookbooks/multiple_datasets.py and features/graphical_models.py were already covered by phases 2 and 4.

Opened under Heart RED release validation FAILED (stage integrate) (unrelated autolens integrate scripts) with explicit human authorisation on 2026-09-13; merge stays human via /prm, after the upstream library PR.

Scripts Changed

  • scripts/cookbooks/model.py — 12 figures at the remaining bare model.info sites; map/legend reading stated once
  • scripts/cookbooks/multi_level_model.py — 2 figures; map/legend reading stated once
  • scripts/cookbooks/result.py — 1 figure after the aggregator model loop
  • scripts/features/model_comparison.py — 3 figures
  • scripts/features/search_chaining.py — 5 figures; the prior-passing sites read as "same map, changed legend"
  • scripts/features/search_grid_search.py — 1 figure
  • scripts/searches/start_point.py — 2 figures
  • scripts/overview/overview_1_the_basics.py — 4 figures (one on global_prior_model)
  • scripts/features/expectation_propagation.py — global-model figure at composition, visualise_interval=1, __Seeing The Sweep__ block with the EP state figure, graph_model.png / graph_state.png output-folder bullets (behind config/output.yaml model_figure: true)
  • notebooks/** — the nine twins regenerated via PyAutoHands generate.py autofit; catalogue byte-identical

Upstream PR

PyAutoLabs/PyAutoFit#1621 — EPResult.factor_graph, consumed by expectation_propagation.py. Workspace smoke CI checks out the same-named library branch; merge library first.

Test Plan

  • Every touched script runs headless under the smoke env profile (PYAUTO_TEST_MODE=1 PYAUTO_SKIP_FIT_OUTPUT=1 PYAUTO_SKIP_VISUALIZATION=1 PYAUTO_SKIP_CHECKS=1, Agg backend), exit 0, no traceback; the EP script reaches the EPPlotter call and returns
  • CI recipe locally: run_python.py on the touched allowlisted scripts (overview_1, cookbooks/model, cookbooks/result) PASS; notebook leg on overview_1_the_basics.ipynb PASS; check_navigator.py OK
  • Coverage check: every model print(*.info) under scripts/ (42 sites, 11 files) has a .figure( within 20 lines
  • Smoke tests pass for all affected workspaces (CI)

Generated by the PyAutoLabs agent workflow.

🤖 Generated with Claude Code

https://claude.ai/code/session_01DLx38vS6F1M7K5LnpVbeZ7

Jammy2211 and others added 2 commits September 13, 2026 12:08
Phase 6a of the model-figures rollout: every script that prints a
model's info now draws af.ModelPlotter(model).figure() beside it, so
the map is read before the legend. expectation_propagation.py draws
the global model, refreshes the EP state figure every sweep
(visualise_interval=1) and shows af.EPPlotter(kind="state") from the
result's swept factor graph (PyAutoFit EPResult.factor_graph, same
branch). Notebooks and catalogue regenerated.

Refs PyAutoLabs/PyAutoFit#1620

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01DLx38vS6F1M7K5LnpVbeZ7
@Jammy2211 Jammy2211 added the pending-release PR queued for the next release build label Sep 13, 2026
@Jammy2211
Jammy2211 merged commit 8ef0227 into main Sep 13, 2026
6 checks passed
@Jammy2211
Jammy2211 deleted the feature/model-figures-rollout-autofit branch September 13, 2026 11:36
@Jammy2211 Jammy2211 removed the pending-release PR queued for the next release build label Oct 7, 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