Sub topic 12
Keeping cards current: versioning, review, and governance
A model card is accurate on the day it is written. After that, the model is retrained, the data shifts, the product expands to new users, and the card starts to describe a model that no longer exists. This chapter covers how to keep a card true over time. It assumes you can write a model card with the standard sections, you know how to compute metrics, you use Git, and you have seen the CI check from the previous chapter that fails a build when required headings are missing.
Why cards go stale
A stale card is worse than no card. A reader trusts it, and acts on numbers or limits that are no longer correct. Cards go stale for a few predictable reasons:
- The model changes and the card does not. A retrain moves accuracy from 0.91 to 0.87, but the card still says 0.91.
- The use changes and the card does not. A model built for English tickets is quietly pointed at Spanish tickets.
- The world changes. The input distribution drifts, so the evaluation numbers no longer describe production behavior, even though the model file is identical.
- Nobody owns the card. Everyone assumes someone else will update it.
The first cause can be fixed with tooling. The others need process and named responsibility. Treat the card as part of the release, not as an afterthought to it.
Version the card with the model
The simplest rule is that every model version has exactly one card version, and the two are stored together. If the model artifact is tagged 1.2.0, the card that describes it is the one at the same Git tag.
Keep the card in the same repository as the training code, or in the model registry entry next to the artifact. Do not keep it in a wiki page that has its own history. A separate history makes it impossible to answer the question "what did we claim about version 1.1.0 when we shipped it?"
Put the version in the card itself, as in the ModelCard dataclass from earlier chapters, and keep a short change log at the bottom. A change log answers what changed between versions without making readers diff two files.
## Change log
- 1.2.0 (2026-11-02): Retrained on tickets through 2025. Macro F1 0.88 (was 0.85).
Added evaluation on tickets shorter than 5 words.
- 1.1.0 (2026-03-14): Added fifth queue ("billing disputes").
- 1.0.0 (2025-09-01): First release.What counts as a card change
Not every edit needs a new version. A useful distinction:
| Change | Example | Needs a new model version? |
|---|---|---|
| Editorial fix | Typo, broken link, clearer wording | No. Commit to the card only. |
| New information about the same model | A newly discovered limitation, a new disaggregated slice | No, but record it in the change log with a date. |
| Change to the model or its data | Retraining, new training data, new threshold | Yes. Re-run the evaluation and update every affected section. |
| Change to intended use | Supporting a new language or a new user group | Yes, and trigger a review (see below). |
The second row matters most. Learning something new about an existing model is common, and the card should absorb it without waiting for the next release. Record what you learned and when you learned it, so readers can tell whether a limitation was known when they deployed.
Regenerate numbers, do not retype them
The most common source of drift is a human copying metrics into the card. Generate the evaluation section from the evaluation job's output instead. Then the card cannot disagree with the run that produced it.
The script below reads a JSON file written by an evaluation step and rewrites only the Evaluation section of a card, leaving the human-written sections alone.
import json
import re
from pathlib import Path
def render_evaluation(results: dict) -> str:
lines = ["## Evaluation", ""]
lines.append(f"Evaluated on: {results['dataset']} ({results['n_examples']} examples)")
lines.append("")
lines += [f"- {name}: {value:.3f}" for name, value in results["metrics"].items()]
if results.get("by_group"):
lines += ["", "### By group", ""]
for group, value in results["by_group"].items():
lines.append(f"- {group}: {value:.3f}")
return "\n".join(lines) + "\n"
def replace_section(markdown: str, heading: str, new_section: str) -> str:
pattern = re.compile(
rf"^## {re.escape(heading)}\n.*?(?=^## |\Z)", re.MULTILINE | re.DOTALL
)
if not pattern.search(markdown):
raise ValueError(f"Section not found: {heading}")
return pattern.sub(lambda _: new_section + "\n", markdown, count=1)
results = {
"dataset": "held-out tickets 2025",
"n_examples": 12000,
"metrics": {"accuracy": 0.91, "macro_f1": 0.88},
"by_group": {"short tickets": 0.79, "long tickets": 0.93},
}
card = Path("README.md").read_text(encoding="utf-8")
card = replace_section(card, "Evaluation", render_evaluation(results))
Path("README.md").write_text(card, encoding="utf-8")Two details prevent common bugs. The lookahead (?=^## |\Z) stops the match at the next level-two heading, so the ### By group subsection is replaced together with its parent. The lambda in sub avoids treating backslashes in the new text as regex escapes. The script also fails loudly if the section is missing, which is better than silently doing nothing.
Detect when the card needs attention
Regeneration only helps if someone triggers it. Add checks that notice when the card and the model have separated.
Useful signals include:
- The model artifact changed but the card did not. In CI, compare the files changed in a pull request. If the model, training config, or training data reference changed and the card did not, fail or warn.
- The card's version does not match the artifact's version. Compare the version string in the card to the release tag.
- The evaluation is older than a set age. Store the evaluation date in the card's metadata and flag cards whose evaluation is more than, say, six months old.
- Production metrics diverge from the card. If monitoring shows live accuracy well below the reported figure, the card's evaluation section no longer describes reality.
The following check covers signals 2 and 3 using the YAML front matter introduced in the machine-readable metadata chapter. It assumes the front matter includes version and evaluated_on fields (ISO dates).
import re
import sys
from datetime import date, timedelta
from pathlib import Path
MAX_AGE = timedelta(days=180)
def front_matter(markdown: str) -> dict:
match = re.match(r"^---\n(.*?)\n---\n", markdown, re.DOTALL)
if not match:
raise SystemExit("No front matter found")
fields = {}
for line in match.group(1).splitlines():
if ":" in line and not line.startswith((" ", "-")):
key, value = line.split(":", 1)
fields[key.strip()] = value.strip()
return fields
def check(card_path: str, release_version: str) -> list:
meta = front_matter(Path(card_path).read_text(encoding="utf-8"))
problems = []
if meta.get("version") != release_version:
problems.append(
f"card version {meta.get('version')} != release {release_version}"
)
evaluated = date.fromisoformat(meta["evaluated_on"])
if date.today() - evaluated > MAX_AGE:
problems.append(f"evaluation is stale (last run {evaluated})")
return problems
if __name__ == "__main__":
issues = check("README.md", sys.argv[1])
if issues:
raise SystemExit("; ".join(issues))Run it as python check_card.py 1.2.0 in the release job. The hand-written parser handles only flat key: value lines, which is enough here. For nested metadata, use a YAML library instead of extending the regex.
Review: who signs off
Automated checks confirm that sections exist and numbers match. They cannot tell you whether a limitation statement is honest or whether an out-of-scope list is complete. That needs human review.
A workable review process has three parts.
- Pull request review for every card change. Because the card lives in the repository, changes arrive as diffs. The reviewer reads the diff the same way they read code.
- A second reviewer who did not build the model. Authors tend to underreport weaknesses they already know how to work around. A reviewer from outside the team, such as a domain expert, a product owner, or someone from risk or legal, asks the questions the author stopped asking.
- A stricter path for high-impact changes. Changes to intended use, new user populations, or new deployment settings should require sign-off from whoever is accountable for the model's risk, not only a peer.
A short review checklist keeps reviews consistent:
- Does every number trace to a recorded evaluation run?
- Does the intended-use statement match how the model is actually deployed today?
- Are the out-of-scope uses still complete, given any new products that use this model?
- Are the disaggregated results still reported for every group that was in scope at the last review?
- Is every known limitation listed, including those found in production since the last release?
Governance: ownership and lifecycle
Governance sounds heavy, but at a small scale it comes down to a few explicit decisions.
Name an owner. Each card has one accountable person or team, listed in the model details. This is the contact who answers questions and who gets the alert when the card goes stale. A card whose owner has left the company needs a new owner assigned, not just a note.
Define review triggers. Write down the events that require a card review. Typical triggers are a retrain, a change in training data, a new deployment context, an incident, and a fixed calendar interval even if nothing else changed.
Record incidents in the card. When a model fails in production in a way users should know about, add it to the limitations or to a known-issues section, with the date. The card then becomes a memory of what went wrong, which helps the next team that considers reusing the model.
Keep old cards. Do not delete the card for a retired model. Mark its status as deprecated, say why, and point to the replacement. People who still run the old version need its limitations more than anyone.
Make the card a release gate. The most reliable way to keep cards current is to block the release when the card is missing, invalid, or out of sync. Teams that rely on goodwill alone find that cards slip first when a deadline is close.
The diagram below summarizes the lifecycle.
Common mistakes
- Updating the model without a card diff. The fix is a CI check that ties model changes to card changes.
- Overwriting history. Editing the card in place without a change log or tag makes past claims unrecoverable. Use Git tags and a change log.
- Reviewing only the format. Passing the heading check says nothing about accuracy of content. Keep a human in the loop for substance.
- Reporting only the latest numbers. When metrics drop between versions, say so in the change log. Hiding a regression defeats the purpose of the card.
- Letting intended use grow silently. Teams add new use cases because the model "already exists". Each new use is a review trigger.
- No owner. A card nobody owns will be wrong within a year.
Exercise
Your team retrains the support-ticket classifier on newer data. Accuracy is unchanged, but a user reports that the model performs badly on tickets written in Spanish, which the card lists as untested. Which parts of the card change, does this need a new model version, and what should the change log record?
Show answer
The retrain is a change to the model and its data, so it needs a new model version with a re-run evaluation and updated training data and evaluation sections. The Spanish report is new information, so add a limitation stating that performance on Spanish tickets is poor or unverified, and confirm that the out-of-scope section says the model should not be used for Spanish. Because deployment on Spanish tickets would be a change in intended use, it should also trigger a review by the accountable owner. The change log should record the new version and date, the retraining, the unchanged accuracy, and the dated limitation about Spanish, so readers can see when the issue became known.
Exercise
Why is it better to generate the Evaluation section from the evaluation job's output than to type the numbers into the card by hand? Name one thing the generation script must still leave to people.
Show answer
Generation guarantees that the card's numbers come from the same run as the model being released, so they cannot be mistyped or left over from an earlier version. People must still write and review the judgement-based sections, such as intended use, out-of-scope use, and limitations, because no script can tell whether those statements are honest or complete.