Repository navigation
2.2.0
What's Changed
Added
-
store.ScoreExporter, aruntime_checkableProtocol naming the seamJsonlOutboxExporteralready occupied.store.pyhas always said to "replace this class with a database client implementing the sameexport_scoresmethod", but the contract was a docstring sentence and**kwargs, so an implementation had to duck-type a private shape.An exporter belongs in the package that owns the store it targets - it is the store that knows its own column types, null policy, and transport. Swapping one for another is a constructor line at the call site, so an offline run and a live one share a code path:
exporter = store.JsonlOutboxExporter(path) # offline exporter = KafkaOutboxExporter(brokers) # live, from another package exporter.export_scores(run, comparison, grader_types=..., judge_scales=...)
Fixed
examples/quickstart/graders.pystill used the one-argumentregisterand raisedTypeErroron import, so 2.1.0 shipped with its own bundled example broken.just testdoes not run the example;just test-alldoes.- The README's Python API example called a
.export()that does not exist and passedRunResults tocompare.compareandrender_scorecard, which takeScorecards. It now runs verbatim, and showsgrader_lookupsfeeding the exporter.
Upgrading: nothing to do. Both additions are backward compatible.