evaluators
evaluators copied to clipboard
feat: add Inspect AI integration package (learning-commons-inspect-scorers)
Summary
Adds integrations/inspect-python (learning-commons-inspect-scorers) — the Inspect AI integration for the LC evaluators SDK.
Stacked on #100 (
LLMGeneratorProtocol). Merge #100 first, then retarget this tomain.
This is split out from the combined integrations PR (#101) so the Inspect path — the only one with a real consumer (edu-panda-skill-harness) — can be validated and merged independently. The speculative observability integrations (Arize, Langfuse, Braintrust) remain on #101 to be revisited per-vendor once each is validated against a real account.
What's here
InspectModelAdapter— wraps Inspect'sget_model()to satisfyLLMGeneratorProtocol, so the GLA evaluator runs through Inspect's own model system (no separate API keys).gla_scorer()— an Inspect@scorerfor grade-level appropriateness. Readstarget_gradefrom sample metadata, scorescompletionorartifacts, returnsCORRECT/INCORRECTwithScore.unscored()for skip/error paths.- Entry-point registration so the scorer is discoverable via
inspect score --scorer learning_commons_inspect_scorers/gla_scorer.
Review fixes already applied
inspect-ai>=0.3.214—Score.unscored()(used in every skip/error path) was added in 0.3.214; the previous>=0.3.2bound wouldAttributeErrorat runtime on older installs.- Import sorting / formatting cleaned (no CI was running ruff on integration packages — see CI note below).
Test plan
- [ ] 33 tests pass (unit: score routing, band logic, artifact reading; integration:
eval()withmockllm/model) - [ ] Follow-up: wire integration-package CI (ruff + pytest) — triggered only when the Python SDK version is bumped or
integrations/inspect-python/**changes.
🤖 Generated with Claude Code