feat(governance): add automated model card generator#37
Merged
Conversation
Builds Mitchell-style model cards from training config + evaluation metrics, with optional fairness report attached. Renders to both Markdown (for release notes / model registry) and JSON (for downstream tooling). Ships a CLI entrypoint at scripts/generate_model_card.py for the release CI pipeline.
a427ab8 to
c51ae44
Compare
franchaise
approved these changes
May 5, 2026
Collaborator
franchaise
left a comment
There was a problem hiding this comment.
Required-metric set (iou/f1/precision/recall) is the right floor and ValueError is correctly raised on missing keys — that means scripts/generate_model_card.py will fail loud in CI rather than silently emitting an incomplete card. Markdown + JSON sidecar covers both human and machine consumers.
The default intended-use / out-of-scope / ethics blocks are sensible defaults; we'll override per-release as we tune ecosystem-specific carbon constants. Approving.
This was referenced May 7, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
src/climatevision/governance/model_card.py— builds Mitchell-style model cards from training config + evaluation metrics, with an optional fairness report attached.scripts/generate_model_card.pyso the release CI pipeline can attach a card to every model version it publishes.iou,f1,precision,recall) is enforced — releases without all four fail loudly.Why
Sprint deliverable: "Create model card generator (automated from training config + evaluation metrics)." Feeds into the governance CI gate and the LLM impact reporter.
Test plan
pytest tests/test_model_card.py— 6/6 passValueErrorwrite_model_cardemits both.mdand.jsonsidecars with matching contentgenerate(config_path, metrics_path, ...)loads files from diskNotes for reviewers
develop.intended_use,out_of_scope_uses,limitations,ethical_considerationsis included so cards have a sensible baseline even when callers do not customise them. Override per-release as needed.