From 4618c990b1e5c2c201dd4f4769dd9ba50e3cd3e7 Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Fri, 18 Sep 2026 10:45:51 +0000 Subject: [PATCH] official swe scorer: PIP_INDEX_URL tuna in eval containers The official eval_script runs pip install -e '.[test]' -- same pypi.org unreachability as agent containers would burn the 1800s timeout on network retries. Same tuna mirror injected. Co-Authored-By: Claude --- evalharness/eval/recipes/agent.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/evalharness/eval/recipes/agent.py b/evalharness/eval/recipes/agent.py index d28d102..117cc8f 100644 --- a/evalharness/eval/recipes/agent.py +++ b/evalharness/eval/recipes/agent.py @@ -269,7 +269,12 @@ def _official_swebench_eval(instance_meta: dict, patch: str, timeout: int = 1800 image_name = test_spec.instance_image_key container = client.containers.run( image_name, command='tail -f /dev/null', detach=True, - name=f'eh-swe-official-{test_spec.instance_id[:40]}') + name=f'eh-swe-official-{test_spec.instance_id[:40]}', + # the official eval_script runs `pip install -e .[test]`; pypi.org + # is unreachable from this host's containers -> same tuna mirror + # as the agent containers + environment={'PIP_INDEX_URL': + 'https://pypi.tuna.tsinghua.edu.cn/simple'}) try: patch_file = log_dir / 'patch.diff' patch_file.write_text(patch or '')