fix(loaders): refuse what cannot be scored honestly, in both loaders and the pricing file - #86
Merged
Merged
Conversation
…and the pricing file #44: load_jevbench skipped the duplicate-id check load_jsonl makes, so ["dup", "dup"] loaded with no refusal and later joins by id could mix rows. Both loaders now share one check and one message. #45, datasets: - A UTF-8 byte order mark, which Windows editors and spreadsheet exports write, made line 1 unparseable; the first line is read as utf-8-sig. - A file that is not UTF-8 failed with a bare codec error. Lines are decoded one by one, and the error names the file, the line, and the byte. - str() turned a label of null, true or 1 into "None", "True" or "1" and loaded an option nobody wrote; empty and blank labels were accepted. Every label must be a non-empty string. - label_descriptions could describe options that do not exist, and null became "None". Keys must be options and values non-empty strings. #45, pricing: NaN, infinite and negative prices were accepted; as_of took 20260901 and 2026-W36-1 (fromisoformat accepts both) and future dates, which would keep the report from ever calling a price stale. Each is refused, and the pricing file is read as utf-8-sig too. The "Your own data" page lists the new refusals. Fixes #44. Fixes #45. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Fixes #44. Fixes #45.
#44:
load_jevbenchskipped the duplicate-id check thatload_jsonlmakes, so["dup", "dup"]loaded with no refusal. Both loaders now share one check and one message.#45, dataset loader:
utf-8-sig.str()turned a label ofnull,trueor1into "None", "True" or "1" and loaded an option nobody wrote, and empty or blank labels were accepted. Every label must now be a non-empty string. The public fixture's labels are all strings, and it still loads 111 of 111.label_descriptionscould describe options that don't exist, andnullbecame "None". Keys must now be options, and values non-empty strings.#45, pricing loader:
as_ofaccepted20260901and2026-W36-1(fromisoformattakes both) and dates in the future. A future date would keep the report from ever calling a price stale. All three are now refused.utf-8-sigtoo.The "Your own data" page lists the new refusals.
Checked
mainand pass now:ruff,mypy --strict, the fullpytestsuite, and the site build all pass. The example report is unchanged.🤖 Generated with Claude Code