85% of ML projects never make it into production. The main reasons: lack of reproducibility (the model in a notebook isn't the same as the model in an API), data drift (the data changes and the model degrades), and no monitoring. MLOps solves these problems by applying DevOps practices to machine learning.
What is MLOps?
MLOps (Machine Learning Operations) is a set of practices for reliable, scalable and reproducible deployment of ML models in production. Three pillars: versioning (code + data + models), CI/CD (automated testing and deployment), and monitoring (drift, accuracy decay, latency).
Maturity levels: level 0 — manual process (notebook → file), level 1 — automated training pipeline, level 2 — full CI/CD with automatic retraining.
A stack for a team of 2–5 people
**Experiment tracking:** MLflow (free, self-hosted) or W&B (cloud-based, more convenient). Log every parameter, metric and artifact — every run should be reproducible.
**Data versioning:** DVC (Data Version Control) on top of Git. Large datasets in S3/GCS, configs in git. `dvc repro` reproduces any experiment.
**Model packaging:** a Docker container with FastAPI. A standard interface: POST /predict → JSON response.
**CI/CD:** GitHub Actions → accuracy/latency tests → build Docker image → push to registry → deploy to Kubernetes/Cloud Run.
**Monitoring:** Evidently AI (open source) for data drift, plus Prometheus and Grafana for system metrics.
Data drift: the biggest trap in production ML
Data drift is a change in the statistical distribution of input data compared to the training data. Causes: seasonality, changing user behaviour, external events (COVID, GDPR). Effect: a model that had an AUC of 0.87 in the lab drops to 0.71 in production three months later.
How to detect it: Population Stability Index (PSI > 0.2 is a warning sign), the Kolmogorov-Smirnov test for numerical features, chi-square for categorical ones. Evidently reports automate this analysis on a weekly basis.
Strategies: scheduled retraining (monthly, regardless of drift), trigger-based retraining (PSI crosses a threshold → automatic pipeline run), shadow mode (the new model runs in parallel while you compare predictions).
Architecture of a production ML system
A full stack for a mid-size project:
```
Data → Feature Store (Feast) → Training Pipeline (Airflow) → MLflow Model Registry
↓
Client Request → FastAPI Gateway → Model Serving (BentoML/TorchServe) → Response
↓
Prometheus + Grafana (monitoring)
```
A simplified version is enough to get started: S3 + MLflow + FastAPI + Docker + GitHub Actions. This covers 80% of needs and takes 2–3 weeks to set up.
Conclusion
MLOps isn't a luxury — it's a necessity for any company that takes ML seriously. Without it, a model degrades unnoticed and the team spends 80% of its time just trying to reproduce results. Codeworth builds MLOps infrastructure from scratch and integrates it into existing processes. The first step is an audit of your current state: what you have, what's missing, and where the biggest risks are.
Related Codeworth Services
Need Help with Implementation?
The Codeworth team is ready to implement these ideas in your project. Free consultation.
Discuss the ProjectCo-founder of Codeworth with 7 years of UK fintech ML experience. Specialises in credit scoring with FCA compliance, ensemble methods including XGBoost and LightGBM, and ML experiment management via Python and MLflow. Has built production systems for credit decisioning processing millions of applications annually under FCA oversight. Holds deep knowledge of FCA model explainability requirements and Consumer Duty documentation standards.