fix: prevent false timeout failures and release 1.2.2
This commit is contained in:
1 parent
1dc2b0c686
commit
e1e26772d9
18 files changed
+189
-22
No files matched your search
@@ -167,6 +167,7 @@ class FlashRunner:
|
||||
ctx,
|
||||
model_name=self.step_summarizer_cfg.model,
|
||||
retry_limit=self.memory_runtime_cfg.retry_limit,
|
||||
timeout_seconds=self.step_summarizer_cfg.timeout_seconds,
|
||||
max_concurrency=self.memory_runtime_cfg.max_concurrency,
|
||||
flush_timeout_s=self.memory_runtime_cfg.flush_timeout_s,
|
||||
)
|
||||
|
||||
@@ -151,6 +151,7 @@ class VisualStepSummarizer(StepMemoryService):
|
||||
ctx: ArtemisContext,
|
||||
model_name: str | None = None,
|
||||
retry_limit: int = 3,
|
||||
timeout_seconds: float = 25.0,
|
||||
*,
|
||||
max_concurrency: int = 1,
|
||||
flush_timeout_s: float = 30.0,
|
||||
@@ -161,6 +162,7 @@ class VisualStepSummarizer(StepMemoryService):
|
||||
retry_limit=retry_limit,
|
||||
flush_timeout_s=flush_timeout_s,
|
||||
)
|
||||
self._timeout_seconds = timeout_seconds
|
||||
|
||||
# Initialize lightweight VLM: prioritize explicit model_name
|
||||
target_model = model_name or settings.OPENAI_MODEL
|
||||
@@ -459,7 +461,9 @@ class VisualStepSummarizer(StepMemoryService):
|
||||
HumanMessage(content=content_blocks),
|
||||
]
|
||||
|
||||
response = await asyncio.wait_for(self._llm.ainvoke(messages), timeout=25.0)
|
||||
response = await asyncio.wait_for(
|
||||
self._llm.ainvoke(messages), timeout=self._timeout_seconds
|
||||
)
|
||||
self._meter_lens_call(response)
|
||||
summary_raw = response.content if isinstance(response.content, str) else ""
|
||||
if isinstance(response.content, list):
|
||||
@@ -505,8 +509,14 @@ class VisualStepSummarizer(StepMemoryService):
|
||||
logger.debug(f"DataEngine step summary update skipped: {de_err}")
|
||||
return True
|
||||
|
||||
except TimeoutError:
|
||||
logger.warning(
|
||||
f"VisualStepSummarizer: Step {step_number} summary request timed out "
|
||||
f"(limit {self._timeout_seconds:.1f}s)"
|
||||
)
|
||||
except Exception as e:
|
||||
logger.warning(
|
||||
f"VisualStepSummarizer: Error generating summary for step {step_number}: {e}"
|
||||
f"VisualStepSummarizer: Error generating summary for step {step_number}: "
|
||||
f"{type(e).__name__}: {e}"
|
||||
)
|
||||
return False
|
||||
Reference in new issue
Block a user