ML Lifecycle
Intermediate 16 min read ML Lifecycle

Lifecycle Stages in Production

Gates, not guesswork

Every model passes through staged gates: development, registration, staging, production and retirement. Stage discipline is what turns a model from an artifact into a governed, auditable production component.

model stagesstagingproductionpromotiongovernancemodel lifecycle states
Before we start

What you will learn

  • Map a model through development, staging, production and retirement
  • Define what evidence is required to promote a model between stages
  • Design retirement so old models are removed safely
Introduction

What is this?

Model lifecycle stages are named states a model passes through — development, registered, staging, production, archived/retired — each with an entry gate that requires evidence. Staging is where offline value meets live shadow traffic; production is where it earns (or loses) trust; retirement removes it cleanly after its successor proves out.

Motivation

Why do you need it?

  • Stages force evidence: a model can't wander into production without an audit trail.
  • Staging catches the gap between offline metrics and real-world behavior before full blast radius.
  • Defined retirement prevents zombie models from silently serving stale predictions.
  • Governance and audits (SOC2, internal AI risk) need an answer to 'what is serving, and why?'
Think about it

Mental model

Imagine

A ship's commissioning process

Think of

Model lifecycle stages

Keel laid (development), trials in harbor (staging under shadow traffic), full sea trials (canary), commissioned for service (production), decommissioned safely (retirement). Nobody sails without trial data, and nobody abandons a decommissioned ship in the harbor.

Mechanics

How it works

  • Development: experiments tracked, candidates compared, one model wins on held-out evidence.
  • Registration: the winner is stored in the model registry with metrics, data version and code ref.
  • Staging: the model serves shadow or canary traffic while side-by-side behavior is compared to the incumbent.
  • Production: after staging evidence passes thresholds, traffic scales to full.
  • Monitoring follows the model: drift, performance and business metrics are attributed to this version.
  • Retirement: when the successor proves out, the old version is drained, archived and blocked from serving.

A production model's staged journey with evidence gates.

Development
Registered
Staging
Production
Archive & retire
Real world

In production

  • A payments model stays in staging for two weeks while offline recall (0.91) is checked against live agreement with the incumbent (0.88) before promotion.
  • An ad-platform stages every candidate on 5% of traffic; only candidates with no revenue regression are promoted.
  • After a successor ships, a lending model is drained over a week, archived with its full lineage, then unregistered from serving.
Guidelines

Best practices

  • Write the promotion gate as a checklist: offline metrics, data version, code hash, shadow agreement, owner sign-off.
  • Freeze promotions when monitoring is not yet reporting live metrics for the current version.
  • Auto-archive on successor promotion; require an explicit exception to re-serve an archived model.
  • Keep one current and one (former) champion per decision so rollback is a registry pointer change.
Watch out

Common mistakes

  • Skipping staging and going straight from notebook to production because 'it works locally'.
  • Two models serving production simultaneously without an owner remembering why.
  • Retiring a model by deleting it — losing the audit trail instead of draining and archiving it.
  • Promoting when monitoring isn't wired, so the new version is governance-blind.
Root cause analysis

Common issues

Error
Two models claim to be 'production'
Root cause

No single source of truth for stage state; registry and serving disagree

Fix

Make the registry the authoritative stage source and reconcile the serving meta-feature against it periodically.

Error
Can't roll back — the old model is gone
Root cause

Retirement deleted instead of archived

Fix

Follow drain/archive first: keep artifacts, metadata and serving blocks; delete only by explicit policy.

When things break

Debugging tips

  • When a promotion seems stuck, check the gate evidence: a missing metric or stale data version blocks everything.
  • Diff staging agreement versus offline metrics to find where assumptions diverge.
  • List what is serving right now; production surprise is usually a model that was never officially promoted.
Interviews

Interview checkpoint

Practice

Hands-on lab

Stage a Model with a Local Registry
30 min · intermediate
In progress
Objectives
  • Register a trained model and push it through lifecycle stages
  • Prove that stage changes are recorded with timestamps and metadata
  • Design a promotion gate checklist as a plain-text artifact

Stage a Model with a Local Registry

30 min · intermediate

0/5 steps
0%
sandbox · Linux sandbox
$
Try these commands
Test yourself

Quick quiz

0/2
1

What is the correct order of a model's lifecycle stages?

2

A staged model agrees with the incumbent on 99% of traffic. What is it safe to conclude?

Go deeper

Official documentation