Validation spec schema reference
The validation_spec.json artefact is written to 10_validation/ for every
validation-aware pipeline run. It records the concrete validation provenance
for that specific run, including the holdout strategy, split geometry, and
date windows.
Fields
| Field | Type | Description |
|---|---|---|
mode |
"validation" | "final_fit" |
Whether this is a validation split or the final production fit. |
strategy |
"none" | "blocked_tail" | "rolling_origin" | "authored_holdout" |
Validation strategy that produced this run. |
split_label |
str |
Human-readable identifier for the split (e.g. "blocked_tail", "split_01", "final_fit"). |
holdout_source |
"generated_validation" | "authored_model_spec" | "none" |
How the holdout mask was produced. |
generated_holdout |
bool |
Whether the holdout mask was auto-generated by meridian-tools. |
run_name_suffix |
str |
Suffix appended to the run name for this split. |
holdout_shape |
list[int] | null |
Shape of the holdout mask array. null for final-fit runs. |
train_indices |
list[int] |
Integer indices into the time axis used for training. |
test_indices |
list[int] |
Integer indices into the time axis used for testing. Empty for final-fit runs. |
train_dates |
list[str] |
Date values corresponding to train_indices. |
test_dates |
list[str] |
Date values corresponding to test_indices. Empty for final-fit runs. |
Mode and strategy combinations
| Mode | Strategy | Holdout source | Description |
|---|---|---|---|
validation |
blocked_tail |
generated_validation |
Auto-generated contiguous tail holdout. |
validation |
rolling_origin |
generated_validation |
One split from an expanding-window plan. |
validation |
authored_holdout |
authored_model_spec |
User-provided holdout mask from YAML. |
final_fit |
none |
none |
Full-sample production fit after validation. |
Invariants
- Validation-mode specs always have a non-null
holdout_shape. - Final-fit specs always have
holdout_shape: null, emptytest_indices, and emptytest_dates. train_indicesandtrain_datesalways have matching lengths.test_indicesandtest_datesalways have matching lengths.- Authored-holdout specs have empty
train_indices,test_indices,train_dates, andtest_dates.
Example: blocked tail validation
Example: rolling origin split
Example: final fit
Note on holdout mask storage
The actual holdout mask array (boolean NumPy array) is not stored in
validation_spec.json because it can be large for geo-panel models
(n_geos × n_times). Only its holdout_shape is recorded. The mask is
injected into the Meridian model at runtime and can be reconstructed from
train_indices, test_indices, and the data geometry.