Repository navigation
Conversation
max_retries and TimeoutAction.RETRY/EXTEND were declared but never read by the execution loop. Retry infrastructure failures up to max_retries times and retry timeouts once. Record every attempt in the report's new attempts field. Set the tau2 and gaia2 loader default to max_retries=0 to match the original benchmarks. Closes #62 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Coverage reportClick to see where and how coverage changed
This report was generated by python-coverage-comment-action |
||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||||
This branch has not been deployed
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.
Description
TaskProtocol.max_retriesandTimeoutAction.RETRY/EXTENDwere part of the public API but the execution loop never read them (#62). This PR makes them take effect. It replaces #66, which rejected the settings instead and broke task loading for tau2 and gaia2.Retry rules
max_retriesretries failures outside the agent's control:setup_failed,environment_error,user_error,unknown_execution_error.agent_errorandevaluation_failedare never retried. Retrying agent errors would inflate scores. Retrying evaluation failures would discard a finished agent run.RETRYkeeps the timeout,EXTENDdoubles it. This is separate frommax_retries.fail_on_*flag set, errors are raised on the first failure without retrying.Reports
Every report has a new
attemptslist. Each entry holdsstatus,error,usage, andtimeout_secondsfor one attempt, oldest first. Retried results and extended timeouts are therefore visible in the results, and per-attempt usage keeps the cost of failed attempts.ResultLoggerwrites the field.Benchmark loaders
tau2 and gaia2
load_tasks()defaulted tomax_retries=1("skip on first failure"). With retries now working, that default would have changed benchmark results. It is now 0, which matches the originals: neither tau2-bench v0.2.0 (src/tau2/run.py) nor ARE retries failed runs. Execution is identical to before.Implementation
_execute_task_repetitionis now a small retry loop. The previous body moved unchanged into_execute_task_attempt, which takes the attempt's timeout as an argument. Sequential and parallel runs both go through the loop. Callbacks still fire once per repetition.Type of Change
Checklist
Contribution
Documentation
docs/(if applicable)Changelog
CHANGELOG.mdunder[Unreleased]sectionArchitecture (if applicable)
maseval/core/do NOT import frommaseval/interface/Additional Notes
Closes #62. Supersedes #66.
Behavior changes for users
max_retries > 0orRETRY/EXTENDwill now get retries. Previously these settings were silently ignored.TaskProtocol(max_retries=-1)now raisesValueError.attemptskey. Existing keys are unchanged.Known limitation: if gaia2 setup fails after the ARE simulation has started, the simulation is not stopped. This leak already exists on
main. With retries enabled, each retry can leak another simulation. Retries are off by default.Tests
tests/test_core/test_benchmark/test_task_retries.py(17 tests) covers every retryable status, non-retried statuses, exhausted retries, all three timeout actions, separate retry budgets, seed reuse, per-attempt usage, fail-fast, and sequential plus parallel runs. 16 of them fail onmain. The fail-fast test passes on both, because raising right away was already the behavior.uv run pytest: 2648 passed. 5 tests intests/test_core/test_usage.py::TestFullPipelinefail identically onmainbecausefrom tests.conftest import ...cannot be resolved. That is unrelated to this PR.ruff format,ruff check, andty checkpass.mkdocs build --strictreports the same 426 warnings asmainand nothing new.🤖 Generated with Claude Code