run_one: exactly 1 attempt (adapter handles all retries internally)

Co-Authored-By: Claude <noreply@anthropic.com>
This commit is contained in:
sora 2026-09-11 07:07:22 +00:00
parent 55b2beab54
commit d64b236540

View File

@ -419,18 +419,15 @@ async def generate_predictions(
# backoff so one ConnectError burst cannot kill the whole batch --
# the adapter already retries 5xx/429 and the pool fails over per
# instance; this is the last line of defense around asyncio.gather
for attempt in range(3):
# NO outer retry: the adapter retries internally; a second loop
# here multiplied worst-case time (42+ attempts before this fix).
# One pass, one result or one error.
try:
pred = await one(s)
break
except Exception:
if attempt == 2:
if progress_reporter is not None:
progress_reporter.advance(success=False)
raise
# minute-scale backoff: cluster routes flap in multi-minute
# bursts; short retries exhaust inside one dead window
await asyncio.sleep((10, 20, 40)[attempt])
if ckpt_store is not None:
ckpt_store.append(keys[i], pred)
return i, pred