Inspect a retained run
Each non-dry runner invocation reserves a new timestamped directory under
run.output_dir. Read run_manifest.json first: it records stage states,
artefact paths, warnings and execution failures. Directory existence alone
does not show that a stage ran or produced valid evidence.
| Directory | Role |
|---|---|
00_run_metadata | Resolved configuration, provenance and CLI log |
05_prior_sensitivity | Prepared alternative configurations |
08_ai_advisor | Local configuration evidence and rules |
10_pre_diagnostics | Prior predictive and pre-fit evidence |
20_model_fit | Fitted model.nc and fit evidence |
30_model_assessment | Posterior predictive assessment |
35_holdout_validation | Optional fresh-fit predictive evidence |
40_decomposition | Model component summaries |
50_diagnostics | Diagnostic reports and resolved gate policy |
60_response_curves | Adstock and saturation outputs |
70_optimisation | Reserved stage; no validated YAML optimisation block |
75_prior_sensitivity_fits | Optional fitted-scenario comparisons |
80_interpretation | Interpretation inventory |
90_ai_advisor | Final local or provider-backed evidence review |
The CLI retains 00_run_metadata/run.log; failures can also retain
00_run_metadata/error.traceback.txt. The resolved configuration is
00_run_metadata/config.resolved.yaml. Use the manifest’s recorded paths rather
than treating a list of filenames from another release as exhaustive.
Stage states distinguish completed, skipped, failed and not-reached work. A run
can complete while its diagnostic floor is fail; inspect
50_diagnostics/diagnostics_report.csv separately. Failed runs retain completed
stages and error information. A fitted file in a failed run is not equivalent
to a completed run accepted by scenario mode.
Optional outputs have explicit limits. Stage 05 alone does not establish prior
robustness; stage 75 runs only when fit_scenarios: true. An advisor response
is an interpretation of retained evidence, and the optimisation stage is
currently skipped because no validated YAML block exists. See prior sensitivity,
advisor policy and scenario recipes.
Manifest schema and provenance
run_manifest.json has schema version 2. The fields below describe execution
identity; they do not constitute model approval (src/ammm/pipeline/manifest.py:40,
src/ammm/pipeline/manifest.py:120).
| Fields | Meaning |
|---|---|
run_name, timestamp, output_dir | Name, UTC directory timestamp, absolute retained directory |
config_path, config_sha256, model_class | Source config identity and resolved class |
data | Input path/hash entries where configured; preserve actual inputs separately |
overrides | Applied sampler, sample-count, stage and quick-mode changes |
status, finished_at, warnings, error | Run lifecycle; error includes failing stage, type and message |
stages | Mapping from stage key to the record below |
Each stage record has directory, status, started_at, finished_at,
artifacts, warnings and error. artifacts maps semantic keys to retained
paths; resolve those paths from the run directory. Stage states are pending,
running, completed, skipped, failed and not_reached. Run states are
pending, running, completed and failed
(src/ammm/pipeline/manifest.py:10). A skipped directory can exist without
usable evidence, and a later exception leaves earlier completed outputs intact.
Retain source/config/data identity, the lockfile and effective environment, all
random seeds, study evidence and the analysis rationale for reproduction. Stage
00 records selected package versions and a Git SHA, but does not archive every
dependency, data file or uncommitted source change. Its release_status: supported
is a static metadata label, not estimator qualification
(src/ammm/pipeline/stages/core.py:243, src/ammm/pipeline/stages/core.py:274).
The runner uses an integer sampler seed for its predictive/curve context, otherwise
42; fit settings themselves retain their configured sampler semantics
(src/ammm/pipeline/runner.py:405).
Files and conditional presence
These filenames are written by the listed stages at the reviewed commit. Read the manifest before opening them because disabled, failed or not-reached stages may leave them absent. Plots are presentation artefacts; retain the numeric source and model for reanalysis.
| Directory | Numeric and text evidence | Writer |
|---|---|---|
00_run_metadata | config.original.yaml, config.resolved.yaml, config.txt, config.yml, data_dictionary.csv, dataset_metadata.json, design_matrix_manifest.csv, estimator_manifest.yaml, estimator_summary.txt, git_sha.txt, model_metadata.json, output.txt, session_info.txt, spec_summary.csv; conditional holiday manifest; CLI log/traceback | src/ammm/pipeline/stages/core.py:148 |
05_prior_sensitivity | Scenario directories containing config.resolved.yaml; plan metadata as recorded in manifest | src/ammm/prior_sensitivity/scenarios.py:177 |
08_ai_advisor | evidence.json, rules_summary.json, advisor_status.json when enabled and writing outputs | src/ammm/pipeline/stages/ai_advisor.py:41 |
10_pre_diagnostics | Prior-predictive plot, stationarity_summary.csv, transfer_entropy_summary.csv | src/ammm/pipeline/stages/core.py:356 |
20_model_fit | model.nc, posterior_summary.csv, trace.png | src/ammm/pipeline/stages/core.py:425 |
30_model_assessment | posterior_predictive.nc, posterior_predictive_summary.csv, fitted.csv, observed.csv, residuals.csv, fit_metrics.json and diagnostic plots | src/ammm/pipeline/stages/core.py:455 |
35_holdout_validation | validation_metadata.json, holdout_predictive_report.json, holdout_predictive_summary.csv, holdout_posterior_predictive.nc, holdout_fitted.csv, holdout_observed.csv, holdout_residuals.csv, plots | src/ammm/pipeline/stages/validation.py:85 |
40_decomposition | channel_contributions.csv, baseline_contributions.csv, mean_contributions_over_time.csv, decomposition plots | src/ammm/pipeline/stages/core.py:539 |
50_diagnostics | diagnostics_report.csv, diagnostics_summary.txt, diagnostic_gates.resolved.yaml; design, MCMC, predictive, Bayesian-criteria and calibration reports; VIF/residual summaries | src/ammm/pipeline/stages/core.py:659 |
60_response_curves | adstock_curve, saturation_curve, forward_pass_contribution_curve: each .nc, _summary.csv and .png; all_response_curves.csv, current_input_response.csv, response_curves.png | src/ammm/pipeline/stages/core.py:819 |
70_optimisation | No optimisation result; reserved stage is skipped | src/ammm/pipeline/stages/core.py:969 |
75_prior_sensitivity_fits | scenario_fit_diagnostics.csv, sensitivity_comparison.csv, channel_robustness.csv, roas_sensitivity.png; no alternative posterior files | src/ammm/pipeline/stages/core.py:584 |
80_interpretation | interpretation_report.md, evidence_inventory.md | src/ammm/pipeline/stages/core.py:979 |
90_ai_advisor | Local evidence/rules/status and advisor_review.md; parameter-identification report and local lookup; conditional accepted response and patch/approval records | src/ammm/pipeline/stages/ai_advisor.py:88 |
The local parameter lookup is not a provider-safe evidence bundle. See advisor operations for exact invocation flags and conditional proposal files. A manifest contains what was actually retained, so do not infer a live provider call from the directory name.
Table keys, units and intervals
Dimension columns are coordinate keys: commonly date and channel, with
configured panel axes such as geo added where retained. Join by named keys,
never by row position. The following schemas describe this writer; optional
parameter columns from ArviZ depend on the installed package settings.
| File or family | Keys and values | Units / interpretation |
|---|---|---|
data_dictionary.csv | column, role, dtype, missing_count, unique_count | Input schema audit |
design_matrix_manifest.csv | column, role, dtype, variance, nonzero_count | Raw-input screening, not a complete transformed estimability proof |
spec_summary.csv | setting, value | Model specification summary |
stationarity_summary.csv | variable, n, adf_statistic, adf_p_value | Univariate screening; unavailable tests can have missing values |
transfer_entropy_summary.csv | channel, screening_metric, value, interpretation | Despite its legacy filename, this is lag-zero Pearson correlation screening, not transfer entropy or causality |
posterior_summary.csv, mcmc_summary.csv | parameter plus ArviZ statistics | Parameter units depend on scaling; interval names/probability follow the actual ArviZ output, not a guaranteed 94% HDI |
fitted.csv, observed.csv, residuals.csv | Observation keys; fitted_mean, fitted_median, observed, residual as applicable | Original outcome units; residual = observed minus fitted mean |
posterior_predictive_summary.csv | Observation keys; mean, median, abs_error_94_lower, abs_error_94_upper, observed | Original outcome draws, including observation variation |
channel_contributions.csv | Observation/channel keys; mean, median, abs_error_94_lower, abs_error_94_upper | Original outcome component units |
mean_contributions_over_time.csv | component_type, observation keys, component and summary values | Original outcome component units |
baseline_contributions.csv | component, mean plus panel keys where present | Mean per-period baseline contribution, not automatically a horizon total |
diagnostics_report.csv | check_id, phase, severity, status, metric, value, threshold, message, overall_status | Policy outcomes; skipped is not pass |
| Metric summaries | metric, value | Consult metric definition; null is not zero |
| Holdout row tables | date, observed, posterior_mean, posterior_median, residual, lower_50, upper_50, lower_80, upper_80, lower_94, upper_94 or their selected subsets | Original outcome units; equal-tailed predictive intervals |
holdout_predictive_report.json | schema_version: 1, evidence_type, fresh_fit, metrics, sampling_diagnostics | Fresh conditional evaluation; review calibration leakage boundary |
| Stage 75 comparisons | Scenario and coordinate keys, metric, reference/scenario means and HDI bounds, relative_change, hdi_overlap, robust | Contribution share or all-time incremental ROAS; flags are declared tolerance rules |
Schemas come from src/ammm/pipeline/stages/core.py:196,
src/ammm/pipeline/stages/core.py:356, src/ammm/pipeline/stages/core.py:455,
src/ammm/pipeline/stages/core.py:539, src/ammm/pipeline/stages/core.py:684,
src/ammm/mmm/blocked_holdout.py:178 and
src/ammm/prior_sensitivity/comparison.py:74.
The abs_error_* columns contain interval endpoints, not errors or distances from
the mean. The summary facade uses HDIs when chain and draw remain separate,
but equal-tailed quantiles when only sample remains; retain the dimensions and
interval method with exports (src/ammm/mmm/summary/factory.py:240). ArviZ’s
parameter summary uses its installed defaults; in the reviewed execution it
emitted eti89_lb and eti89_ub. Do not relabel those as 94% HDIs
(src/ammm/pipeline/stages/core.py:440).
Stage 60 always summarises curves with mean, median, eti_94_lower and
eti_94_upper, denoting 94% equal-tailed intervals. adstock_curve_summary.csv
uses time since exposure; saturation uses scaled x plus original-unit input;
forward-pass curves use history multiplier sweep plus total original input.
all_response_curves.csv unions these columns and adds curve_family, so
family-inapplicable fields are missing. current_input_response.csv retains
total_input, mean_input, contribution summaries and marginal summaries at
sweep=1; its marginal is a derivative with respect to total channel input,
which is only monetary when the input is spend
(src/ammm/pipeline/stages/core.py:858, src/ammm/pipeline/stages/core.py:948,
src/ammm/pipeline/stages/_core_metrics.py:139).
NetCDF and review handoff
model.nc retains the model persistence metadata and canonical fitted inputs
alongside inference groups. Predictive and curve .nc files retain draw and
coordinate axes but are not standalone fitted models. Inspect each dataset’s
variables/dimensions before combining it with another run; save coordinate
labels and preserve joint posterior draws when aggregating uncertainty
(src/ammm/mmm/persistence.py:62, src/ammm/pipeline/artifacts.py:147).
A review handoff should name the decision and estimand, source/data identities, resolved config and seeds, run/stage states, diagnostic policy/results, holdout design/results, calibration provenance, sensitivity alternatives and proposed allocation constraints. Include a statement of what was not evaluated. The retained files support that review; they do not make the acceptance decision.
Implementation reference at 7cb7f20: src/ammm/pipeline/artifacts.py:71, src/ammm/pipeline/runner.py:156, src/ammm/pipeline/stages/core.py:969.