Guide: Running the Model
This guide explains how to run AMMM V2 with the current runme.py entrypoint
or directly through MMMBaseDriverV2.
What This Guide Covers
Section titled “What This Guide Covers”- Running the full pipeline with real CLI flags
- Understanding the stage-based outputs
- Checking diagnostics before trusting optimisation and interpretation outputs
Recommended Path: runme.py
Section titled “Recommended Path: runme.py”From the project root:
python runme.pyCommon variants:
# Explicit inputspython runme.py --config data-config/demo_config.yml --data data-config/demo_data.csv --holidays data-config/holidays.csv
# Fast iterationpython runme.py --fast
# Disable scenariospython runme.py --no-scenarios
# Multi-period planningpython runme.py --multiperiod --multiperiod-weeks 13runme.py auto-detects files in this order:
data-config/examples/default/- fallback demo files
Python API Path (Advanced)
Section titled “Python API Path (Advanced)”Preferred import:
from driver import MMMBaseDriverV2Compatibility import (package-root contexts):
from src.driver import MMMBaseDriverV2Example:
from driver import MMMBaseDriverV2
driver = MMMBaseDriverV2( config_filename="data-config/demo_config.yml", input_filename="data-config/demo_data.csv", holidays_filename="data-config/holidays.csv", results_filename="results",)
driver.main()Expected Output Structure
Section titled “Expected Output Structure”Each run writes stage folders under your results root:
results/├── 00_run_metadata/├── 10_pre_diagnostics/├── 20_model_fit/├── 30_model_assessment/├── 40_decomposition/├── 50_diagnostics/├── 60_response_curves/├── 70_optimisation/└── 80_interpretation/Key files to check first:
20_model_fit/model.nc20_model_fit/model.dill(if serialisation succeeds)50_diagnostics/convergence_report.json50_diagnostics/calibration_report.json70_optimisation/optimization_results.csv(when optimisation is run)
Validation Checks Before Decision Use
Section titled “Validation Checks Before Decision Use”- Confirm
50_diagnostics/convergence_report.jsonhasconverged: true. - Confirm
50_diagnostics/calibration_report.jsonhaswell_calibrated: true(or document caveats). - Check
50_diagnostics/pareto_k_summary.jsonand itsokfield. - Only then consume outputs in
40_decomposition/,60_response_curves/,70_optimisation/, and80_interpretation/.
Note: statistical diagnostics indicate computational adequacy and predictive quality; they do not by themselves establish causal validity.