Repository navigation
Fix receipt digest crash when a sample has no grade - #54
Merged
Merged
Conversation
Inspect's Score.unscored stores value NaN, and every unsettled yugos-evals outcome (for example a needs_review completion gate when a sample hits its time limit mid tool call) returns it. The canonical receipt copied that NaN as-is, so the strict-JSON digest raised "Out of range float values are not JSON compliant" after the run's inference had finished. The receipt now records an unscored value as null, keeping its code. Receipts with no unscored scores are unchanged, so their digests are stable.
Codex Review Summary: ✅ CompletedThis comment shows the latest Codex review activity on this pull request.
ℹ️ About Codex in GitHubYour team has set up Codex to review pull requests in this repo. Reviews are triggered when you
Codex reacts with 👀 while any review is running, comments if it has suggestions, and reacts with 👍 once all reviews finish with no findings. |
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.
Summary
Inspect's
Score.unscored(...)storesvalue = NaN, and yugos-evals returns it for every unsettled outcome. One example is aneeds_reviewcompletion gate when a sample hits its time limit while the model's last turn is a tool call.inspect_engine.digest._sample_recordcopied that NaN into the canonical receipt unchanged.competition.rules.digestencodes withallow_nan=False, soreceipt_digestraisedValueError: Out of range float values are not JSON compliant: nanafter all of the run's inference had already finished.The canonical receipt now records an unscored value as
null, including NaN nested inside dict or list score values, and keeps the score'scode. Receipts with no unscored scores serialize exactly as before, so their digests do not change.Validation
test_receipt_digest_commits_unscored_samples_as_nulldigests a log with aScore.unscoredsample. It checks that the digest is computed and is the same after writing and re-reading the log, that it differs from the graded run's digest, and that the receipt records{value: null, code: needs_review}. Before the fix, it fails with theValueErrorabove.packages/yugos/tests: 571 passed. The 5 failures (test_chat,test_inspect_providerssaygm cases) also fail onmain.🤖 Generated with Claude Code