[CI] Reducing mithril-h100-pool in ready&merge CI, optimize ready CI duration (#4354)
Signed-off-by: [Your Name] <your.email@example.com> Signed-off-by: wangyu <410167048@qq.com> Signed-off-by: wangyu <53896905+yenuo26@users.noreply.github.com> Signed-off-by: Hongsheng Liu <liuhongsheng4@huawei.com> Signed-off-by: [Your Name] <[Your Email]> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
1 parent
e4026a50ad
commit
7619ed6b82
84 files changed
+1718
-2428
No files matched your search
@@ -29,7 +29,7 @@ class TestOpenAIAudioListEndpoints:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
def test_list_voices_endpoint(self, omni_server) -> None:
|
||||
"""``GET /v1/audio/voices`` returns a non-empty ``voices`` list."""
|
||||
url = f"http://{omni_server.host}:{omni_server.port}/v1/audio/voices"
|
||||
@@ -45,7 +45,7 @@ class TestOpenAIAudioListEndpoints:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
def test_models_endpoint(self, omni_server) -> None:
|
||||
"""``GET /v1/models`` returns at least one model."""
|
||||
url = f"http://{omni_server.host}:{omni_server.port}/v1/models"
|
||||
|
||||
@@ -214,27 +214,6 @@ def _assert_realtime_accuracy(result: dict) -> None:
|
||||
|
||||
|
||||
class TestQwen3OmniRealtimeWebSocket:
|
||||
@pytest.mark.core_model
|
||||
@pytest.mark.omni
|
||||
@hardware_test(res={"cuda": "H100", "rocm": "MI325"}, num_cards=2)
|
||||
@pytest.mark.parametrize("omni_server", realtime_async_chunk_server_params, indirect=True)
|
||||
def test_streaming_audio_input_pcm_output_async_chunk_smoke(self, omni_server) -> None:
|
||||
"""Ready CI: async_chunk on, no send delay, smoke only."""
|
||||
pcm16 = _synthetic_pcm16_input()
|
||||
|
||||
result = asyncio.run(
|
||||
_run_realtime_audio_roundtrip(
|
||||
omni_server.host,
|
||||
omni_server.port,
|
||||
omni_server.model,
|
||||
pcm16,
|
||||
chunk_ms=100,
|
||||
send_delay_ms=0,
|
||||
)
|
||||
)
|
||||
|
||||
_assert_realtime_smoke(result)
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.omni
|
||||
@hardware_test(res={"cuda": "H100", "rocm": "MI325"}, num_cards=2)
|
||||
|
||||
@@ -125,7 +125,7 @@ class TestSpeechBatchE2E:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.parametrize("omni_server", default_server_params, indirect=True)
|
||||
def test_batch_single_item(self, omni_server) -> None:
|
||||
"""Batch with a single item works correctly."""
|
||||
@@ -147,7 +147,7 @@ class TestSpeechBatchE2E:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.parametrize("omni_server", default_server_params, indirect=True)
|
||||
def test_batch_per_item_voice_override(self, omni_server) -> None:
|
||||
"""Per-item voice overrides the batch-level default."""
|
||||
@@ -175,7 +175,7 @@ class TestSpeechBatchE2E:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.parametrize("omni_server", default_server_params, indirect=True)
|
||||
def test_batch_multiple_languages(self, omni_server) -> None:
|
||||
"""Batch items with different languages per item."""
|
||||
@@ -200,7 +200,7 @@ class TestSpeechBatchE2E:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.parametrize("omni_server", default_server_params, indirect=True)
|
||||
def test_batch_whisper_transcription(self, omni_server) -> None:
|
||||
"""Whisper transcription of batch output matches input text."""
|
||||
@@ -235,7 +235,7 @@ class TestSpeechBatchE2E:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.parametrize("omni_server", default_server_params, indirect=True)
|
||||
def test_batch_result_indices_ordered(self, omni_server) -> None:
|
||||
"""Result indices match the input item order."""
|
||||
@@ -262,7 +262,7 @@ class TestSpeechBatchValidation:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.parametrize("omni_server", default_server_params, indirect=True)
|
||||
def test_batch_empty_items_rejected(self, omni_server) -> None:
|
||||
"""Empty items list returns a 4xx error."""
|
||||
@@ -276,7 +276,7 @@ class TestSpeechBatchValidation:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.parametrize("omni_server", default_server_params, indirect=True)
|
||||
def test_batch_exceeds_max_items(self, omni_server) -> None:
|
||||
"""Batch exceeding 32 items returns 400 error."""
|
||||
@@ -334,7 +334,7 @@ class TestSpeechBatchSize2:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.parametrize("omni_server", batch2_server_params, indirect=True)
|
||||
def test_batch2_produces_valid_audio(self, omni_server) -> None:
|
||||
"""Batch of 2 items with batched engine produces valid audio."""
|
||||
@@ -371,7 +371,7 @@ class TestSpeechBatchSize2:
|
||||
|
||||
@pytest.mark.advanced_model
|
||||
@pytest.mark.tts
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.parametrize("omni_server", batch2_server_params, indirect=True)
|
||||
def test_batch2_vs_sequential_timing(self, omni_server) -> None:
|
||||
"""Compare batch-of-2 vs 2 sequential single requests.
|
||||
|
||||
@@ -272,69 +272,72 @@ def test_output_kind_is_preserved_with_explicit_sampling_params(output_kind):
|
||||
# End to end tests for ensuring internal manipulation of request ID
|
||||
# in diffusion / Omni models don't leak back to the user.
|
||||
#
|
||||
# NOTE: It seems like we currently need the shutdowns here, otherwise
|
||||
# running the tests sequentially seems to leave a zombie process in diffusion
|
||||
# that can OOM the Omni tests.
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.omni
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize(
|
||||
"req_id",
|
||||
["my-req-1", "img_gen-abc123", "chatcmpl-xyz"],
|
||||
ids=["plain", "prefixed-img", "prefixed-chat"],
|
||||
)
|
||||
async def test_diffusion_generate_preserves_request_id(req_id):
|
||||
"""Ensure diffusion model requests don't leak internal UUID-suffixed req id back to user."""
|
||||
engine = AsyncOmni(model=DIFFUSION_MODEL)
|
||||
try:
|
||||
async for output in engine.generate("a white cat", request_id=req_id):
|
||||
assert output.request_id == req_id
|
||||
finally:
|
||||
engine.shutdown()
|
||||
# One AsyncOmni per test function (all cases in a single asyncio loop) to avoid
|
||||
# repeated cold starts. Do not use class/module-scoped engine fixtures here:
|
||||
# pytest-asyncio uses a function-scoped event loop by default, so reusing an
|
||||
# engine across tests can hang on the second generate() call.
|
||||
|
||||
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@pytest.mark.omni
|
||||
@pytest.mark.asyncio
|
||||
@pytest.mark.parametrize(
|
||||
"req_id",
|
||||
["my-req-1", "img_gen-abc123", "chatcmpl-xyz"],
|
||||
ids=["plain", "prefixed-img", "prefixed-chat"],
|
||||
)
|
||||
async def test_omni_generate_preserves_request_id(req_id):
|
||||
"""Ensure omni model requests don't leak internal UUID-suffixed req id back to user."""
|
||||
engine = AsyncOmni(model=OMNI_MODEL, stage_configs_path=OMNI_STAGE_CONFIG)
|
||||
try:
|
||||
async for output in engine.generate(
|
||||
"Say hello in one word.",
|
||||
request_id=req_id,
|
||||
output_modalities=["text"],
|
||||
):
|
||||
assert output.request_id == req_id
|
||||
finally:
|
||||
engine.shutdown()
|
||||
# Covers:
|
||||
# * plain client ids (``my-req-1``)
|
||||
# * OpenAI-style prefixed ids (``img_gen-*``, ``chatcmpl-*``) that AsyncOmni
|
||||
# suffixes internally for engine routing — streamed outputs must still echo
|
||||
# the caller-visible id, not the internal UUID-suffixed id
|
||||
# * empty ``request_id`` — server assigns a non-empty id for the caller
|
||||
_DIFFUSION_REQ_IDS = ["my-req-1", "img_gen-abc123", "chatcmpl-xyz"]
|
||||
_OMNI_REQ_IDS = ["my-req-1", "img_gen-abc123", "chatcmpl-xyz"]
|
||||
|
||||
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.omni
|
||||
@pytest.mark.asyncio
|
||||
async def test_diffusion_generate_empty_request_id():
|
||||
"""Empty request_id should get a generated internal ID, not stay empty (diffusion)"""
|
||||
async def test_diffusion_generate_request_id():
|
||||
"""Diffusion E2E request-id contract (``riverclouds/qwen_image_random``).
|
||||
|
||||
Scenarios (one engine, sequential ``generate`` calls):
|
||||
- plain id ``my-req-1``
|
||||
- image-style prefix ``img_gen-abc123``
|
||||
- chat-style prefix ``chatcmpl-xyz``
|
||||
- empty ``request_id`` → output id is non-empty (auto-assigned)
|
||||
|
||||
Each streaming output must expose the user-supplied id unchanged; internal
|
||||
UUID suffixing must not leak into ``output.request_id``.
|
||||
"""
|
||||
engine = AsyncOmni(model=DIFFUSION_MODEL)
|
||||
try:
|
||||
for req_id in _DIFFUSION_REQ_IDS:
|
||||
async for output in engine.generate("a white cat", request_id=req_id):
|
||||
assert output.request_id == req_id
|
||||
async for output in engine.generate("a white cat", request_id=""):
|
||||
assert output.request_id != ""
|
||||
finally:
|
||||
engine.shutdown()
|
||||
|
||||
|
||||
@hardware_test(res={"cuda": "H100"}, num_cards=1)
|
||||
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
||||
@pytest.mark.omni
|
||||
@pytest.mark.asyncio
|
||||
async def test_omni_generate_empty_request_id():
|
||||
"""Empty request_id should get a generated internal ID, not stay empty (omni)"""
|
||||
async def test_omni_generate_request_id():
|
||||
"""Omni E2E request-id contract (``Qwen/Qwen2.5-Omni-7B``, thinker-only stage).
|
||||
|
||||
Same scenarios as ``test_diffusion_generate_request_id``:
|
||||
- plain id ``my-req-1``
|
||||
- image-style prefix ``img_gen-abc123``
|
||||
- chat-style prefix ``chatcmpl-xyz``
|
||||
- empty ``request_id`` → output id is non-empty (auto-assigned)
|
||||
|
||||
Text modality only; asserts caller-visible ids are preserved across the
|
||||
multi-stage orchestrator path on H100.
|
||||
"""
|
||||
engine = AsyncOmni(model=OMNI_MODEL, stage_configs_path=OMNI_STAGE_CONFIG)
|
||||
try:
|
||||
for req_id in _OMNI_REQ_IDS:
|
||||
async for output in engine.generate(
|
||||
"Say hello in one word.",
|
||||
request_id=req_id,
|
||||
output_modalities=["text"],
|
||||
):
|
||||
assert output.request_id == req_id
|
||||
async for output in engine.generate(
|
||||
"Say hello in one word.",
|
||||
request_id="",
|
||||
|
||||
Reference in new issue
Block a user