[Misc] Rename MultiModalInputsV2 -> MultiModalInputs (#12244)
Signed-off-by: DarkLight1337 <tlleungac@connect.ust.hk>
This commit is contained in:
@@ -491,7 +491,7 @@ A dictionary containing placeholder ranges for each modality.
|
||||
"""
|
||||
|
||||
|
||||
class MultiModalInputsV2(TypedDict):
|
||||
class MultiModalInputs(TypedDict):
|
||||
"""
|
||||
Represents the outputs of
|
||||
:class:`vllm.multimodal.processing.BaseMultiModalProcessor`,
|
||||
|
||||
@@ -18,8 +18,8 @@ from vllm.utils import LRUCache, flatten_2d_lists, full_groupby
|
||||
|
||||
from .hasher import MultiModalHasher
|
||||
from .inputs import (MultiModalDataDict, MultiModalFieldConfig,
|
||||
MultiModalInputsV2, MultiModalKwargs,
|
||||
MultiModalKwargsItem, PlaceholderRange)
|
||||
MultiModalInputs, MultiModalKwargs, MultiModalKwargsItem,
|
||||
PlaceholderRange)
|
||||
from .parse import MultiModalDataItems, MultiModalDataParser
|
||||
|
||||
if TYPE_CHECKING:
|
||||
@@ -609,7 +609,7 @@ class BaseMultiModalProcessor(ABC, Generic[_I]):
|
||||
prompt: str,
|
||||
mm_data: MultiModalDataDict,
|
||||
hf_processor_mm_kwargs: Mapping[str, object],
|
||||
) -> MultiModalInputsV2:
|
||||
) -> MultiModalInputs:
|
||||
return self.apply(prompt, mm_data, hf_processor_mm_kwargs)
|
||||
|
||||
def _get_data_parser(self) -> MultiModalDataParser:
|
||||
@@ -1067,7 +1067,7 @@ class BaseMultiModalProcessor(ABC, Generic[_I]):
|
||||
prompt: Union[str, list[int]],
|
||||
mm_data: MultiModalDataDict,
|
||||
hf_processor_mm_kwargs: Mapping[str, object],
|
||||
) -> MultiModalInputsV2:
|
||||
) -> MultiModalInputs:
|
||||
"""
|
||||
Process multi-modal inputs to be used in vLLM.
|
||||
|
||||
@@ -1169,7 +1169,7 @@ class BaseMultiModalProcessor(ABC, Generic[_I]):
|
||||
for modality, placeholders in mm_placeholders.items()
|
||||
}
|
||||
|
||||
return MultiModalInputsV2(
|
||||
return MultiModalInputs(
|
||||
type="multimodal",
|
||||
prompt=prompt,
|
||||
prompt_token_ids=prompt_ids,
|
||||
|
||||
@@ -11,7 +11,7 @@ import vllm.envs as envs
|
||||
from vllm.inputs import DummyData
|
||||
from vllm.logger import init_logger
|
||||
|
||||
from .inputs import MultiModalDataDict, MultiModalInputsV2
|
||||
from .inputs import MultiModalDataDict, MultiModalInputs
|
||||
from .processing import BaseMultiModalProcessor, BaseProcessingInfo
|
||||
|
||||
logger = init_logger(__name__)
|
||||
@@ -131,7 +131,7 @@ class MultiModalProfiler(Generic[_I]):
|
||||
self,
|
||||
seq_len: int,
|
||||
mm_counts: Mapping[str, int],
|
||||
) -> MultiModalInputsV2:
|
||||
) -> MultiModalInputs:
|
||||
factory = self.dummy_inputs
|
||||
processor_inputs = factory.get_dummy_processor_inputs(
|
||||
seq_len, mm_counts)
|
||||
|
||||
Reference in New Issue
Block a user