The ML pipeline, end to end
coreintermediateAn ML pipeline is the full sequence a model passes through, from raw data to a live system that someone actually uses and keeps watching: data, preprocessing, training, validation, evaluation, packaging, deployment, monitoring. Skipping or informalizing any one stage is where most real ML projects fail, not the modeling step itself.
Think of it as
Most of the effort in a real ML project is not training a model — it is everything around it, and this eight-stage pipeline is the map of where that effort goes. Data and preprocessing (§4, §5) get raw data into a clean, feature-ready, leakage-free shape. Training fits a model's parameters; validation guides decisions during that process (§1); evaluation (§7) scores the finished model honestly, against metrics that actually matter. Packaging is the step many tutorials skip entirely: turning a trained model object into something that can actually be deployed — serialized weights, a defined input/output contract, pinned dependencies. Deployment puts it somewhere it can be called, online or in batch (§1). Monitoring is the stage a shipped model needs forever, not once: watching for the input distribution drifting away from what the model was trained on, for the model's own predictions and their downstream outcomes, and for the pipeline's infrastructure health — because a model that was correct on ship day can quietly become wrong months later with no code change at all, purely because the world it is making predictions about changed.
What we're doing: Trace a real failure back to the pipeline stage it actually belongs to, instead of the stage where it was noticed.
- 6
- Ruling out stages methodically — rather than guessing — is what the eight-stage model is for: it turns "something is wrong" into "which specific stage owns this."
- 11
- The symptom appeared as a metrics problem, but its root cause lives in the data stage — monitoring exists specifically to catch this class of failure, which evaluation (a one-time check) cannot.
- 16
- The fix closes the loop back to an earlier stage (data/training) rather than patching the stage where the symptom was observed (monitoring) — monitoring's job is detection, not correction.
Why this works: Naming the eight stages explicitly turns "the model got worse, not sure why" into a systematic elimination — most real production incidents are a failure in one specific, nameable stage, and stage-by-stage tracing finds it far faster than re-examining the whole system at once.
Treating "the pipeline" as one undifferentiated script
Wrong
Better
What you see: When something goes wrong in production, nobody can say which stage is responsible without re-reading the entire pipeline script from the top, because there were never any named boundaries between data, training, evaluation, packaging and deployment to begin with.
Why: A pipeline with no stage boundaries has no place to insert a check, a version tag, or a monitor without touching the whole thing — naming and separating the eight stages is what makes each one independently testable, versionable, and debuggable.
- Data — The raw material the model will learn from
- Preprocessing — Clean, consistent, leakage-free
- Training — Fit the model's parameters
- Validation — Guide model/hyperparameter choices during development
- Evaluation — Score the finished model, honestly
- Packaging — Serialized, contracted, pinned — the most commonly skipped stage
- Deployment — Put it somewhere it can actually be called
- Monitoring — Watch it forever, not once — this stage never ends
Eight pipeline stages, and what each one is actually for
Remember: Data → preprocessing → training → validation → evaluation → packaging → deployment → monitoring. Packaging is the most commonly skipped stage; monitoring is the stage that never ends. Most real project effort and most real failures live in the stages around training, not training itself.
See also: online vs batch inference · training serving feature consistency · offline vs online evaluation

