Skip to content

Commit e88dc47

Browse files
huachenheliywang96
authored andcommitted
[CI/Build] Fix local image inputs in test_pixtral.py (vllm-project#24401)
Signed-off-by: Chenheli Hua <huachenheli@outlook.com> Co-authored-by: Roger Wang <hey@rogerw.io>
1 parent 47be785 commit e88dc47

File tree

1 file changed

+11
-19
lines changed

1 file changed

+11
-19
lines changed

tests/models/multimodal/generation/test_pixtral.py

Lines changed: 11 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -187,27 +187,19 @@ def test_chat(vllm_runner, max_model_len: int, model: str, dtype: str,
187187
name_1="output")
188188

189189

190-
@pytest.fixture
191-
def prompt(request, local_asset_server) -> TextPrompt:
192-
names = request.param
193-
urls = [local_asset_server.url_for(n) for n in names]
194-
return _create_engine_inputs_hf(urls)
195-
196-
197190
@pytest.mark.parametrize(
198-
"prompt,expected_ranges",
199-
[
200-
pytest.param(IMG_URLS[:1], [PlaceholderRange(offset=11, length=494)]),
201-
pytest.param(IMG_URLS[1:4], [
202-
PlaceholderRange(offset=11, length=266),
203-
PlaceholderRange(offset=277, length=1056),
204-
PlaceholderRange(offset=1333, length=418)
205-
])
206-
],
207-
)
208-
def test_multi_modal_placeholders(vllm_runner, prompt: TextPrompt,
191+
"image_urls,expected_ranges",
192+
[(IMG_URLS[:1], [PlaceholderRange(offset=11, length=494)]),
193+
(IMG_URLS[1:4], [
194+
PlaceholderRange(offset=11, length=266),
195+
PlaceholderRange(offset=277, length=1056),
196+
PlaceholderRange(offset=1333, length=418)
197+
])])
198+
def test_multi_modal_placeholders(vllm_runner, image_urls: list[str],
209199
expected_ranges: list[PlaceholderRange],
210-
monkeypatch) -> None:
200+
local_asset_server, monkeypatch) -> None:
201+
local_image_urls = [local_asset_server.url_for(u) for u in image_urls]
202+
prompt = _create_engine_inputs_hf(local_image_urls)
211203

212204
# This placeholder checking test only works with V0 engine
213205
# where `multi_modal_placeholders` is returned with `RequestOutput`

0 commit comments

Comments
 (0)