A high-throughput and memory-efficient inference and serving engine for LLMs
Mirrored from https://github.com/tduncan-lum/Nvidia-Optimization-Stack---VLLM.git
Synced Nov 14, 05:30 UTC
[CI/Build] Fix local image inputs in test_pixtral.py (#24401)
Signed-off-by: Chenheli Hua <huachenheli@outlook.com> Co-authored-by: Roger Wang <hey@rogerw.io>
Chenheli Hua committed
Sep 7, 2025 at 20:31 UTC
3bca396f79cf3ba248ee369fe73533255006b2b7
1 file changed
+11
-19
tests/models/multimodal/generation/test_pixtral.py
+11
-19
@@ -187,27 +187,19 @@ def test_chat(vllm_runner, max_model_len: int, model: str, dtype: str,
187
name_1="output")
188
189
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
-
190
@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],
199
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)
203
204
# This placeholder checking test only works with V0 engine
205
# where `multi_modal_placeholders` is returned with `RequestOutput`