Skip to content

Commit

Permalink
🎨 format
Browse files Browse the repository at this point in the history
Signed-off-by: Joe Runde <[email protected]>
  • Loading branch information
joerunde committed Jul 26, 2024
1 parent 6c20c20 commit fc386c4
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 6 deletions.
2 changes: 2 additions & 0 deletions vllm/entrypoints/openai/api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -201,6 +201,7 @@ async def runtime_error_handler(_, __):
# In this case we cannot await the server shutdown here because
# this handler must first return to close the connection for
# this request.
global server
server.should_exit = True

return Response(status_code=HTTPStatus.INTERNAL_SERVER_ERROR)
Expand All @@ -212,6 +213,7 @@ async def engine_dead_handler(_, __):
if not args.keep_alive_on_engine_death:
logger.fatal("AsyncLLMEngine is already dead, terminating server "
"process")
global server
server.should_exit = True

return Response(status_code=HTTPStatus.INTERNAL_SERVER_ERROR)
Expand Down
11 changes: 5 additions & 6 deletions vllm/entrypoints/openai/cli_args.py
Original file line number Diff line number Diff line change
Expand Up @@ -134,12 +134,11 @@ def make_arg_parser(parser: FlexibleArgumentParser) -> FlexibleArgumentParser:
help="When --max-logprobs is specified, represents single tokens as"
"strings of the form 'token_id:{token_id}' so that tokens that"
"are not JSON-encodable can be identified.")
parser.add_argument(
"--keep-alive-on-engine-death",
action="store_true",
help="The default behavior is to stop the server "
"process when the LLM engine dies. Set this flag to "
"keep the server up instead.")
parser.add_argument("--keep-alive-on-engine-death",
action="store_true",
help="The default behavior is to stop the server "
"process when the LLM engine dies. Set this flag to "
"keep the server up instead.")

parser = AsyncEngineArgs.add_cli_args(parser)

Expand Down

0 comments on commit fc386c4

Please sign in to comment.