From f09fe184fe060117a1a43b083a684d982091ab13 Mon Sep 17 00:00:00 2001 From: sora <2075279110@qq.com> Date: Fri, 18 Sep 2026 08:54:30 +0000 Subject: [PATCH] swe_agentic: ensure per-instance image before docker run docker run's implicit pull prints nothing and the 120s start timeout kills runs on slow mirrors; ensure_image brings the progress display, mirror chain and watchdog to per-instance pulls (each sample = its own image, 10 samples = 10 pulls). Co-Authored-By: Claude --- evalharness/agent/envs/swe_agentic.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/evalharness/agent/envs/swe_agentic.py b/evalharness/agent/envs/swe_agentic.py index c1f18cb..cbd78c1 100644 --- a/evalharness/agent/envs/swe_agentic.py +++ b/evalharness/agent/envs/swe_agentic.py @@ -118,6 +118,15 @@ class SWEAgenticEnvironment(Environment): # ---- container lifecycle ---- def _start(self, image: str) -> str: + # per-instance image: ensure (local check -> mirror-chain pull with + # progress) BEFORE docker run -- `docker run` auto-pulls with zero + # output and its 120s timeout kills runs on slow mirrors + from ...sandbox.docker import ensure_image + + try: + ensure_image(image) + except RuntimeError as e: + raise RuntimeError(f'image {image} unavailable: {str(e)[:150]}') name = f'eh-swe-{uuid.uuid4().hex[:10]}' r = _docker(['run', '-d', '--name', name, '-w', '/testbed',