fix: embedding 改 cuda + OCR 超时 300s + 重试退避 20s 起 + jitter 防雷群
- config/default.yaml: embed.device cpu → cuda - adapters/ocr.py: _TIMEOUT_S 15 → 300(5 分钟) - adapters/llm.py: 指数退避加 ±50% jitter 避免 24 路同时重试 - .env: LLM_RETRY_BASE_DELAY 2→20s, LLM_RETRY_MAX_DELAY 30→120s Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
+6
-3
@@ -449,12 +449,15 @@ class GovernedLLMClient:
|
||||
},
|
||||
)
|
||||
if attempt < self._max_retries - 1:
|
||||
delay = min(
|
||||
import random
|
||||
|
||||
base = min(
|
||||
self._retry_base_delay_s * (2**attempt),
|
||||
self._retry_max_delay_s,
|
||||
)
|
||||
if delay > 0:
|
||||
await asyncio.sleep(delay)
|
||||
jitter = base * random.uniform(0.5, 1.5)
|
||||
if jitter > 0:
|
||||
await asyncio.sleep(jitter)
|
||||
continue
|
||||
|
||||
# 非瞬时、非致命 → 记遥测后直接抛出
|
||||
|
||||
+1
-1
@@ -14,7 +14,7 @@ from pathlib import Path # noqa: TC003 — 运行时需要(方法签名 + ope
|
||||
import requests
|
||||
from loguru import logger
|
||||
|
||||
_TIMEOUT_S = 15
|
||||
_TIMEOUT_S = 300
|
||||
|
||||
|
||||
class MonkeyOCRClient:
|
||||
|
||||
+1
-1
@@ -20,7 +20,7 @@ embed:
|
||||
backend: "local"
|
||||
model_name: "BAAI/bge-base-zh-v1.5"
|
||||
embed_dim: 768
|
||||
device: "cpu"
|
||||
device: "cuda"
|
||||
|
||||
# ── Harness 自进化循环 ──
|
||||
harness:
|
||||
|
||||
Reference in New Issue
Block a user