Promotion by code, not by click
The registry as a control plane
Manually clicking 'Promote to Production' doesn't scale and leaves no audit trail. Drive promotion from code so every transition is reviewed, logged, and reversible:
from mlflow import MlflowClient
client = MlflowClient()
# Promote only after the gate passed in CI
client.set_registered_model_alias(
name='credit-scoring', alias='champion', version='8',
)
client.set_model_version_tag(
name='credit-scoring', version='8',
key='promoted_by', value='ci-pipeline-run-4821',
)
Wire it together: CI trains → mlflow.evaluate gate passes → pipeline moves the @champion alias → serving picks up the new version on its next poll. A failed gate simply leaves the alias untouched. Rollback is one alias re-point, fully audited via tags.