Skip to content

Commit 7f2c1a8

Browse files
[Deprecation] Require overriding get_dummy_text and get_dummy_mm_data (#18796)
Signed-off-by: DarkLight1337 <[email protected]>
1 parent b78f844 commit 7f2c1a8

File tree

1 file changed

+4
-20
lines changed

1 file changed

+4
-20
lines changed

vllm/multimodal/profiling.py

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
# SPDX-License-Identifier: Apache-2.0
2-
3-
from abc import ABC
2+
from abc import ABC, abstractmethod
43
from collections.abc import Mapping
54
from dataclasses import dataclass, field
65
from typing import Generic, NamedTuple, Optional, TypeVar, Union, cast
@@ -60,29 +59,14 @@ def __init__(self, info: _I) -> None:
6059

6160
self.info = info
6261

63-
# TODO: @abstractmethod after transition
62+
@abstractmethod
6463
def get_dummy_text(self, mm_counts: Mapping[str, int]) -> str:
6564
"""
6665
Build the text input corresponding to `mm_counts`.
6766
"""
68-
if (type(self).get_dummy_processor_inputs ==
69-
BaseDummyInputsBuilder.get_dummy_processor_inputs):
70-
raise NotImplementedError
71-
72-
logger.warning_once("`get_dummy_processor_inputs` has been split up "
73-
"into `get_dummy_text` and `get_dummy_mm_data`. "
74-
"These two methods will be marked as abstract "
75-
"in an upcoming release.")
76-
77-
seq_len = self.info.ctx.model_config.max_model_len
78-
79-
prompt = self.get_dummy_processor_inputs(seq_len, mm_counts).prompt
80-
if not isinstance(prompt, str):
81-
prompt = self.info.get_tokenizer().decode(prompt)
82-
83-
return prompt
67+
raise NotImplementedError
8468

85-
# TODO: @abstractmethod after transition
69+
@abstractmethod
8670
def get_dummy_mm_data(
8771
self,
8872
seq_len: int,

0 commit comments

Comments
 (0)