[BugFix] Don't catch BaseException when dumping execute_model errors (#19626)
Signed-off-by: Nick Hill <nhill@redhat.com>
This commit is contained in:
@@ -59,27 +59,23 @@ def dump_engine_exception(config: VllmConfig,
|
||||
scheduler_stats: Optional[SchedulerStats]):
|
||||
# NOTE: ensure we can log extra info without risking raises
|
||||
# unexpected errors during logging
|
||||
with contextlib.suppress(BaseException):
|
||||
with contextlib.suppress(Exception):
|
||||
_dump_engine_exception(config, scheduler_output, scheduler_stats)
|
||||
|
||||
|
||||
def _dump_engine_exception(config: VllmConfig,
|
||||
scheduler_output: SchedulerOutput,
|
||||
scheduler_stats: Optional[SchedulerStats]):
|
||||
logger.error("Dumping input data")
|
||||
|
||||
logger.error(
|
||||
"V1 LLM engine (v%s) with config: %s, ",
|
||||
"Dumping input data for V1 LLM engine (v%s) with config: %s, ",
|
||||
VLLM_VERSION,
|
||||
config,
|
||||
)
|
||||
|
||||
try:
|
||||
dump_obj = prepare_object_to_dump(scheduler_output)
|
||||
logger.error("Dumping scheduler output for model execution:")
|
||||
logger.error(dump_obj)
|
||||
logger.error("Dumping scheduler output for model execution: %s",
|
||||
dump_obj)
|
||||
if scheduler_stats:
|
||||
logger.error(scheduler_stats)
|
||||
except BaseException as exception:
|
||||
logger.error("Error preparing object to dump")
|
||||
logger.error(repr(exception))
|
||||
logger.error("Dumping scheduler stats: %s", scheduler_stats)
|
||||
except Exception:
|
||||
logger.exception("Error preparing object to dump")
|
||||
|
||||
Reference in New Issue
Block a user