What is MLOps and how does it differ from traditional DevOps?
Quick Answer
MLOps applies DevOps discipline (CI/CD, versioning, monitoring) to machine learning systems, but adds concerns unique to ML: data and model versioning, training reproducibility, model performance monitoring in production, and drift — because the "code" that matters includes the data and the trained model artifact, not just source code.
Detailed Answer
Traditional DevOps assumes that the same code plus the same config produces the same behavior forever, and that testing catches most regressions before release. ML systems break that assumption in two ways: the model's behavior depends on training data that changes over time, and a model can silently degrade in production even with unchanged code, because the real-world data it sees starts to differ from what it was trained on.
MLOps extends the standard pipeline with: dataset versioning (so you can reproduce exactly what a model was trained on), experiment tracking (hyperparameters, metrics, artifacts per training run), a model registry with staged promotion (dev → staging → production), automated evaluation gates before deployment, and continuous monitoring for both system health (latency, errors) and model health (prediction drift, data drift, accuracy decay). The deployment unit is a model artifact plus its serving code, not just code.
Code Example
# Minimal MLOps pipeline stages # 1. data validation -> schema checks, drift checks vs. reference distribution # 2. train -> log params/metrics/artifacts to experiment tracker # 3. evaluate -> compare against baseline model on held-out + slice metrics # 4. register -> push to model registry with version + lineage metadata # 5. deploy (canary) -> shadow or partial traffic before full rollout # 6. monitor -> prediction drift, latency, business metric impact
Interview Tip
Lead with "the model is a versioned artifact, and data is part of the contract" — that framing signals you understand what makes MLOps different from CI/CD for regular services.