Skip to content

feat(governance): add automated model card generator#37

Merged
Goldokpa merged 1 commit intodevelopfrom
feature/governance-model-card
May 5, 2026
Merged

feat(governance): add automated model card generator#37
Goldokpa merged 1 commit intodevelopfrom
feature/governance-model-card

Conversation

@obielin
Copy link
Copy Markdown
Collaborator

@obielin obielin commented May 4, 2026

Summary

  • Adds src/climatevision/governance/model_card.py — builds Mitchell-style model cards from training config + evaluation metrics, with an 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 so the release CI pipeline can attach a card to every model version it publishes.
  • Required metric set (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 pass
    • card uses config values for name/version/analysis_type
    • missing required metric raises ValueError
    • rendered Markdown includes every required section
    • write_model_card emits both .md and .json sidecars with matching content
    • end-to-end generate(config_path, metrics_path, ...) loads files from disk

Notes for reviewers

  • Branched off develop.
  • Default content for intended_use, out_of_scope_uses, limitations, ethical_considerations is included so cards have a sensible baseline even when callers do not customise them. Override per-release as needed.

@obielin obielin requested a review from Goldokpa as a code owner May 4, 2026 21:00
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.
@obielin obielin force-pushed the feature/governance-model-card branch from a427ab8 to c51ae44 Compare May 5, 2026 22:10
Copy link
Copy Markdown
Collaborator

@franchaise franchaise left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants