What is MLOps?
Turning model experiments into dependable products
MLOps is DevOps applied to machine learning: automation, versioning, monitoring and governance for the whole model lifecycle, plus the extra systems ML needs — data versioning, model registries, drift and retraining.
What you will learn
- Define MLOps and its differences from plain DevOps
- Map the extra practices ML adds: data/model versioning, drift, registry
- Diagnose what breaks when MLOps practices are missing
What is this?
MLOps is the set of practices, tooling and ownership that makes machine learning reliable, repeatable and fast in production. It borrows DevOps: version control, CI/CD, automated testing, monitoring and incident response. But ML adds things DevOps never faces: the model is code plus data plus an artifact, models decay as the world changes (drift), experiments must be tracked, and a model that passes tests today can silently fail tomorrow. MLOps is the discipline that closes that gap.
Why do you need it?
- Most ML value fails in operations, not model quality — a great model that nobody can ship, reproduce or monitor is worthless.
- Without versioning you cannot reproduce a result, which breaks audits, debugging and rollback.
- Production data differs from training data and drifts over time; only an operations loop catches it.
- MLOps turns one-off notebook successes into a repeatable business capability.
Mental model
Homemade vs a restaurant kitchen
A notebook model vs MLOps
You can cook a great meal at home (train a model in a notebook), but a restaurant needs recipes, portion control, health inspections, supplier management and a shift that survives staff changes. MLOps is the restaurant: every dish reproducible, every ingredient versioned, every plate quality-checked.
How it works
- Version everything that goes into a model: code, data, features, hyperparameters and the trained artifact.
- Automate the train-evaluate-register path so a good candidate becomes a versioned, deployable model without manual babysitting.
- Deploy with gates: test suites, shadow or canary rollout, then switch traffic.
- Monitor live behavior: prediction quality proxies, drift sensors, latency and data quality.
- Close the loop: alerts trigger retraining, retraining produces a new candidate, and the cycle repeats.
The MLOps loop: build, deploy, operate, learn.
In production
- A fintech's fraud model has a monitored AUC-by-hour plus a drift sensor; when either breaches, a ticket auto-opens for review and retraining.
- An e-commerce team ships a two-model recommender twice a week through an automated pipeline with shadow scoring before cutover.
- A clinical risk model logs every prediction and input cohort for audit while alerting on missing-feature spikes.
Best practices
- Treat a model as an artifact with lineage, not a file — registry plus metadata is non-negotiable.
- Automate the boring path first: training-to-registry should be one button with zero manual steps.
- Monitor a proxy for model quality, because true labels usually arrive late.
- Design for rollback: every promoted model version is instantly repointable.
- Make failures loud and visible: model decay should page someone, not hide in dashboards.
Common mistakes
- Automating deployment while leaving training as a manual notebook ritual — a half-operationalized system.
- Versioning code but not data and hyperparameters, so results can't be reproduced.
- Monitoring infrastructure (CPU, memory) but not the model's actual behavior.
- Skipping governance until an audit or incident forces it — retrofitting is painful.
Common issues
Same notebook produces different results on two machinesUnpinned dependencies, float nondeterminism, or random seed not set
Pin versions, set seeds, and record the environment hash with every run.
Model passed testing but fails under trafficTesting used curated data; production has unseen distributions
Add shadow/canary rollout and monitor live score distributions before full cutover.
Nobody can say which model is liveNo registry; deployments are ad-hoc file copies
Introduce a registry as the single source of truth for what is served where.
Debugging tips
- When a production metric drops, first check data drift, then code changes, then model artifact — in that order.
- Confirm the registry pointer matches what the serving fleet reports; 'wrong version' causes phantom regressions.
- Lineage is your debugger: exact data + code + params reproduce any incident in development.
- Log the inputs and outputs at the API boundary for every prediction; you cannot debug unseen decisions.
Interview checkpoint
Quick quiz
Which is unique to MLOps versus traditional DevOps?
A model that passes all tests at deployment cannot degrade later without any code change.