Unverified Commit 97fee502 authored by Chia-Wei's avatar Chia-Wei Committed by GitHub
Browse files

fix: fail fast custom template not found & more verbose vllm engine error (#3278)


Signed-off-by: default avatarChia-Wei Chen <cchen562@wisc.edu>
parent cacac9b9
......@@ -156,6 +156,20 @@ def parse_args() -> Config:
config.tool_call_parser = args.dyn_tool_call_parser
config.reasoning_parser = args.dyn_reasoning_parser
config.custom_jinja_template = args.custom_jinja_template
# Validate custom Jinja template file exists if provided
if config.custom_jinja_template is not None:
# Expand environment variables and user home (~) before validation
expanded_template_path = os.path.expanduser(
os.path.expandvars(config.custom_jinja_template)
)
config.custom_jinja_template = expanded_template_path
if not os.path.isfile(expanded_template_path):
raise FileNotFoundError(
f"Custom Jinja template file not found: {expanded_template_path}. "
f"Please ensure the file exists and the path is correct."
)
# Check for conflicting flags
has_kv_transfer_config = (
hasattr(engine_args, "kv_transfer_config")
......
......@@ -4,6 +4,7 @@
import asyncio
import logging
import os
import traceback
from vllm.v1.engine.async_llm import AsyncLLM
from vllm.v1.engine.exceptions import EngineDeadError
......@@ -49,6 +50,7 @@ class VllmEngineMonitor:
await self.engine_client.check_health()
await asyncio.sleep(HEALTH_CHECK_INTERVAL)
except EngineDeadError as e:
logger.error(f"Traceback: {traceback.format_exc()}")
logger.error(f"vLLM AsyncLLM health check failed: {e}")
logger.warning("Initiating Dynamo Runtime shutdown.")
self.runtime.shutdown()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment