Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(vllm): initializes dictionary entry prior to usage #959

Merged
merged 2 commits into from
Aug 28, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 5 additions & 1 deletion packages/vllm/src/main.py
Original file line number Diff line number Diff line change
Expand Up @@ -178,7 +178,11 @@ async def iterate_outputs(self):
async for request_output in self.random_iterator:
request_id = request_output.request_id

if request_output.finished:
# At least one iteration must be done for each request_id
if (
self.delta_queue_by_id.get(request_id)
and request_output.finished
):
# Signal that the "generate" function can stop waiting for additional inputs
logging.info(
f"Generated {num_tokens_by_id[request_id]} tokens in {time.time() - t0_by_id[request_id]:.2f}s"
Expand Down
Loading