Sub topic 1
Identify Model Versions and the Known-Good Release
A production rollback starts with a precise answer to one question: which model release should receive traffic again? A model version is a uniquely identified, tested model package. A release is the version together with the configuration and metadata needed to deploy it.
Prerequisites
You should understand basic machine learning deployment, production monitoring, version control, and service APIs. You should also know how your team records model releases and deployment changes.
Model versions are more than filenames
Avoid identifying a model only by a filename such as model.pkl. A reliable version record should include:
- A version label, such as
2026.03.08 - The model artifact's content digest, such as a SHA-256 hash
- The training data or feature definition revision
- The source-code revision used for packaging
- Dependency and runtime versions
- Validation results and approval status
- Deployment history and current environment
The digest identifies the exact bytes of the artifact. If two files have the same version label but different digests, they are different deployment inputs. Treat that mismatch as a release-management error.
A model registry usually stores this information. Common statuses include candidate, validated, production, and retired. Status describes the release process, not model quality in every possible situation. A model marked validated may be suitable for rollback only if its validation still applies to the current code, data, schemas, and dependencies.
Find the known-good release
The known-good release is the most recent release that behaved acceptably under conditions comparable to the current production environment. It is often the previous production version, but not always. For example, the previous version might have a known defect, or the current version might have remained in production for several weeks before the incident was detected.
Check these records before choosing:
- Which model version served traffic immediately before the suspected regression?
- Which releases passed offline and pre-production validation?
- What artifact digest was actually deployed?
- Did the earlier release use the same feature definitions and input schema?
- Are its quality, latency, and business metrics within acceptable limits?
Store the selected version and digest in the change record. This prevents a later operator from guessing which artifact the team intended to restore.
from dataclasses import dataclass
@dataclass(frozen=True)
class ModelRelease:
version: str
status: str
artifact_sha256: str
releases = [
ModelRelease("2026.03.01", "validated", "sha256:aaa"),
ModelRelease("2026.03.08", "validated", "sha256:bbb"),
ModelRelease("2026.03.15", "production", "sha256:ccc"),
]
known_good = next(
release for release in reversed(releases[:-1])
if release.status == "validated"
)
print(known_good.version, known_good.artifact_sha256)This example assumes the last list entry is the current production release. It searches backward for the most recent validated release and retains its digest. In a real system, also check deployment records and compatibility before authorizing the rollback.
Keep the selection auditable
A rollback decision should answer who selected the release, when they selected it, why it was considered safe, and which evidence supported the decision. Record the current release, target release, artifact digests, validation links, and approval status. If the target release cannot be reproduced or verified, pause the rollback and investigate instead of deploying an approximation.
Exercise
The current production release is 2026.03.15, but its predecessor 2026.03.08 used an incompatible feature schema. A validated release from 2026.03.01 uses the current schema. Which release should be considered first, and what must you record?
Show answer
Consider 2026.03.01 first. Record its version, artifact digest, schema and dependency compatibility, validation evidence, and the reason 2026.03.08 was rejected.