fix: restore terminalbench2_env.py from patch-tool redaction corruption#3801
Merged
fix: restore terminalbench2_env.py from patch-tool redaction corruption#3801
Conversation
Commit ed27b82 introduced patch-tool redaction corruption that: - Replaced max_token_length=16000 with max_token_length=*** - Truncated api_key=os.getenv(...) to api_key=os.get...EY - Truncated tokenizer_name to NousRe...1-8B - Deleted 409 lines including _run_tests(), _eval_with_timeout(), evaluate(), wandb_log(), and the __main__ entry point Restores the file from pre-corruption state (ed27b82^) and re-applies the two legitimate changes from subsequent commits: - eval_concurrency config field (from ed27b82) - docker_image registration in register_task_env_overrides (from ed27b82) - ManagedServer branching for vLLM/SGLang backends (from 13f5459) Closes #1737, #1740.
|
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
Commit
ed27b826introduced patch-tool redaction corruption that destroyedterminalbench2_env.py— the file went from 925 lines to 516, losing the entire evaluation pipeline.Corruption fixed
max_token_length=***→max_token_length=16000,api_key=os.get...EY", "")→os.getenv("OPENROUTER_API_KEY", "")tokenizer_name="NousRe...1-8B"→"NousResearch/Hermes-3-Llama-3.1-8B"Code restored (409 lines)
_run_tests()— test upload, execution, and verifier download_eval_with_timeout()— per-task wall-clock timeout wrapperevaluate()— main evaluation entry point (tqdm progress, concurrency, results aggregation)wandb_log()— metric loggingif __name__ == "__main__"entry pointrollout_and_score_eval()— result assembly, error handling, finally-block cleanupLegitimate changes preserved
Re-applied from the two commits that landed after the corruption:
eval_concurrencyconfig field (ed27b826)docker_imageregistration alongsidemodal_image(ed27b826)13f54596)Closes PRs #1737 and #1740 (partial fixes from
aydnOktaythat spotted the syntax errors — credit to them for surfacing the issue).