report Command Reference
The report command trains a model on a dataset and runs the model's optional report entry point to produce a PDF document describing the trained model (diagnostics, fitted-effect plots, posterior summaries, or whatever the model author chooses to emit).
Synopsis
Description
chap report:
- Loads the model template from a local MLProject directory or a GitHub URL.
- Loads historic data from a CSV file (auto-discovering the matching
.geojsonif present). - Trains the model on the dataset by invoking the MLProject's
trainentry point. - Invokes the MLProject's
reportentry point with the freshly trained model and the same historic data. - Writes the resulting PDF to
out_file.
The model must declare a report entry point in its MLproject file. See Additional Configuration → Report Entry Point. Models that do not define report will fail with an explicit error.
Required Parameters
| Parameter | Description |
|---|---|
model_path |
Path to an MLProject directory or a GitHub URL pointing to one |
dataset_csv |
Path to a CSV file with historic data in the standard Chap format |
out_file |
Output path for the generated PDF report |
A GeoJSON file with the same base name as dataset_csv is auto-discovered if present.
Run Configuration
The same --run-config.* flags as on chap eval are available — most relevant here:
| Parameter | Description | Default |
|---|---|---|
--run-config.ignore-environment |
Skip automatic environment setup | false |
--run-config.debug |
Enable verbose debug logging | false |
--run-config.log-file |
Path to write log output | None |
--run-config.run-directory-type |
Directory handling: latest, timestamp, or use_existing |
timestamp |
Additional Options
| Parameter | Description | Default |
|---|---|---|
--model-configuration-yaml |
Path to a YAML file with model-specific parameter values | None |
If the model declares user_options and the report entry point lists model_config as a parameter, the YAML file is forwarded to the report script the same way it is for train and predict.
Example
With debug logging:
chap report \
https://github.com/dhis2-chap/my_model \
./data.csv \
./report.pdf \
--run-config.debug \
--run-config.log-file ./report.log
See Also
- Additional Configuration → Report Entry Point — defining the entry point in
MLproject - eval Reference — sibling command for rolling-origin backtest evaluation