Record task errors on CaseResult and dedupe repeated model ids - #7
Open
ruanmartinelli wants to merge 1 commit into
Open
Record task errors on CaseResult and dedupe repeated model ids#7ruanmartinelli wants to merge 1 commit into
ruanmartinelli wants to merge 1 commit into
Conversation
Two small robustness fixes in evaluate: - When a task throws, the case was recorded with output: null and score 0 but the error itself vanished, making failures impossible to debug from the report. CaseResult now carries an optional error field with the thrown message (non-Error throws are stringified). - A repeated model id in config.models re-ran every case only to overwrite its own byModel entry — wasted spend and a silently clobbered report. Model ids are now deduplicated up front. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_015XMPpi4PX2bWwAoMLaZZ4k
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.
Two small robustness fixes in
evaluate, both found while reading the case loop.1. Task errors were silently dropped
When a task throws, the case is recorded as
output: null, score: 0— but the error message went nowhere. In a real eval that means "this model scored 0 on 4 cases" with no way to tell a bad completion apart from a rate-limit error or a missing API key.CaseResultnow carries an optionalerror: stringwith the thrown message (non-Error throws are stringified). Purely additive to the report shape.2. Duplicate model ids: wasted spend + silent overwrite
models: ['m1', 'm1']re-ran every case (real model calls, real cost) only to overwrite its ownbyModel.m1entry. There was even a test onmainpinning this as a documented wart. Model ids are now deduplicated up front; that test now asserts the task runs once.Tests
Updated the wart test, extended the thrown-task test to assert the recorded message, and added cases for the non-Error throw and the error-unset-on-success path.
pnpm typecheck && pnpm test: 70 passing.Note
Touches the same case loop as #6 (concurrency) — whichever merges first, the other rebases trivially; happy to do the rebase.
🤖 Generated with Claude Code
https://claude.ai/code/session_015XMPpi4PX2bWwAoMLaZZ4k
Generated by Claude Code