Repository navigation
Draw the model figure beside every model.info, and the EP state figure (PyAutoFit#1620) - #52
Merged
Merged
Conversation
Phase 6a of the model-figures rollout: each tutorial that prints a model's info now draws af.ModelPlotter(model).figure() beside it and teaches the map (structure) vs legend (priors) reading. Tutorial 5 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). config/output.yaml gains the model_figure key (off). 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
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Phase 6a of the model-figures rollout (PyAutoLabs/PyAutoFit#1620): every tutorial that prints a model's
infonow drawsaf.ModelPlotter(model).figure()beside it and teaches the reading: the figure is the map (structure, ownership, what is fixed, shared, related or asserted) andinfois the legend (priors and values). Tutorial 1 introduces the idea in full; later tutorials say what to look for in each figure. Tutorial 4's five-Gaussian model is where the plate appears (5 components,independentbadges), and its tuned-priors variant renders identically to the free one, which is the "map unchanged, legend moved" point made in prose.Tutorial 5 (expectation propagation) refreshes the EP state figure every sweep (
visualise_interval=1) and, after the fit, drawsaf.EPPlotter(kind="state")from the result's swept factor graph, reading factor status, update age and confirmed reverted updates. Its prose was written against a real render of the run.config/output.yamlgains themodel_figurekey (off, matching autofit_workspace) so the output-folder pointers tograph_model.png/graph_state.pngare true.Tutorials 3.2 and 3.4 already carried figures (phase 4).
tutorial_optional_hierarchical_ep.pyis untouched: its fit is commented out by design.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/chapter_1_introduction/tutorial_1_models.py— 4 figures; the map/legend teaching block at the first site (file is CRLF; line endings preserved)scripts/chapter_1_introduction/tutorial_3_non_linear_search.py— 1 figurescripts/chapter_1_introduction/tutorial_4_why_modeling_is_hard.py— 4 figures; plate and "map unchanged" prose verified against rendered PNGsscripts/chapter_1_introduction/tutorial_7_the_details.py— 1 figurescripts/chapter_1_introduction/tutorial_optional_bayesian_formalism.py— 1 figurescripts/chapter_3_graphical_models/tutorial_3_graphical_benefits.py— 1 figure onglobal_prior_modelscripts/chapter_3_graphical_models/tutorial_5_expectation_propagation.py— 1 figure onglobal_prior_model,visualise_interval=1,__Seeing the EP run__block with the EP state figure, output bullets for the two PNGsconfig/output.yaml—model_figure: falseadded with the same comment as autofit_workspacenotebooks/**— the seven twins regenerated via PyAutoHandsgenerate.py howtofit; catalogue byte-identical;tutorial_8_scientific_workflow.ipynbstill has zero code cellsUpstream PR
PyAutoLabs/PyAutoFit#1621 —
EPResult.factor_graph, consumed by tutorial 5. Smoke CI checks out the same-named library branch; merge library first.Test Plan
.github/scripts/run_smoke.py: 18/18 PASS locally. Tutorial 5 is excluded from CI byconfig/build/no_run.yaml(NEEDS_FIX, PyAutoFit#1454), so its manual headless run (exit 0, EP state figure rendered) is the evidence for that script.figure(call within the following lines; navigator check exits 0Known, pre-existing and out of scope (to be filed as its own prompt): tutorial 5 creates
centre_shared_priorbut never assigns it, so despite the prose nocentreis actually shared across the datasets; the new figure prose describes only what the map shows.Generated by the PyAutoLabs agent workflow.
🤖 Generated with Claude Code
https://claude.ai/code/session_01DLx38vS6F1M7K5LnpVbeZ7