Skip to content

fix: validate classifier answers and score partial batches - #187

Merged
SrGonao merged 3 commits into
mainfrom
fix/classifier-binary-parsing
Nov 2, 2026
Merged

SrGonao merged 3 commits into
mainfrom
fix/classifier-binary-parsing

Conversation

@SrGonao

@SrGonao SrGonao commented Oct 31, 2026 •

Copy link
Copy Markdown
Collaborator

Stacked on #185 so this PR includes the shared CI prerequisites. Review/merge #185 first, then retarget this PR to main.

A classifier batch containing fewer items than n_examples_shown is currently rejected even when the model returns the correct number of predictions. Parse against the actual batch length, including log probabilities and failure outputs.

Validate that JSON answers contain only binary integers or booleans, instead of silently casting values such as 2 or "0" to True. Match exact binary tokens when extracting probabilities so alternatives such as 10 do not contribute to P(1). Reject nonpositive batch sizes.

Validation: seven focused classifier cases pass independently, covering five malformed answers, a partial final batch, and an exact-token probability calculation. The combined fixes pass 49 focused tests; Ruff passes. The CPU launcher bypasses only the eager vLLM initializer; no live model requests were made.

The pre-existing Actions collection failure is fixed separately by #185.

@SrGonao
SrGonao changed the base branch from main to fix/ci-module-cache-isolation November 1, 2026 14:52
@SrGonao
SrGonao changed the base branch from fix/ci-module-cache-isolation to main November 2, 2026 12:40
@SrGonao
SrGonao merged commit 2298633 into main Nov 2, 2026
4 checks passed
@SrGonao
SrGonao deleted the fix/classifier-binary-parsing branch November 2, 2026 12:41
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.

1 participant