Meridian Tools demo guide
This is the canonical guide to the bundled meridian-tools demos. Use it when
you want one safe, reproducible, end-to-end example without client data.
The public story is simple:
- Meridian is the modelling engine.
meridian-toolsis the workflow wrapper.- The bundled demos are launched through
meridian-toolssurfaces, not by calling Meridian directly.
What the bundled demos are for
Phase 08 adds two bundled reference workflows:
timeseries- a national timeseries demo shipped as packaged demo data
geo_panel- a geo-panel demo shipped as packaged demo data
Both datasets are bundled non-client reference data. They exist so analysts and stakeholders can inspect the workflow, run structure, and review artefacts without using client material.
What the package adds on top of Meridian
Meridian remains responsible for the modelling and analysis primitives.
meridian-tools adds the operational surface that agencies usually need around
it:
- typed YAML configuration
- blocked-tail and rolling-origin validation workflow
- manifest-backed run directories
- diagnostics bundling
- compatibility-aware Bayesian model-selection outputs
- lifecycle compare and refresh helpers
- a thin demo launcher for bundled reference workflows
This is why the demos are useful. They show the wrapper workflow directly, rather than asking users to reconstruct it from notebooks or internal scripts.
Demo entrypoints
List the supported demos:
Run the bundled timeseries demo:
Run the bundled geo-panel demo:
By default, demo runs are written under runs/demos/. If you want a different
root, pass --output-dir. If you want a custom visible run name, pass
--run-name.
Example:
The repo-root checkout wrapper remains available when you are working from the source tree:
The same package can also run an explicit authored config:
The repo-root wrapper can run an explicit authored config too:
Bundled YAML surface
The bundled demo YAML files are real meridian-tools configs. They are not
legacy Abacus-style placeholders.
The authored sections used in Phase 08 are:
projectdatamodel_specfitvalidationexportsresponse_curvesoptimisation
The Phase 08 additions are:
response_curves- required if you want the response-curve export stage to run
optimisation- required if you want the optimisation export stage to run
The bundled demos include both sections so that the full staged schema is exercised.
The default demo configs use validation.strategy: none. That keeps the
reference runs model-selection compatible, so LOO and WAIC outputs are
written by default.
Output schema
Each successful demo run writes one manifest-backed staged directory layout:
run_manifest.json stays top-level and remains the source of truth for
artefact discovery, stage status, version metadata, and relative file paths.
Always exported versus config-gated outputs
For the current Phase 08 contract:
- always exported for successful runs:
00_run_metadata20_model_fit30_model_assessment40_decomposition- exported only when applicable:
10_validation- written for validation-aware runs
- skipped for runs with no validation metadata
60_response_curves- requires the authored
response_curvessection
- requires the authored
70_optimisation- requires the authored
optimisationsection
- requires the authored
Within 30_model_assessment, model selection remains compatibility-aware:
- compatible runs write
loo,waic, and comparison outputs - incompatible runs write
model_selection_status.json - compatibility unavailability is non-fatal
How to read the important outputs
Start with these artefacts:
run_manifest.json- run identity, versions, timestamps, stage status, and top-level artefact links
00_run_metadata/config.source.yaml- the authored YAML
00_run_metadata/config.resolved.yaml- the same YAML after runtime path resolution
10_validation/validation_spec.json- validation provenance for validation-aware runs only
- not present in the default bundled demos because they run as full-sample fits
30_model_assessment/diagnostics_bundle.json- the stable machine-readable record of diagnostics export state
30_model_assessment/model_results_summary.html- the wrapped Meridian assessment summary
40_decomposition/summary_metrics.csv- the easiest tabular decomposition output to inspect first
For model selection, keep the boundary honest:
LOOandWAICare only available for compatible fitted Meridian modelsvalidationfits and other incompatible cases will recordmodel_selection_status.jsoninstead- the package does not pretend unsupported runs have valid Bayesian comparison outputs
- the bundled demos are configured as full-sample fits, so they should write
loo_summary.jsonandwaic_summary.jsonby default
For response curves and optimisation:
- these outputs are useful for scenario and allocation review
- they are not a substitute for checking diagnostics, validation provenance, or model-selection compatibility first
For visual review, each stage now keeps its PNG exports inside a local plots/
subdirectory rather than mixing image files into the stage root. That keeps the
machine-readable exports and the human-review plots in one predictable place.
Recommended demo-reading sequence
If you are new to the repository, use this order:
- run
meridian-tools demo --list - run one of the bundled demos
- open
run_manifest.json - inspect
00_run_metadata/config.source.yaml - inspect
30_model_assessment/diagnostics_bundle.json - inspect
40_decomposition/summary_metrics.csv - inspect
60_response_curves/and70_optimisation/if those stages ran
If you are working from a source checkout, python runme.py demo --list and
python runme.py demo ... remain equivalent convenience wrappers.
That sequence shows the wrapper value quickly: one YAML config in, one
structured run directory out, with the Meridian and meridian-tools artefacts
kept in one predictable place.