[Config Refactor][2/N] Pipeline + Deploy Config Schema (#2383)
Signed-off-by: lishunyang <lishunyang12@163.com> Signed-off-by: reidliu41 <reid201711@gmail.com> Signed-off-by: Alex Brooks <albrooks@redhat.com> Co-authored-by: reidliu41 <reid201711@gmail.com> Co-authored-by: xiaohajiayou <75477391+xiaohajiayou@users.noreply.github.com> Co-authored-by: Alex Brooks <albrooks@redhat.com> Co-authored-by: Hongsheng Liu <liuhongsheng4@huawei.com>
This commit is contained in:
104 files changed
+3959
-3814
No files matched your search
@@ -39,21 +39,28 @@ def test_default_stage_id_is_concrete_int():
|
||||
assert cfg.stage_id == 0
|
||||
|
||||
|
||||
def test_multimodal_kwarg_overrides():
|
||||
def test_multimodal_kwarg_overrides(mocker):
|
||||
"""Ensure that overrides in the multimodal config are preserved."""
|
||||
# Get a different value than the default for a multimodal field
|
||||
sig = inspect.signature(OmniEngineArgs)
|
||||
default_mm_cache = sig.parameters["mm_processor_cache_gb"].default
|
||||
override_val = default_mm_cache + 1
|
||||
|
||||
# NOTE: This needs to be a model that resolves to supports_multimodal=True
|
||||
# in vLLM, otherwise we won't have an MM config
|
||||
fake_model_config = SimpleNamespace(
|
||||
multimodal_config=SimpleNamespace(mm_processor_cache_gb=override_val),
|
||||
)
|
||||
|
||||
def _fake_parent_create_model_config(self):
|
||||
assert self.mm_processor_cache_gb == override_val
|
||||
return fake_model_config
|
||||
|
||||
mocker.patch.object(EngineArgs, "create_model_config", _fake_parent_create_model_config)
|
||||
mocker.patch.object(OmniModelConfig, "from_vllm_model_config", side_effect=lambda model_config, **_: model_config)
|
||||
|
||||
cfg = OmniEngineArgs(
|
||||
model="Qwen/Qwen2-VL-2B-Instruct",
|
||||
mm_processor_cache_gb=override_val,
|
||||
).create_model_config()
|
||||
|
||||
# Ensure that the override was applied correctly
|
||||
assert cfg.multimodal_config is not None
|
||||
assert cfg.multimodal_config.mm_processor_cache_gb == override_val
|
||||
|
||||
|
||||
@@ -2,20 +2,24 @@ import asyncio
|
||||
import os
|
||||
import sys
|
||||
from contextlib import ExitStack
|
||||
from pathlib import Path
|
||||
|
||||
import pytest
|
||||
from vllm import SamplingParams
|
||||
from vllm.inputs import PromptType
|
||||
|
||||
from tests.utils import hardware_test
|
||||
# Side-effect import: registers QWEN2_5_OMNI_THINKER_ONLY_PIPELINE in the
|
||||
# pipeline registry so the materialized deploy overlay below can select it
|
||||
# via its top-level ``pipeline:`` field.
|
||||
import vllm_omni.model_executor.models.qwen2_5_omni.pipeline # noqa: F401, E402
|
||||
from tests.utils import get_deploy_config_path, hardware_test
|
||||
from vllm_omni.entrypoints.async_omni import AsyncOmni
|
||||
|
||||
os.environ["VLLM_WORKER_MULTIPROC_METHOD"] = "spawn"
|
||||
|
||||
SEED = 42
|
||||
|
||||
stage_config = str(Path(__file__).parent.parent / "e2e" / "stage_configs" / "qwen2_5_omni_thinker_ci.yaml")
|
||||
# Single-stage thinker-only deploy, materialized from tests.utils._CI_OVERLAYS.
|
||||
stage_config = get_deploy_config_path("ci/qwen2_5_omni_thinker_only.yaml")
|
||||
model = "Qwen/Qwen2.5-Omni-7B"
|
||||
|
||||
|
||||
|
||||
Reference in new issue
Block a user