Skip to content
anythingai.space
Module 17

MLOps

The ML lifecycle in production: versioning, registries, CI/CD, infrastructure, automation, monitoring and drift.

lessons
7
steps
60
time
86 min
RAW ROWage: 34country: “DE ”income: nullorders: 12duplicate of #882TRAINING-READY FEATURESage_z: 0.21country_DE: 1income: medianorders_per_month: 1.0SPLIT (EXAMPLE PROPORTIONS)train 70%validation 15%test 15%Raw dataCleanTransformFeaturesSplit
01beginner·12 min·10 steps

MLOps and the ML Lifecycle

MLOps turns a one-off notebook model into a repeatable loop: collect, prepare, train, evaluate, deploy, monitor — and go round again.

  • What MLOps adds on top of DevOps for ML systems
  • The six lifecycle stages and why they form a loop
  • What happens inside collection, preprocessing and training
  • How evaluation gates deployment and how models are rolled out safely
Start →
hash → pointerbytesresolvesDATASET VERSIONS (POINTER → HASH)v1.3md5 3f9a…v1.4md5 a91c…v1.5md5 c07e…Unchanged files are stored once,whatever the number of versionsData v1.5train.parquet · 40 GBGit repotrain.parquet.dvcObject storagefiles keyed by hash
02beginner·11 min·8 steps

Versioning Data, Code and Models

An ML model is the product of a dataset and a commit — version all three and link them, and you can reproduce, compare and roll back anything.

  • Why ML needs three linked version histories, not just Git
  • How DVC versions large datasets with hashes and pointer files
  • How model versions enable comparison and rollback
  • What MLflow records for every training run
Start →
DEVELOPMENTSTAGINGPRODUCTIONpromotestage=prodchurn v2.1churn v2.0testingchurn v1.9Staging testsmirror of prod trafficServing
03intermediate·11 min·8 steps

The Model Registry

One governed home for every model: artifacts in storage, searchable metadata, lineage, stages and approval gates.

  • What a model registry is and who reads and writes it
  • How artifacts are stored and what metadata makes them findable
  • How lineage records where a model came from
  • How models move through development → staging → production
Start →
TRAINING PIPELINEpassTHREE RUNS, THREE TRIGGERS, SAME STEPSnightlypreptrainevalregisternew datapreptraineval ✗git pushpreptrainevalregisterPrepare dataTrainEvaluatevs baselineRegister
04intermediate·12 min·8 steps

CI/CD for Machine Learning

Automate the path from a commit or a new batch of data to a tested, safely-deployed model — with automatic rollback when it goes wrong.

  • What CI/CD for ML triggers on, beyond code commits
  • The stages of an automated training pipeline
  • The five kinds of ML tests and what each catches
  • How a deployment pipeline rolls out and validates a model
Start →
TFX PIPELINE — STANDARD COMPONENTSblessedTFX defines the components; Airflow or Kubeflow Pipelinesruns themExampleGeningestStatisticsGenstatisticsSchemaGeninfer schemaExampleValidatordata checksTransformfeaturesTrainertrainEvaluatormodel analysisPusherdeploy if blessed
05intermediate·13 min·8 steps

ML Infrastructure and Orchestration

Pipelines as DAGs, the orchestrators that run them — Airflow, Kubeflow, TFX — and the CPUs, GPUs and TPUs underneath.

  • The three layers of ML infrastructure
  • What an ML pipeline manages beyond a script
  • Choosing and managing CPUs, GPUs and TPUs
  • How Airflow, Kubeflow and TFX differ
Start →
WEEKLY ACCURACYweeks 1–893%weeks 9–1687%weeks 17–2481%Accuracy ↓below 85% thresholdData drift?PSI 0.31 → yesConcept drift?error analysisBug?feature nulls, unitsRetrainrecent labelled data
06intermediate·14 min·9 steps

Monitoring, Drift and Degradation

Models fail silently: inputs shift, the world changes, accuracy slides. Measure against a baseline, detect drift, and alert someone who can act.

  • Why a model can be broken while every system dashboard is green
  • What performance monitoring tracks for a model
  • How data drift is detected with statistical tests per feature
  • How concept drift differs from data drift
Start →
TOP GENERATED FEATURES BY IMPORTANCE (ILLUSTRATIVE)orders_last_30d / orders_last_365d0.24days_since_last_login0.19support_tickets_90d0.12signup_weekdaydroppedrefund_issued_flagleak? set after churnRaw columns12 columnsGenerate340 candidatesScore + selectimportanceKeep 18
07intermediate·13 min·9 steps

Automating the ML Loop

Retraining, feature engineering, hyperparameter tuning, model selection and whole workflows — run by triggers instead of people, with guardrails.

  • The three kinds of trigger that start automated work
  • How champion/challenger retraining deploys only improvements
  • Grid, random and Bayesian hyperparameter search
  • Chaining everything into an event-driven workflow with error handling
Start →
Next module · 18
AIOps