Skip to content

vllm.v1.engine.exceptions

Classes:

EngineDeadError

Bases: VLLMServerError

Raised when the EngineCore dies. Unrecoverable.

Source code in vllm/v1/engine/exceptions.py
class EngineDeadError(VLLMServerError):
    """Raised when the EngineCore dies. Unrecoverable."""

    def __init__(self, *args, suppress_context: bool = False, **kwargs):
        ENGINE_DEAD_MESSAGE = "EngineCore encountered an issue. See stack trace (above) for the root cause."  # noqa: E501

        super().__init__(ENGINE_DEAD_MESSAGE, *args, **kwargs)
        # Make stack trace clearer when using with LLMEngine by
        # silencing irrelevant ZMQError.
        self.__suppress_context__ = suppress_context

EngineGenerateError

Bases: VLLMServerError

Raised when a AsyncLLM.generate() fails. Recoverable.

Source code in vllm/v1/engine/exceptions.py
class EngineGenerateError(VLLMServerError):
    """Raised when a AsyncLLM.generate() fails. Recoverable."""

    pass

EngineSleepingError

Bases: EngineUnhealthyError

Raised when the engine is intentionally sleeping or paused.

Source code in vllm/v1/engine/exceptions.py
class EngineSleepingError(EngineUnhealthyError):
    """Raised when the engine is intentionally sleeping or paused."""

    def __init__(self, message: str = "", **details: Any):
        super().__init__(message, reason="sleeping", **details)

EngineUnhealthyError

Bases: VLLMServerError

Raised when the engine is alive but not ready to serve traffic.

Parameters:

  • message

    (str, default: '' ) –

    Human-readable description.

  • reason

    (str, default: 'unhealthy' ) –

    Machine-readable not-ready reason reported by /health_generate.

  • details

    (Any, default: {} ) –

    Extra JSON-serializable fields reported by /health_generate.

Source code in vllm/v1/engine/exceptions.py
class EngineUnhealthyError(VLLMServerError):
    """Raised when the engine is alive but not ready to serve traffic.

    Args:
        message: Human-readable description.
        reason: Machine-readable not-ready reason reported by ``/health_generate``.
        details: Extra JSON-serializable fields reported by ``/health_generate``.

    """

    def __init__(self, message: str = "", reason: str = "unhealthy", **details: Any):
        super().__init__(message)
        self.reason = reason
        self.details = details