fix codegen timeout
This commit is contained in:
+1
-1
@@ -52,7 +52,7 @@ def build_scheduler(config: dict) -> tuple[Scheduler, dict]:
|
||||
"base_url", config.get("llm", {}).get("base_url", "http://localhost:11434/v1")
|
||||
),
|
||||
model=codegen_cfg.get("model", "qwen38-iq3s"),
|
||||
timeout=float(codegen_cfg.get("timeout", 600.0)),
|
||||
timeout=float(codegen_cfg.get("timeout", 1200.0)),
|
||||
)
|
||||
log = DecisionLog(config.get("log", "data/decisions.jsonl"))
|
||||
trace = TraceLog(config.get("trace", "data/runs.jsonl"))
|
||||
|
||||
@@ -72,6 +72,10 @@ class CodegenClient:
|
||||
raise CodegenError(
|
||||
f"codegen endpoint unreachable at {url}: {exc}. Is your local server running?"
|
||||
) from exc
|
||||
except TimeoutError as exc:
|
||||
raise CodegenError(
|
||||
f"codegen request timed out after {self.timeout}s at {url}"
|
||||
) from exc
|
||||
return payload["choices"][0]["message"]["content"]
|
||||
|
||||
|
||||
|
||||
Reference in New Issue
Block a user