An ML training pipeline diagram shows every stage a model passes through on its way to production and back again. This sample is a customer-churn model retrained continuously: data is validated, turned into features, trained, checked against the current champion, registered, deployed and monitored. Drift in production closes the loop by triggering a new run. It is a pipeline (flow) diagram rather than UML; the variant redraws it as a UML activity diagram.
1. The Diagram
The top row prepares and trains; the bottom row runs right to left from the gate back to monitoring, so the retraining loop is a short vertical arrow.
Raw data: a dated snapshot of the warehouse tables, so every run is reproducible.
Validate data: schema, null-rate and range checks (for example with Great Expectations); a bad batch stops here instead of producing a bad model.
Features: joins and encodings, written to the feature store so training and serving compute features the same way.
Train: gradient-boosted trees with 5-fold cross-validation; parameters and metrics go to the experiment tracker.
Evaluate is a gate: the challenger must beat the current champion's AUC on the same hold-out set. On failure, the red loop sends it back for tuning.
Register stores the model with its lineage: data snapshot, code commit and metrics.
Deploy serves it to 5% of traffic first, then 100% if error rates hold.
Monitor tracks input drift (PSI), latency and, once labels arrive, real AUC. A drift alert or the weekly schedule triggers the next run.
2. How to Read It
Blue boxes are automated stages, the yellow box is a quality gate, and green marks the stage that watches the live model. Cylinders are the shared MLOps stores that make runs reproducible.
3. Variant: UML Activity Diagram
The UML activity version adds swimlanes for ownership and uses formal control nodes: a filled initial node, rounded actions, a decision diamond with guards in square brackets, and a bullseye final node. It is better for agreeing who does what; the pipeline diagram above is better for showing stores and the retraining loop.
4. Pros, Cons, and When to Use
Pros
Makes the gate and rollback points explicit.
Shows the feedback loop that keeps a model fresh.
Matches orchestrator DAGs (Airflow, Kubeflow, SageMaker Pipelines) almost one to one.
Highlights where lineage and metadata are recorded.
Readable by data, ML and platform teams alike.
Cons
Says nothing about compute, scheduling or cost.
Loops are informal; a pipeline tool's DAG cannot contain cycles.