Skip to content

judging: enforce the two-level minimum that Rubric validation already states - #28

Open
ChrisW09 wants to merge 1 commit into
mainfrom
fix/rubric-min-levels
Open

judging: enforce the two-level minimum that Rubric validation already states#28
ChrisW09 wants to merge 1 commit into
mainfrom
fix/rubric-min-levels

Conversation

@ChrisW09

Copy link
Copy Markdown
Collaborator

Fixes #16.

Rubric.__post_init__ checked if not self.levels: while raising "a rubric needs at least two levels" — so a one-level rubric was accepted, yielding min_value == max_value, a grade hint of "exactly one of: 1", and a degenerate constant scale the downstream ordinal/binary models cannot fit.

One-line fix (len(self.levels) < 2) plus a regression test pinning both the empty and one-level cases.

Test: pytest packages/cafe-core/tests/test_judging.py — 17 passed.

🤖 Generated with Claude Code

The validator checked 'if not self.levels', so a one-level rubric passed
despite the error message's stated invariant, producing a degenerate
constant scale (min == max) downstream models can't fit.

Fixes #16

Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
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.

judging: Rubric accepts a one-level rubric despite "needs at least two levels" validation

1 participant