Skip to content

Commit 82fa186

Browse files
committed
fix style
Signed-off-by: ariG23498 <[email protected]>
1 parent 5bae64d commit 82fa186

File tree

1 file changed

+16
-12
lines changed

1 file changed

+16
-12
lines changed
Lines changed: 16 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,36 +1,40 @@
1-
from vllm.config import ModelConfig
1+
# SPDX-License-Identifier: Apache-2.0
2+
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
3+
import pytest
4+
25
from vllm.assets.image import ImageAsset
6+
from vllm.config import ModelConfig
37
from vllm.multimodal import MULTIMODAL_REGISTRY
4-
import pytest
58

69

7-
@pytest.mark.parametrize("model_id",[
8-
"llava-hf/llava-onevision-qwen2-0.5b-ov-hf"
9-
])
10+
# yapf: disable
11+
@pytest.mark.parametrize("model_id",
12+
["llava-hf/llava-onevision-qwen2-0.5b-ov-hf"])
1013
def test_multimodal_processor(model_id):
1114
model_config = ModelConfig(
1215
model=model_id,
1316
model_impl="transformers",
1417
)
1518

16-
mm_processor = MULTIMODAL_REGISTRY.create_processor(
17-
model_config,
18-
)
19+
mm_processor = MULTIMODAL_REGISTRY.create_processor(model_config, )
1920

2021
image_pil = ImageAsset('cherry_blossom').pil_image
2122
mm_data = {"image": image_pil}
22-
str_prompt = "<|im_start|>user <image>\nWhat is the content of this image?<|im_end|><|im_start|>assistant\n"
23+
str_prompt = "<|im_start|>user <image>\nWhat is the content of this image?<|im_end|><|im_start|>assistant\n" # noqa: E501
2324
str_processed_inputs = mm_processor.apply(
2425
prompt=str_prompt,
2526
mm_data=mm_data,
26-
hf_processor_mm_kwargs = {},
27+
hf_processor_mm_kwargs={},
2728
)
2829

29-
ids_prompt = [151644, 872, 220, 151646, 198, 3838, 374, 279, 2213, 315, 419, 2168, 30, 151645, 151644, 77091, 198]
30+
ids_prompt = [
31+
151644, 872, 220, 151646, 198, 3838, 374, 279, 2213, 315, 419, 2168,
32+
30, 151645, 151644, 77091, 198
33+
]
3034
ids_processed_inputs = mm_processor.apply(
3135
prompt=ids_prompt,
3236
mm_data=mm_data,
33-
hf_processor_mm_kwargs = {},
37+
hf_processor_mm_kwargs={},
3438
)
3539

3640
assert str_processed_inputs["prompt"] == ids_processed_inputs["prompt"]

0 commit comments

Comments
 (0)