Skip to content

Commit

Permalink
Rename manager_first_dead to manager_available
Browse files Browse the repository at this point in the history
  • Loading branch information
s5u13b committed Aug 28, 2024
1 parent 7049aac commit fde7689
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions llumnix/entrypoints/vllm/api_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
log_requests = None
num_finished_requests = 0
WAIT_MANAGER_INTERVAL = 5
manager_first_dead = True
manager_available = True


async def _background_process_outputs():
Expand Down Expand Up @@ -79,16 +79,16 @@ async def manager_generate(prompt, sampling_params, request_id) -> AsyncStream:
# This request's outputs will be put to the request_output_queue of this api server no matter which instance it's running in.
server_info = ServerInfo(server_id, request_output_queue)
# If manager is unavailable, request will be directly added to the llumlet held by api server.
global manager_first_dead
global manager_available
try:
# await to catch exception
await engine_manager.generate.remote(request_id, server_info, prompt, sampling_params)
if not manager_first_dead:
manager_first_dead = True
if not manager_available:
manager_available = True
except ray.exceptions.RayActorError:
# Do not re-generate the request to avoid duplicate requests.
if manager_first_dead:
manager_first_dead = False
if manager_available:
manager_available = False
return results_generator
try:
if instance_num_requests:
Expand Down

0 comments on commit fde7689

Please sign in to comment.