[CI/Build] Avoid duplicate runner startup for multimodal test (#52417)

Signed-off-by: Isotr0py <Isotr0py@outlook.com>
This commit is contained in:
Isotr0py
2026-08-16 22:17:25 +00:00
committed by GitHub
parent 6b0b850a8b
commit e3c1cb54fc
5 changed files with 77 additions and 93 deletions
@@ -66,6 +66,11 @@ def vllm_to_hf_output(
target_dtype = "half"
IMAGE_SIZE_FACTOR_GROUPS = (
(1.0,),
(1.0, 1.0, 1.0),
(0.25, 0.5, 1.0),
)
def run_test(
@@ -167,17 +172,6 @@ def run_test(
@pytest.mark.parametrize("model", models)
@pytest.mark.parametrize(
"size_factors",
[
# Single-scale
[1.0],
# Single-scale, batched
[1.0, 1.0, 1.0],
# Multi-scale
[0.25, 0.5, 1.0],
],
)
@pytest.mark.parametrize("dtype", [target_dtype])
@pytest.mark.parametrize("max_model_len", [12800])
@pytest.mark.parametrize("max_tokens", [128])
@@ -187,7 +181,6 @@ def test_models(
vllm_runner,
image_assets,
model,
size_factors,
dtype: str,
max_model_len: int,
max_tokens: int,
@@ -201,6 +194,7 @@ def test_models(
[rescale_image_size(image, factor) for factor in size_factors],
None,
)
for size_factors in IMAGE_SIZE_FACTOR_GROUPS
for image, prompt in zip(images, HF_IMAGE_PROMPTS)
]
@@ -220,19 +214,6 @@ def test_models(
@large_gpu_test(min_gb=48)
@pytest.mark.parametrize("model", models)
@pytest.mark.parametrize(
"size_factors",
[
# No image
# [],
# Single-scale
[1.0],
# Single-scale, batched
[1.0, 1.0, 1.0],
# Multi-scale
[0.25, 0.5, 1.0],
],
)
@pytest.mark.parametrize("dtype", [target_dtype])
@pytest.mark.parametrize("max_model_len", [25600])
@pytest.mark.parametrize("max_tokens", [128])
@@ -242,7 +223,6 @@ def test_multi_images_models(
vllm_runner,
image_assets,
model,
size_factors,
dtype: str,
max_model_len: int,
max_tokens: int,
@@ -258,7 +238,8 @@ def test_multi_images_models(
for factor in size_factors
],
None,
),
)
for size_factors in IMAGE_SIZE_FACTOR_GROUPS
]
run_test(