Skip to content

Commit 349db64

Browse files
committed
Using formatted string since warning_once does not accept formatting string
Signed-off-by: Gregory Shtrasberg <Gregory.Shtrasberg@amd.com>
1 parent 0bfac91 commit 349db64

File tree

1 file changed

+6
-5
lines changed

1 file changed

+6
-5
lines changed

vllm/multimodal/profiling.py

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -216,17 +216,18 @@ def get_encoder_dummy_data(
216216
# Encoder-decoder multimodal models only support v0
217217
if total_len > seq_len:
218218
# `max_num_batched_tokens` is defined by `SchedulerConfig`
219-
logger.warning(
219+
logger.warning_once(
220220
"The encoder sequence length used for profiling ("
221-
"max_num_batched_tokens / max_num_seqs = %d) is too short "
221+
f"max_num_batched_tokens / max_num_seqs = {seq_len}) "
222+
" is too short "
222223
"to hold the multi-modal embeddings in the worst case "
223-
"(%d tokens in total, out of which %s are reserved for "
224+
f"({total_len} tokens in total, out of which "
225+
f"{total_placeholders_by_modality} are reserved for "
224226
"multi-modal embeddings). This may cause certain "
225227
"multi-modal inputs to fail during inference, even when "
226228
"the input text is short. To avoid this, you should "
227229
"increase `max_model_len`, reduce `max_num_seqs`, "
228-
"and/or reduce `mm_counts`.", seq_len, total_len,
229-
total_placeholders_by_modality)
230+
"and/or reduce `mm_counts`.")
230231

231232
processor = cast(EncDecMultiModalProcessor, self.processor)
232233
if processor.pad_dummy_encoder_prompt:

0 commit comments

Comments
 (0)