[Core] Rework handling of async scheduling config (#28250)

Signed-off-by: Nick Hill <nhill@redhat.com>
This commit is contained in:
Nick Hill
2025-11-07 20:01:23 +00:00
committed by GitHub
parent 18903216f5
commit da786e339e
6 changed files with 121 additions and 71 deletions
+2 -26
View File
@@ -513,7 +513,7 @@ class EngineArgs:
ObservabilityConfig.collect_detailed_traces
)
scheduling_policy: SchedulerPolicy = SchedulerConfig.policy
scheduler_cls: str | type[object] = SchedulerConfig.scheduler_cls
scheduler_cls: str | type[object] | None = SchedulerConfig.scheduler_cls
pooler_config: PoolerConfig | None = ModelConfig.pooler_config
override_pooler_config: dict | PoolerConfig | None = (
@@ -552,7 +552,7 @@ class EngineArgs:
)
"""Custom logitproc types"""
async_scheduling: bool = SchedulerConfig.async_scheduling
async_scheduling: bool | None = SchedulerConfig.async_scheduling
kv_sharing_fast_prefill: bool = CacheConfig.kv_sharing_fast_prefill
@@ -1479,20 +1479,6 @@ class EngineArgs:
else ParallelConfig.data_parallel_rpc_port
)
if self.async_scheduling:
if self.pipeline_parallel_size > 1:
raise ValueError(
"Async scheduling is not supported with pipeline-parallel-size > 1."
)
# Currently, async scheduling does not support speculative decoding.
# TODO(woosuk): Support it.
if self.speculative_config is not None:
raise ValueError(
"Currently, speculative decoding is not supported with "
"async scheduling."
)
# Forward the deprecated CLI args to the EPLB config.
if self.num_redundant_experts is not None:
self.eplb_config.num_redundant_experts = self.num_redundant_experts
@@ -1536,16 +1522,6 @@ class EngineArgs:
_api_process_rank=self._api_process_rank,
)
if self.async_scheduling and (
parallel_config.distributed_executor_backend
not in ("mp", "uni", "external_launcher")
):
raise ValueError(
"Currently, async scheduling only supports `mp`, `uni` or "
"`external_launcher` distributed executor backend, but you choose "
f"`{parallel_config.distributed_executor_backend}`."
)
speculative_config = self.create_speculative_config(
target_model_config=model_config,
target_parallel_config=parallel_config,