Getting Machine Learning Models into Production: An MLOps Primer
Key takeaway
The hard part of machine learning isn't training the model — it's the pipeline around it. Reproducible data preparation, a versioned model registry, an automated deployment path, and drift monitoring are what separate a notebook from a production system.
A model that scores well in a notebook and a model that serves reliable predictions to customers are separated by months of unglamorous engineering. That gap is what MLOps exists to close.
Why models stall before production
- The training pipeline can't be re-run — it lived in one person's notebook against a local CSV.
- Training and serving compute features differently, so live accuracy doesn't match the evaluation.
- No owner for the model once it's deployed, and no alert when it degrades.
- No rollback path, so nobody wants to be responsible for shipping it.
The minimum viable MLOps stack
- Versioned data and features — you must be able to reproduce the exact training set for any deployed model.
- A scripted, re-runnable training pipeline; if a human step is required, it isn't reproducible.
- A model registry that records version, training data, metrics, and approval state.
- An automated deploy path with shadow or canary serving, and a one-command rollback.
- Monitoring for both prediction quality and input drift.
Training/serving skew is the classic bug
The most common production failure is a feature computed one way in training and another way at inference — a different null fill, a timezone, a currency conversion. Share the feature code between both paths, or use a feature store, and test with the same records through both routes.
Models degrade quietly
Unlike a broken API, a decaying model returns confident nonsense with a 200 status code. Monitor input distributions for drift, track outcome metrics where ground truth arrives later, and set a retraining trigger — either scheduled or drift-based — before launch, not after the first complaint.
Start small, ship the loop
Get the simplest possible model all the way to production with the full pipeline in place. A logistic regression that ships, monitors, and retrains beats a state-of-the-art model that never leaves the notebook — and the second model is easy once the road is paved.