fix(eval): re-run infra-retryable verifier-errored tasks on resume - #1063
fix(eval): re-run infra-retryable verifier-errored tasks on resume#1063Benjamin-eecs wants to merge 2 commits into
Conversation
There was a problem hiding this comment.
Devin Review found 1 potential issue.
1 flag not posted on this PR by your GitHub settings — view it in Devin Review. (Configure)
| if r.get("rewards") is None and ( | ||
| self._config.retry.should_retry_verifier_error(r["verifier_error"]) | ||
| ): | ||
| logger.info( | ||
| f"Re-running verifier-errored task on resume: {task} " | ||
| f"({truncate_end(r['verifier_error'], 80)})" | ||
| ) | ||
| continue |
There was a problem hiding this comment.
🔴 Resumed learning tasks run out of order
In sequential-shared resumes, _get_completed_tasks reruns an earlier errored task after later tasks advanced the persisted learner state. The reordered task consumes future skills and corrupts the learning curve.
Prompt for agents
The new resume filtering in src/benchflow/evaluation.py::_get_completed_tasks is safe for parallel-independent jobs but breaks sequential-shared ordering. A sequential run can continue after task B has a retryable verifier error, then complete task C and persist C's learner generation. On resume, B is the only remaining task and runs against C's later learner state. Preserve sequence semantics by either rewinding the learner store and invalidating/rerunning the errored task plus every later task, or by keeping retryable verifier failures terminal for sequential-shared mode. Add a regression test with completed A, retryable-error B, completed C, and a persisted learner snapshot.
Was this helpful? React with 👍 or 👎 to provide feedback.
There was a problem hiding this comment.
Good catch, fixed: re-run is gated to parallel-independent; sequential-shared keeps the reuse semantics. Regression test added.
|
The boundary is drawn where it should be, and the tests prove it: I verified
One layout check for the record: matrix trials each get their own job dir ( On ordering vs my #1046 (feat/ablate-cli): a trial merge in both directions is clean — my |
|
Thanks for verifying. Also addressed the sequential-shared concern from the automated review: the re-run is now gated to parallel-independent mode, with a regression test. |
Description
On resume, re-run a task whose newest result is scoreless and whose verifier error is infra-retryable per
RetryConfig.should_retry_verifier_error(verifier timeout, session transport loss, download failure). Keep reusing contract failures (e.g.No reward file found) and any result that carries rewards.Motivation and Context
A scoreless infra verifier error records no signal about the task; reusing it on resume pins a lost score forever, and the only recovery is manually deleting
result.json. The change reuses the retry taxonomy the within-run retry already trusts, and preserves the PR #819 / issue #542 behavior for contract failures and scored results.Closes #1059.
Types of changes
Implemented Tasks
_get_completed_taskswith an explicit re-run log lineChecklist
tests/test_verify.py: 58 passed;tests/test_job.py: 53 passed).ruff check src/benchflow/evaluation.py tests/test_verify.py: passed).