[ModelRunner V2] Update scheduler tests to cover MRV2 paths (#46771)

Signed-off-by: Nick Hill <nickhill123@gmail.com>
This commit is contained in:
Nick Hill
2026-06-26 09:36:31 -07:00
committed by GitHub
parent abc71548ef
commit 658b54efe4
2 changed files with 53 additions and 18 deletions
+7 -1
View File
@@ -3,6 +3,7 @@
import torch
import vllm.envs as envs
from tests.v1.kv_connector.unit.utils import MockKVConfig
from vllm.config import (
CacheConfig,
@@ -58,6 +59,7 @@ def create_scheduler(
pipeline_parallel_size: int = 1,
use_ec_connector: bool = False,
ec_role: str | None = None,
use_v2_model_runner: bool | None = None,
) -> Scheduler | AsyncScheduler:
"""Create scheduler under test.
@@ -165,13 +167,17 @@ def create_scheduler(
cache_config.num_gpu_blocks = num_blocks
register_all_kvcache_specs(vllm_config)
scheduler_cls = AsyncScheduler if async_scheduling else Scheduler
return scheduler_cls(
scheduler = scheduler_cls(
vllm_config=vllm_config,
kv_cache_config=kv_cache_config,
block_size=block_size,
log_stats=True,
structured_output_manager=StructuredOutputManager(vllm_config),
)
if use_v2_model_runner is None:
use_v2_model_runner = bool(envs.VLLM_USE_V2_MODEL_RUNNER)
scheduler.use_v2_model_runner = use_v2_model_runner
return scheduler
_none_hash_initialized = False