2026-03-24 14:49:11 +07:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
|
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
|
|
|
|
|
|
|
|
|
from __future__ import annotations
|
|
|
|
|
|
2026-03-27 13:28:59 +07:00
|
|
|
from contextlib import ExitStack
|
|
|
|
|
|
2026-03-24 14:49:11 +07:00
|
|
|
import pytest
|
|
|
|
|
|
2026-07-29 23:53:03 +08:00
|
|
|
from tests.e2e.features.helpers.custom_pipeline import (
|
2026-05-29 23:39:38 +08:00
|
|
|
QwenImagePipelineWithLogProbForTest,
|
|
|
|
|
)
|
2026-04-20 14:23:42 +08:00
|
|
|
from tests.helpers.mark import hardware_test
|
2026-03-27 13:28:59 +07:00
|
|
|
from vllm_omni.entrypoints.async_omni import AsyncOmni
|
2026-03-24 14:49:11 +07:00
|
|
|
|
2026-05-29 23:39:38 +08:00
|
|
|
CUSTOM_PIPELINE_CLASS = QwenImagePipelineWithLogProbForTest
|
2026-07-29 23:53:03 +08:00
|
|
|
WORKER_EXTENSION_CLASS = "tests.e2e.features.helpers.custom_pipeline.vLLMOmniColocateWorkerExtensionForTest"
|
2026-03-27 13:28:59 +07:00
|
|
|
MODEL = "tiny-random/Qwen-Image"
|
|
|
|
|
|
|
|
|
|
pytestmark = [pytest.mark.core_model]
|
2026-03-24 14:49:11 +07:00
|
|
|
|
|
|
|
|
|
2026-03-27 13:28:59 +07:00
|
|
|
@pytest.mark.diffusion
|
|
|
|
|
@hardware_test(res={"cuda": "L4"}, num_cards=1)
|
|
|
|
|
@pytest.mark.asyncio
|
|
|
|
|
async def test_collective_rpc_test_extension_name():
|
|
|
|
|
with ExitStack() as after:
|
|
|
|
|
engine = AsyncOmni(
|
|
|
|
|
model=MODEL,
|
|
|
|
|
custom_pipeline_args={"pipeline_class": CUSTOM_PIPELINE_CLASS},
|
|
|
|
|
worker_extension_cls=WORKER_EXTENSION_CLASS,
|
|
|
|
|
enforce_eager=True,
|
|
|
|
|
)
|
|
|
|
|
after.callback(engine.shutdown)
|
|
|
|
|
|
|
|
|
|
result = await engine.collective_rpc(method="test_extension_name")
|
|
|
|
|
|
|
|
|
|
assert isinstance(result, list), f"Expected list, got {type(result)}"
|
|
|
|
|
assert result == [["vllm-omni-colocate-worker-extension-for-test"]]
|