Skip to content

2.2.0

Choose a tag to compare

@scottpmiller scottpmiller released this 08 Aug 15:20
· 14 commits to main since this release
2.2.0
b99d3ed

What's Changed

Added

  • store.ScoreExporter, a runtime_checkable Protocol naming the seam JsonlOutboxExporter already occupied. store.py has always said to "replace this class with a database client implementing the same export_scores method", 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.py still used the one-argument register and raised TypeError on import, so 2.1.0 shipped with its own bundled example broken. just test does not run the example; just test-all does.
  • The README's Python API example called a .export() that does not exist and passed RunResults to compare.compare and render_scorecard, which take Scorecards. It now runs verbatim, and shows grader_lookups feeding the exporter.

Upgrading: nothing to do. Both additions are backward compatible.