[Feature] Add fault tolerance framework (simplified) for DP+EP external LB deployments (#44428)
Signed-off-by: fangyuchu <fangyuchu@qq.com> Signed-off-by: a798347923 <2645302020@qq.com> Signed-off-by: TianZhuo <2770730562@qq.com> Signed-off-by: a798347923 <39047817+a798347923@users.noreply.github.com> Signed-off-by: 205150940 <112750056+205150940@users.noreply.github.com> Signed-off-by: w00689259 <wangzhuo66@huawei.com> Signed-off-by: zWaNg3 <37772915+zWaNg3@users.noreply.github.com> Signed-off-by: zWaNg3 <389750525@qq.com> Signed-off-by: yzchang-plus <1078477584@qq.com> Signed-off-by: Jade Zheng <zheng.shoujian@outlook.com> Co-authored-by: zWaNg3 <37772915+zWaNg3@users.noreply.github.com> Co-authored-by: a798347923 <2645302020@qq.com> Co-authored-by: TianZhuo <2770730562@qq.com> Co-authored-by: 205150940 <112750056+205150940@users.noreply.github.com> Co-authored-by: a798347923 <39047817+a798347923@users.noreply.github.com> Co-authored-by: w00689259 <wangzhuo66@huawei.com> Co-authored-by: zWaNg3 <389750525@qq.com> Co-authored-by: yzchang-plus <1078477584@qq.com> Co-authored-by: Jade Zheng <zheng.shoujian@outlook.com>
This commit is contained in:
co-authored by
zWaNg3
a798347923
TianZhuo
205150940
a798347923
w00689259
zWaNg3
yzchang-plus
Jade Zheng
parent
33ef67e9fb
commit
0b0bd2b5f6
@@ -13,6 +13,7 @@ from vllm.config.device import DeviceConfig
|
||||
from vllm.config.diffusion import DiffusionConfig
|
||||
from vllm.config.ec_manager_config import EncoderCacheManagerConfig
|
||||
from vllm.config.ec_transfer import ECTransferConfig
|
||||
from vllm.config.fault_tolerance import FaultToleranceConfig
|
||||
from vllm.config.kernel import KernelConfig
|
||||
from vllm.config.kv_events import KVEventsConfig
|
||||
from vllm.config.kv_transfer import KVTransferConfig
|
||||
@@ -124,6 +125,8 @@ __all__ = [
|
||||
"StructuredOutputsConfig",
|
||||
# From vllm.config.profiler
|
||||
"ProfilerConfig",
|
||||
# From vllm.config.fault_tolerance
|
||||
"FaultToleranceConfig",
|
||||
# From vllm.config.utils
|
||||
"ConfigType",
|
||||
"SupportsMetricsInfo",
|
||||
|
||||
@@ -0,0 +1,18 @@
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
|
||||
|
||||
|
||||
from vllm.config.utils import config
|
||||
|
||||
|
||||
@config
|
||||
class FaultToleranceConfig:
|
||||
"""Configuration for fault tolerance."""
|
||||
|
||||
engine_recovery_timeout_sec: int = 120
|
||||
"""Timeout (in seconds) to wait for error handling instructions
|
||||
before raising an exception. If the EngineCore encounters an
|
||||
error, it waits up to this many seconds for vLLM to receive
|
||||
instructions on how to handle the error and then recover from the fault.
|
||||
If vLLM does not recover during this time, the original error is raised.
|
||||
"""
|
||||
@@ -13,6 +13,7 @@ from torch.distributed import ProcessGroup, ReduceOp, Store
|
||||
from typing_extensions import Self
|
||||
|
||||
import vllm.envs as envs
|
||||
from vllm.config.fault_tolerance import FaultToleranceConfig
|
||||
from vllm.config.utils import config
|
||||
from vllm.logger import init_logger
|
||||
from vllm.platforms import current_platform
|
||||
@@ -22,6 +23,7 @@ if TYPE_CHECKING:
|
||||
from ray.runtime_env import RuntimeEnv
|
||||
from ray.util.placement_group import PlacementGroup
|
||||
|
||||
from vllm.config.fault_tolerance import FaultToleranceConfig
|
||||
from vllm.v1.executor import Executor
|
||||
else:
|
||||
RuntimeEnv = Any
|
||||
@@ -393,6 +395,16 @@ class ParallelConfig:
|
||||
should only be set by API server scale-out.
|
||||
"""
|
||||
|
||||
enable_fault_tolerance: bool = False
|
||||
"""Enable fault tolerance for detailed error recovery,
|
||||
such as scaling down fault DPEngineCore.
|
||||
"""
|
||||
|
||||
fault_tolerance_config: FaultToleranceConfig = Field(
|
||||
default_factory=FaultToleranceConfig
|
||||
)
|
||||
"""The configurations for fault tolerance."""
|
||||
|
||||
@field_validator("disable_nccl_for_dp_synchronization", mode="wrap")
|
||||
@classmethod
|
||||
def _skip_none_validation(cls, value: Any, handler: Callable) -> Any:
|
||||
@@ -445,6 +457,13 @@ class ParallelConfig:
|
||||
f"but found: {self._api_process_rank}"
|
||||
)
|
||||
|
||||
if self.enable_fault_tolerance and self._api_process_count > 1:
|
||||
raise ValueError(
|
||||
"Fault tolerance requires a single API server process "
|
||||
f"(--api-server-count=1), but got {self._api_process_count}. "
|
||||
"The FT system assumes one AsyncMPClient manages all engines."
|
||||
)
|
||||
|
||||
if self.all2all_backend in ["pplx", "naive"]:
|
||||
logger.warning(
|
||||
"The '%s' all2all backend has been removed. "
|
||||
|
||||
Reference in New Issue
Block a user