Skip to content

CICD-440 · Model rollback automation ​

Encyclopedia · AI and LLM application pipelines · All snippets

Previous · CICD-439 · Next · CICD-441

1. Where it fits ​

  • Placement CI run step or authorized lab terminal.
  • Prerequisites approved synthetic evaluation data, authorized model artifacts and pinned runtime tools.
  • Platforms local-linux, github-actions, gitea-actions.
  • Parameters KNOWN_GOOD_MODEL_DIGEST.

2. Copy the snippet ​

bash
[[ "${KNOWN_GOOD_MODEL_DIGEST:?}" =~ ^sha256:[0-9a-f]{64}$ ]]
export MODEL_DIGEST="$KNOWN_GOOD_MODEL_DIGEST"
yq -i '.model.digest = strenv(MODEL_DIGEST)' environments/staging/model.yaml
git diff --check

3. How it works ​

A known-good immutable digest replaces the candidate in desired state. Verify the serving runtime has converged and can answer the synthetic request again.

4. Verify the result ​

Use a reviewed rollback change. Confirm runtime advertises the old revision and passes synthetic inference.

Validation syntax-validated (Bash parse). Status definitions.