forked from vllm-project/vllm
-
Notifications
You must be signed in to change notification settings - Fork 2
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BugFix] Fix frontend multiprocessing hang (vllm-project#7217)
Signed-off-by: Max de Bayser <[email protected]> Co-authored-by: Robert Shaw <[email protected]>
- Loading branch information
Showing
3 changed files
with
67 additions
and
5 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
from typing import Any | ||
|
||
import pytest | ||
|
||
from vllm.engine.async_llm_engine import AsyncLLMEngine | ||
from vllm.entrypoints.openai.api_server import build_async_engine_client | ||
from vllm.entrypoints.openai.cli_args import make_arg_parser | ||
from vllm.utils import FlexibleArgumentParser | ||
|
||
|
||
def crashing_from_engine_args( | ||
cls, | ||
engine_args: Any = None, | ||
start_engine_loop: Any = None, | ||
usage_context: Any = None, | ||
stat_loggers: Any = None, | ||
) -> "AsyncLLMEngine": | ||
raise Exception("foo") | ||
|
||
|
||
@pytest.mark.asyncio | ||
async def test_mp_crash_detection(monkeypatch): | ||
|
||
with pytest.raises(RuntimeError) as excinfo, monkeypatch.context() as m: | ||
m.setattr(AsyncLLMEngine, "from_engine_args", | ||
crashing_from_engine_args) | ||
parser = FlexibleArgumentParser( | ||
description="vLLM's remote OpenAI server.") | ||
parser = make_arg_parser(parser) | ||
args = parser.parse_args([]) | ||
|
||
async with build_async_engine_client(args): | ||
pass | ||
assert "The server process died before responding to the readiness probe"\ | ||
in str(excinfo.value) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters