MLOps Fundamentals

Automate the entire ML lifecycle — from experiment tracking to automated retraining pipelines and model versioning.

Learn MLOps Fundamentals in our free AI & Machine Learning course — a beginner-friendly interactive lesson with worked examples, a practice exercise and a…

Part of the free AI & Machine Learning course at LearnCodingFast — hands-on lessons with examples you run in your browser, plus practice exercises and a quick quiz.

What You'll Learn in This Lesson

MLOps bridges the gap between "it works on my laptop" and "it serves 10M users":

📋 Quick Reference — MLOps

You've mastered MLOps fundamentals! Next, learn how to build recommendation systems that power Netflix, Spotify, and Amazon.

Practice quiz

What problem does MLOps primarily solve?

  • Making models more accurate than humans
  • Replacing data scientists
  • Bridging the gap between 'works on my laptop' and reliable production at scale
  • Eliminating the need for data

Answer: Bridging the gap between 'works on my laptop' and reliable production at scale. MLOps automates and operationalises the ML lifecycle so models are reproducible, tested, and reliably deployed.

What is the purpose of experiment tracking (e.g. MLflow)?

  • To log parameters, metrics, and artifacts so you know which config produced which result
  • To speed up model inference
  • To compress the model
  • To version the source code only

Answer: To log parameters, metrics, and artifacts so you know which config produced which result. Experiment tracking records hyperparameters and metrics across runs so results are reproducible and comparable.

What does DVC (Data Version Control) do?

  • Trains models automatically
  • Serves models over HTTP
  • Monitors live predictions
  • Tracks data file versions alongside Git tracking code

Answer: Tracks data file versions alongside Git tracking code. DVC versions large data files (hashing and storing them) so datasets can be reproduced like code in Git.

What does CI/CD bring to an ML pipeline?

  • It removes the need for testing
  • It automates the data to train to evaluate to deploy flow with validation gates
  • It only applies to web apps, not ML
  • It increases model size

Answer: It automates the data to train to evaluate to deploy flow with validation gates. CI/CD for ML automates the pipeline stages and halts on failures, making deployment repeatable and safe.

Why add a validation gate (e.g. accuracy threshold) in a pipeline?

  • To halt deployment when the model fails to meet a quality bar
  • To make training faster
  • To version the data
  • To reduce GPU cost

Answer: To halt deployment when the model fails to meet a quality bar. A validation gate stops a model that scores below threshold from being promoted to production.

What is a model registry used for?

  • Storing raw training data
  • Routing user traffic
  • Tracking model versions and their lifecycle stages (staging, production, archived)
  • Logging server errors

Answer: Tracking model versions and their lifecycle stages (staging, production, archived). A model registry versions models and manages their lifecycle from staging through production to archived.

What is the typical lifecycle progression for a registered model?

  • production then staging then archived
  • staging then production then archived
  • archived then production then staging
  • production then archived then staging

Answer: staging then production then archived. Models usually move from staging (testing) to production (live) and eventually to archived when retired.

What is A/B testing of models?

  • Training two models on the same data
  • Compressing a model into two parts
  • Versioning two datasets
  • Routing live traffic between versions to compare real-world performance

Answer: Routing live traffic between versions to compare real-world performance. A/B testing splits live traffic between a champion and challenger model to measure which performs better.

In the A/B test example, when is the improvement considered statistically significant?

  • When accuracy is above 90%
  • When the absolute z-score exceeds 1.96
  • When there are more than 1000 requests
  • Whenever the challenger wins once

Answer: When the absolute z-score exceeds 1.96. A z-score above 1.96 corresponds to roughly 95% confidence that the difference is not due to chance.

Why is training only in notebooks and deploying manually a problem?

  • Notebooks are too slow
  • Notebooks cannot run Python
  • It is not reproducible — if it is not in a pipeline, it cannot be reliably reproduced
  • It uses too much memory

Answer: It is not reproducible — if it is not in a pipeline, it cannot be reliably reproduced. Manual notebook workflows are not reproducible; pipelines make the process repeatable and auditable.