Mission: feature pipeline + tracker
By now you know how missions work — small, real, then sturdier. The twist here is that the "smallest real version" is an entire loop, not a single piece.
The job: wire this chapter into one artifact — a feature pipeline with a contract on its output, feeding experiments that are logged, with the best run promoted into a registry entry. The miniature MLOps loop, in a file.
The stages:
- Features under contract — the starter: a transform plus a checker that gates it. Extend the contract with a null policy and make one bad raw row demonstrate the gate firing.
- Tracked sweep — the starter sweeps a cutoff and logs each run. Add a seed field and a repeated run so seed-noise is visible in the log (chapter 45.3's yardstick).
- Registry entry — take the best run and register it:
version, stage, metrics, plus data/feature/config provenance.
Write the
promote()that archives the incumbent. - Stress case — "improve" the feature definition (change the transform), bump the feature version, and show the registry makes the old model's dependence on the old version visible — the skew scenario from lesson 02, caught by bookkeeping.
- One improvement — persist runs to JSONL (chapter 10), a
compare(run_a, run_b)that prints the config diff, or a promotion gate that refuses when accuracy drops: pick one, note why.
End state: raw rows go in; out come a contracted feature set, an experiment log you can trust two weeks later, and a registry that can answer "what's live and why."