Unverified Commit 5467d137 authored by Cyrus Leung's avatar Cyrus Leung Committed by GitHub
Browse files

[Frontend] Avoid startup error log for models without chat template (#37040)


Signed-off-by: default avatarDarkLight1337 <tlleungac@connect.ust.hk>
parent 3ed46f37
...@@ -176,6 +176,8 @@ class BaseRenderer(ABC, Generic[_T]): ...@@ -176,6 +176,8 @@ class BaseRenderer(ABC, Generic[_T]):
For multi-modal requests: For multi-modal requests:
- Importing libraries such as librosa triggers JIT compilation. - Importing libraries such as librosa triggers JIT compilation.
""" """
from vllm.entrypoints.chat_utils import ChatTemplateResolutionError
try: try:
logger.info("Warming up chat template processing...") logger.info("Warming up chat template processing...")
start_time = time.perf_counter() start_time = time.perf_counter()
...@@ -184,6 +186,8 @@ class BaseRenderer(ABC, Generic[_T]): ...@@ -184,6 +186,8 @@ class BaseRenderer(ABC, Generic[_T]):
elapsed = time.perf_counter() - start_time elapsed = time.perf_counter() - start_time
logger.info("Chat template warmup completed in %.3fs", elapsed) logger.info("Chat template warmup completed in %.3fs", elapsed)
except ChatTemplateResolutionError:
logger.info("This model does not support chat template.")
except Exception: except Exception:
logger.exception("Chat template warmup failed") logger.exception("Chat template warmup failed")
......
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