MLOps in depth
A reference pipeline, stage by stage
The page above lists the building blocks. Here is how they connect in a working setup, from a code change to a model in production:
- A data scientist pushes training code. CI runs unit tests and data validation checks, for example with Great Expectations or simple schema tests, on a sample of the training data.
- A training pipeline, orchestrated by a tool such as Kubeflow Pipelines, Airflow or a cloud ML service, pulls a versioned dataset (tracked with DVC, lakeFS or table snapshots) and trains the model.
- Parameters, metrics and artifacts are logged to an experiment tracker such as MLflow.
- The candidate is evaluated against the current production model on the same held-out data, including slices such as region or customer segment.
- If it wins, it is registered with a new version and lineage back to code and data, then a reviewer approves promotion.
- Deployment rolls it out as a canary or in shadow mode, where it predicts alongside the old model without affecting decisions.
- Monitoring compares live inputs and outcomes with training data and alerts on drift.
Example: retraining a demand model
Example: a retailer forecasts weekly demand per store and item. A scheduled pipeline retrains every week on the latest sales, but promotion is not automatic. The new model must beat the current one on the last four weeks of held-out data, overall and for the top-selling categories, and must not get worse for any region beyond a set tolerance. During festival periods, when patterns shift sharply, the team reviews results by hand before approving. Each forecast written to the planning system carries the model version, so planners can trace an odd number back to the exact model and data.
Monitoring that catches real problems
Model monitoring has two layers. The first is ordinary service health: latency, errors, throughput and resource use, handled by standard observability tools. The second is model health:
- Data drift: input distributions moving away from training data, measured with statistics such as population stability index or KL divergence.
- Prediction drift: the share of each predicted class or the forecast level changing unexpectedly.
- Performance: accuracy once true outcomes arrive, which can take days or months.
- Training-serving skew: features computed differently online than in training.
Open-source libraries such as Evidently compute many of these checks.
Common mistakes
- Notebooks as the only record of how a model was trained.
- Fully automatic retraining and promotion with no quality gate.
- Features re-implemented by hand in the serving code, causing skew.
- GPU clusters sized for peak training and left idle; Dynamic Resource Allocation and autoscaling on Kubernetes help here.
MLOps borrows its delivery habits from CI/CD and DevOps. For applications built on hosted language models, the emphasis shifts to prompts and evaluation under LLMOps. Gepton builds pipelines, registries and serving platforms in MLOps and AI infrastructure.