[Feature]: Adding traceback for error in background worker (#385)

Signed-off-by: Divyansh Singhvi <divyanshsinghvi@gmail.com>
This commit is contained in:
dsinghvi authored and GitHub committed 2025-12-22 13:21:53 +13:00
1 parent 97a5860681
commit 92c20afdc1
2 files changed
+8 -2

No files matched your search

+5 -2
View File
@@ -350,11 +350,14 @@ class OmniLLM:
made_progress = True
req_id = result.get("request_id")
if "error" in result:
error_msg = result.get("error", "Unknown error")
error_tb = result.get("error_tb", "")
logger.error(
"Stage %s error on request %s: %s",
"Stage %s error on request %s: %s\n%s",
stage_id,
req_id,
result["error"],
error_msg,
error_tb,
)
continue
+3
View File
@@ -17,6 +17,7 @@ import logging
import multiprocessing as mp
import os
import sys
import traceback
from typing import Any
from vllm.inputs import TextPrompt
@@ -857,12 +858,14 @@ def _stage_worker(
)
except Exception as e:
_logging.getLogger(__name__).exception("[Stage-%s] Failed on batch %s: %s", stage_id, batch_request_ids, e)
_tb = traceback.format_exc()
for rid in batch_request_ids:
out_q.put(
{
"request_id": rid,
"stage_id": stage_id,
"error": str(e),
"error_tb": _tb,
}
)