6.9.2.2 ModelRun
6.9.2.2.1 Purpose¶
One reproducible use of the data by a model: training, scoring, pricing or an analysis. It records the write number it read, the feature code and the rule set, so the same dataset can be built again.
6.9.2.2.2 Questions it answers¶
- Which data did a model read, and can we rebuild its dataset exactly?
- Which training run did a scoring or pricing run use?
- Which clock decided what the model could see at each date?
6.9.2.2.3 Fields¶
| Field | Type | Cardinality | Description |
|---|---|---|---|
id |
string (uuid) |
1..1 |
Key. |
kind |
enum | 1..1 |
Values: training, scoring, pricing, analysis. |
data_seq |
WriteCommit | 1..1 |
The write number the run read. Re-reading at this number gives the same data. |
feature_code_version |
string |
1..1 |
Version (commit or hash) of the feature code, including the time grid of the dataset (e.g. daily, at each calving). |
rule_set |
ReconciliationRuleSet | 1..1 |
Reconciliation rules and reliability ranking in force for the resolved facts it read. |
model |
string |
1..1 |
Model name and version. |
scope |
string |
1..1 |
Farms, animals and period covered. |
dataset_path |
string |
0..1 |
The dataset file in the bucket, kept for models used in production (scoring, pricing). Immutable. |
dataset_hash |
string |
0..1 |
|
previous_run |
ModelRun | 0..1 |
e.g. the training run a scoring or pricing run used. |
dataset_version |
MlDatasetVersion | 0..1 |
The catalogued version the run read, when it read one; its manifest hash is then the run's dataset_hash (ModelRun.dataset_hash).ModelRun.dataset_path and ModelRun.dataset_hash alone remain for runs that build their data outside the catalog (e.g. scoring in production). |
created_by |
MoonitoringUser | 0..1 |
|
knowledge_clock |
enum | 1..1 |
Values: platform, source.platform: a record is visible at D if its revision was available to us by data_seq (live data).source: a record is visible at D if the source had recorded it by D (recorded_at), read at data_seq (imported history, where our arrival time is the import date). The feature code decides what to assume when recorded_at is empty. |
created_at |
datetime |
1..1 |
6.9.2.2.4 Relationships¶
References
ModelRun.data_seq→ WriteCommit (1..1)ModelRun.rule_set→ ReconciliationRuleSet (1..1)ModelRun.previous_run→ ModelRun (0..1)ModelRun.dataset_version→ MlDatasetVersion (0..1)ModelRun.created_by→ MoonitoringUser (0..1)
Referenced by
ModelVersion.training_run(1..1)ScoringBatch.model_run(0..1)ModelRun.previous_run(0..1)
6.9.2.2.5 Rules & constraints¶
- One use of the data by a model: training, scoring, pricing or an analysis that must be reproducible.
- Rebuilds use the same selection,
data_seq,knowledge_clock,feature_code_version,rule_setand anonymization configuration. Reuse follows MlDatasetVersion; identical hashes from independent rebuilds require deterministic transformations and serialization. - Training labels exclude resolved facts whose status at
data_seqislinked_with_doubt,conflict_resolvedor unresolved. ML feature selection is a versioned as-of policy of the feature code, not of the canonical data. - Admission by trust: which data a run may use is part of the versioned feature code, not a table.
- The dataset manifest (
dataset_path) lists the admitted origin subtypes (SourceOrigin), assurance values (SourceOrigin.assurance) andupstream_editablevalues (SourceFeed.upstream_editable). Default for credit or insurance runs, to confirm per customer: a value is admitted only if its origin assurance isofficial_registry,accredited_lab,approved_deviceorlegal_prescription, or its origin is a sensor on a feed withupstream_editable= no; never an unknown origin or a disputed fact.
Future work
A stored DataUsePolicy entity if policies must be managed outside the code (e.g. chosen per customer).