← All articles
MLOps8 min read

MLOps: Promoting Models Without Production Chaos

Registries, evaluation gates, shadow traffic, and rollback—treating model versions like releases your SRE team can support.

A model that scored well in a notebook can still fail in production: features computed differently online than in training, a latency budget it cannot meet, a data drift nobody noticed, or a rollback path that does not exist. MLOps model promotion is the set of steps that turns a trained artefact into a production model with the same confidence you expect from a software release.

Model promotion pipeline

  1. TrainReproducible run with tracked data, code, and parameters
  2. RegisterVersioned model with metrics and lineage
  3. Offline gatesAccuracy, fairness, latency, size vs. champion
  4. Shadow / canaryReal traffic, limited impact
  5. Promote or roll backMove an alias; serving follows
Promotion is driven by registry versions and gates, never by manually copying files to a server.

1. Make training reproducible

Every model version must be traceable to the code commit, the dataset version or snapshot, the feature definitions, and the hyperparameters that produced it. Experiment tracking tools such as MLflow, Weights & Biases, or SageMaker Experiments record this automatically if training runs through a pipeline rather than an engineer's laptop. Without lineage, you cannot explain a model's behaviour or rebuild it after an incident.

2. Register models as versions, not files

A model registry stores each trained model as an immutable version with its metrics, lineage, and approval status. Serving infrastructure should reference a named alias—such as champion and challenger—rather than a file path. Promotion then becomes moving an alias to a new version, which is auditable and instantly reversible.

promote.py (MLflow registry aliases)python
from mlflow import MlflowClient

client = MlflowClient()
MODEL = "churn-classifier"

def promote(candidate_version: str) -> None:
    champion = client.get_model_version_by_alias(MODEL, "champion")
    # Keep the current champion reachable for instant rollback
    client.set_registered_model_alias(MODEL, "previous", champion.version)
    client.set_registered_model_alias(MODEL, "champion", candidate_version)

def rollback() -> None:
    previous = client.get_model_version_by_alias(MODEL, "previous")
    client.set_registered_model_alias(MODEL, "champion", previous.version)

3. Offline gates before any traffic

Compare the candidate against the current champion on the same held-out data, not just against an absolute threshold. A model that scores 0.91 is not an improvement if the champion scores 0.93. Typical gates include:

  • Primary metric at least as good as the champion, within a tolerance agreed with the business.
  • No significant regression on important segments—regions, customer types, or protected groups.
  • Prediction latency and memory within the serving budget, measured on production-like hardware.
  • Input schema and feature expectations validated against the online feature pipeline.
  • Model card updated with intended use, limitations, and training data summary.

How does your cloud measure up?

Score your setup across foundation, delivery, reliability, security, and cost in 3 minutes—instant results, no email needed.

Take the free scorecard

4. Shadow and canary in production

Shadow deployment sends a copy of real requests to the candidate without using its predictions, so you can compare outputs and latency safely. A canary then serves a small share of real traffic and is watched on business and technical metrics. On Kubernetes, KServe supports canary rollouts natively.

inferenceservice.yaml (KServe canary)yaml
apiVersion: serving.kserve.io/v1beta1
kind: InferenceService
metadata:
  name: churn-classifier
  namespace: ml-serving
spec:
  predictor:
    canaryTrafficPercent: 10 # new version gets 10% of traffic
    minReplicas: 2
    model:
      modelFormat:
        name: sklearn
      storageUri: s3://ml-models/churn-classifier/versions/42

If the canary holds, raise the percentage and finally remove it so the new revision takes all traffic. If not, KServe keeps the previous revision serving and you roll back by resetting the canary.

5. Monitor after promotion

Models degrade as the world changes. Monitor input feature distributions for drift, prediction distributions for shifts, and—when ground truth arrives—actual accuracy. Alert when drift exceeds agreed thresholds and feed alerts into a retraining or review process rather than letting them become background noise.

6. Keep training–serving skew out

