6.9.2.9 ScoringBatch
6.9.2.9.1 Purpose¶
One batch scoring: a deployed model version reads the farm data of a scope at a write number, records a run and appends its predictions to farm as computed records, one write per farm. The Console starts batches and follows them.
6.9.2.9.2 Questions it answers¶
- Which farms and period did a batch score, at which write number?
- Did it finish, and how many predictions did it write?
- Which run makes its outputs reproducible?
6.9.2.9.3 Fields¶
| Field | Type | Cardinality | Description |
|---|---|---|---|
id |
string (uuid) |
1..1 |
Key. |
model_version |
ModelVersion | 1..1 |
|
scope |
string |
1..1 |
Farms, animals and period covered; same meaning as 62.7. |
data_seq |
WriteCommit | 1..1 |
|
status |
enum | 1..1 |
Values: queued, running, done, failed. Default: queued. |
model_run |
ModelRun | 0..1 |
Set when the batch starts reading. |
predictions_written |
integer |
1..1 |
Default: 0. |
started_at |
datetime |
0..1 |
|
finished_at |
datetime |
0..1 |
|
last_error |
string |
0..1 |
|
created_by |
MoonitoringUser | 1..1 |
|
created_at |
datetime |
1..1 |
|
updated_at |
datetime |
1..1 |
6.9.2.9.4 Relationships¶
References
ScoringBatch.model_version→ ModelVersion (1..1)ScoringBatch.data_seq→ WriteCommit (1..1)ScoringBatch.model_run→ ModelRun (0..1)ScoringBatch.created_by→ MoonitoringUser (1..1)
6.9.2.9.5 Rules & constraints¶
- One batch scoring: reads farm data at a write number with
farm.canonical_data.read_all(farm.canonical_data.read_all), records a ModelRun and appends the predictions to farm as computed records, one WriteCommit per farm.