5.3.11 · D3MLOps & Deployment

Worked examples — CI - CD pipelines for ML

2,257 words10 min readBack to topic

The scenario matrix

Every decision this topic throws at you falls into one of these cells. Each row is a distinct kind of situation, with a distinct "sign" or "degenerate" twist.

Cell The question being asked The twist / edge case
A. Clear promote new prod ? gain comfortably above noise
B. Clear reject new prod ? new model worse than prod (negative gain)
C. Borderline new prod ? gain sits right at the noise floor
D. Small test set how does change the verdict? limiting case: tiny makes huge
E. Degenerate metric or ; near-perfect model
F. CI validation stop is the data even valid? zero / out-of-range input → pipeline halts before training
G. CT drift trigger should we retrain at all? PSI above/below threshold
H. Word problem money cost of a wrong deploy translate a business story into the gate
I. Exam twist different metrics / different comparing two models on unequal test sets — the trap

The worked examples below each carry a [Cell X] tag so you can see the whole matrix get covered.


See

Figure — CI - CD pipelines for ML
— the "number line" mental model: prod sits at a point, we draw a noise band of width around it, and a new model only wins if it lands to the right of the band.


Worked examples


Recall Which cell was which?

A clear promote (big n) ::: Example 1 Clear reject / negative gain ::: Example 2 Borderline exactly at 2 SE ::: Example 3 Limiting: tiny test set flips the verdict ::: Example 4 Degenerate metric p → 1 ::: Example 5 CI data-validation stop with a valid zero ::: Example 6 CT trigger above vs below PSI threshold ::: Example 7 Word problem: dollars per day ::: Example 8 Exam trap: unequal test sets ::: Example 9


Connections

  • CI - CD pipelines for ML — the parent; this page drills its promotion gate.
  • Model Registry — store every candidate here before the shared re-eval (Ex. 9).
  • Data Versioning (DVC) — pin the data that should have arrived (Ex. 6).
  • Data & Concept Drift — the world-moves cause behind CT triggers (Ex. 7).
  • Model Monitoring — closes the loop: monitor → trigger → gate.
  • A-B Testing & Canary Deployment — safety net for "barely promote" cases (Ex. 3, 8).
  • Statistical Significance — the exact-test upgrade for degenerate (Ex. 5).
  • Docker & Containerization — the environment leg that prevents training/serving skew.