The training pipeline
What it is
In production, training is a pipeline that runs automatically, on a schedule or a trigger:
- snapshot the training data at a recorded version;
- validate it (module 8);
- train with a recorded configuration;
- evaluate on held-out data, overall and per slice;
- compare with the model currently in production (the champion);
- register the new model with its scores, data version and code version, if it passes.
Why it matters
A pipeline makes retraining routine and safe.
- Nobody needs to remember the steps or run a notebook.
- Every model in the registry can be traced to its data, code and settings.
- A bad candidate is stopped by the gate, not discovered by users.
In the real world: Kirana Kart's ETA pipeline runs every night: it trains on the latest twelve months, and the new model is registered only if it beats the champion on last week's data without hurting any city.
Visual example
PipelineA failing check at any step stops the run and alerts the owner.
Retraining by re-running a notebook by hand. It works until the person who knows the steps is on holiday, or until a cell is run out of order and nobody can reproduce the model.
Practise it: Design an ML Training Pipeline