The most common cause of a model that works offline and fails online is features computed differently in each place. Use the same feature definitions and code for training and serving—via a shared library or a feature store—and add a test that compares online feature values with offline ones for a sample of entities.

Validate data before you validate the model

Many bad models are really bad data: a join that silently dropped a region, a column whose units changed, or a label leak where a feature contains the answer. Add data validation to the training pipeline that checks schema, null rates, value ranges, and distribution changes against the previous training run, and fail the pipeline before training when expectations are broken.

validate_training_data.pypython
import pandas as pd

EXPECTED_COLUMNS = {"customer_id", "tenure_months", "monthly_spend", "support_tickets_90d", "churned"}

def validate(df: pd.DataFrame, previous_row_count: int) -> None:
    missing = EXPECTED_COLUMNS - set(df.columns)
    assert not missing, f"missing columns: {missing}"
    assert df["customer_id"].is_unique, "duplicate customer ids"
    assert df["monthly_spend"].between(0, 100_000).all(), "spend out of range"
    assert df["churned"].isin([0, 1]).all(), "label must be 0/1"
    null_rate = df["tenure_months"].isna().mean()
    assert null_rate < 0.01, f"tenure null rate too high: {null_rate:.2%}"
    change = abs(len(df) - previous_row_count) / previous_row_count
    assert change < 0.2, f"row count changed by {change:.0%}; check upstream joins"

Who approves a promotion

Automated gates decide whether a model is eligible; people decide whether it should ship when the stakes are high. For models that affect pricing, credit, health, or other sensitive decisions, require a named approver from the business and a review of segment-level results before the champion alias moves. Record the approval in the registry alongside the version so audits can see who approved what and on which evidence. For low-risk models, automated promotion after a successful canary is usually enough.

Batch models need promotion discipline too

Not every model is served behind an API. Batch scoring jobs that write predictions to a warehouse table are just as capable of causing damage—an entire day's recommendations or risk scores can be wrong at once. Apply the same registry and alias pattern: the scoring job loads the model by alias, writes results to a versioned table or partition, and a validation step checks prediction distributions against the previous run before downstream systems read them. Rollback then means re-running with the previous alias or pointing consumers at the previous partition.

Practise rollback

A rollback path that has never been used tends to fail when it is needed. Schedule a rollback drill each quarter: move the champion alias back to the previous version in a staging environment, confirm serving picks it up, and time how long it takes. Make sure the previous version's dependencies—feature definitions, preprocessing code, container image—are still available, because a model is only reversible if everything it needs is too.

Finally, decouple model rollout from feature rollout. Ship the new model behind a feature flag or routing rule so product teams can enable it for specific customers or regions, and turn it off instantly without touching the serving infrastructure.

Checklist

  1. Training runs in a pipeline with tracked code, data, features, and parameters.
  2. Models are registry versions; serving references aliases, not files.
  3. Offline gates compare against the champion, including segment and latency checks.
  4. Shadow or canary deployment precedes full promotion.
  5. Rollback is a one-command alias change that the team has practised.
  6. Drift and performance monitoring trigger review or retraining.
  7. A shared feature implementation prevents training–serving skew.

Treat models as software artefacts with extra failure modes, and promotion stops being stressful. We build these MLOps paths on Kubernetes and managed ML services as part of our platform engineering work.

Key takeaways

  • Promotion needs evaluation gates, approval, and artifact lineage—not a shared notebook.
  • Shadow and canary traffic beat big-bang model swaps for critical paths.
  • Define rollback as a first-class runbook with owners and time bounds.

FAQ

What metadata must travel with a model?

Training data version, code commit, metrics, approval record, and the serving config that was validated—enough to reproduce or reverse the change.

How do we avoid notebook-driven production?

Export training to pipelines, store models in a registry, and allow only registry artifacts into serving environments.

Need help putting this into practice?

Our engineers do this every week. Get a fixed-scope plan for platform engineering services—free scoping call, written price before you commit.

Get a free scoping call