[Test] Fix expansion and example test case for qwen3-omni (#1358)

Signed-off-by: yenuo26 <410167048@qq.com>
This commit is contained in:
wangyu authored and GitHub committed 2026-02-15 00:43:38 +13:00
1 parent 75770c9309
commit a42b7487b0
8 files changed
+432 -376

No files matched your search

@@ -12,7 +12,8 @@ from pathlib import Path
import pytest
from tests.conftest import OmniServer, convert_audio_file_to_text, cosine_similarity_text
from tests.conftest import convert_audio_file_to_text, cosine_similarity_text
from tests.utils import hardware_test
models = ["Qwen/Qwen2.5-Omni-7B"]
@@ -21,26 +22,7 @@ stage_configs = [str(Path(__file__).parent.parent.parent / "e2e" / "stage_config
example_dir = str(Path(__file__).parent.parent.parent.parent / "examples" / "online_serving" / "qwen2_5_omni")
# Create parameter combinations for model and stage config
test_params = [(model, stage_config) for model in models for stage_config in stage_configs]
@pytest.fixture(scope="module")
def omni_server(request):
"""Start vLLM-Omni server as a subprocess with actual model weights.
Uses module scope so the server starts only once per test module.
Multi-stage initialization can take 10-20+ minutes.
"""
model, stage_config_path = request.param
print(f"Starting OmniServer with model: {model}")
print("This may take 10-20+ minutes for initialization...")
with OmniServer(
model, ["--stage-configs-path", stage_config_path, "--stage-init-timeout", "120"], port=8091
) as server:
print("OmniServer started successfully")
yield server
print("OmniServer stopped")
test_params = [(8091, model, stage_config) for model in models for stage_config in stage_configs]
def run_cmd(command):
@@ -67,6 +49,9 @@ def extract_content_after_keyword(keywords, text):
return matches[0]
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "L4", "rocm": "MI325"}, num_cards={"cuda": 4, "rocm": 2})
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_send_multimodal_request_001(omni_server) -> None:
command = [
@@ -99,6 +84,9 @@ def test_send_multimodal_request_001(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "L4", "rocm": "MI325"}, num_cards={"cuda": 4, "rocm": 2})
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_send_multimodal_request_002(omni_server) -> None:
command = [
@@ -131,6 +119,9 @@ def test_send_multimodal_request_002(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "L4", "rocm": "MI325"}, num_cards={"cuda": 4, "rocm": 2})
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_send_multimodal_request_003(omni_server) -> None:
command = ["bash", os.path.join(example_dir, "run_curl_multimodal_generation.sh"), "mixed_modalities"]
@@ -151,6 +142,9 @@ def test_send_multimodal_request_003(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "L4", "rocm": "MI325"}, num_cards={"cuda": 4, "rocm": 2})
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_modality_control_001(omni_server) -> None:
command = [
@@ -178,6 +172,9 @@ def test_modality_control_001(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "L4", "rocm": "MI325"}, num_cards={"cuda": 4, "rocm": 2})
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_modality_control_002(omni_server) -> None:
command = [
@@ -203,6 +200,9 @@ def test_modality_control_002(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "L4", "rocm": "MI325"}, num_cards={"cuda": 4, "rocm": 2})
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_modality_control_003(omni_server) -> None:
command = [
@@ -237,6 +237,9 @@ def test_modality_control_003(omni_server) -> None:
@pytest.mark.skip(reason="There is a known issue with stream error.")
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "L4", "rocm": "MI325"}, num_cards={"cuda": 4, "rocm": 2})
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_stream_001(omni_server) -> None:
command = [
@@ -12,7 +12,8 @@ from pathlib import Path
import pytest
from tests.conftest import OmniServer, convert_audio_file_to_text, cosine_similarity_text
from tests.conftest import convert_audio_file_to_text, cosine_similarity_text
from tests.utils import hardware_test
models = ["Qwen/Qwen3-Omni-30B-A3B-Instruct"]
@@ -21,26 +22,7 @@ stage_configs = [str(Path(__file__).parent.parent.parent / "e2e" / "stage_config
example_dir = str(Path(__file__).parent.parent.parent.parent / "examples" / "online_serving" / "qwen3_omni")
# Create parameter combinations for model and stage config
test_params = [(model, stage_config) for model in models for stage_config in stage_configs]
@pytest.fixture(scope="module")
def omni_server(request):
"""Start vLLM-Omni server as a subprocess with actual model weights.
Uses module scope so the server starts only once per test module..
Multi-stage initialization can take 10-20+ minutes.
"""
model, stage_config_path = request.param
print(f"Starting OmniServer with model: {model}")
print("This may take 10-20+ minutes for initialization...")
with OmniServer(
model, ["--stage-configs-path", stage_config_path, "--stage-init-timeout", "120"], port=8091
) as server:
print("OmniServer started successfully")
yield server
print("OmniServer stopped")
test_params = [(8091, model, stage_config) for model in models for stage_config in stage_configs]
def run_cmd(command):
@@ -67,6 +49,9 @@ def extract_content_after_keyword(keywords, text):
return matches[0]
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "H100", "rocm": "MI325"}, num_cards=2)
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_send_multimodal_request_001(omni_server) -> None:
command = [
@@ -92,6 +77,9 @@ def test_send_multimodal_request_001(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "H100", "rocm": "MI325"}, num_cards=2)
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_send_multimodal_request_002(omni_server) -> None:
command = [
@@ -120,6 +108,9 @@ def test_send_multimodal_request_002(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "H100", "rocm": "MI325"}, num_cards=2)
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_send_multimodal_request_003(omni_server) -> None:
command = ["bash", os.path.join(example_dir, "run_curl_multimodal_generation.sh"), "use_image"]
@@ -134,6 +125,9 @@ def test_send_multimodal_request_003(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "H100", "rocm": "MI325"}, num_cards=2)
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_modality_control_001(omni_server) -> None:
command = [
@@ -155,6 +149,9 @@ def test_modality_control_001(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "H100", "rocm": "MI325"}, num_cards=2)
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_modality_control_002(omni_server) -> None:
command = [
@@ -175,6 +172,9 @@ def test_modality_control_002(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "H100", "rocm": "MI325"}, num_cards=2)
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_modality_control_003(omni_server) -> None:
command = [
@@ -202,6 +202,9 @@ def test_modality_control_003(omni_server) -> None:
# TODO: Verify the E2E latency after confirmation baseline.
@pytest.mark.advanced_model
@pytest.mark.omni
@hardware_test(res={"cuda": "H100", "rocm": "MI325"}, num_cards=2)
@pytest.mark.parametrize("omni_server", test_params, indirect=True)
def test_stream_001(omni_server) -> None:
command = [