Unverified Commit 98b8b3ab authored by Ning Xie's avatar Ning Xie Committed by GitHub
Browse files

[log] enable max_log_len trim only when needed (#31482)


Signed-off-by: default avatarAndy Xie <andy.xning@gmail.com>
parent 346e5645
# SPDX-License-Identifier: Apache-2.0
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
import logging
from collections.abc import Sequence
import torch
......@@ -26,6 +27,7 @@ class RequestLogger:
params: SamplingParams | PoolingParams | BeamSearchParams | None,
lora_request: LoRARequest | None,
) -> None:
if logger.isEnabledFor(logging.DEBUG):
max_log_len = self.max_log_len
if max_log_len is not None:
if prompt is not None:
......
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