Skip to content

Commit

Permalink
Squash 6587
Browse files Browse the repository at this point in the history
  • Loading branch information
prashantgupta24 committed Jul 19, 2024
1 parent 9ddd0b7 commit 817974a
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
5 changes: 4 additions & 1 deletion vllm/engine/async_llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ def process_request_output(self,
"""Process a request output from the engine."""
request_id = request_output.request_id

self._request_streams[request_id].put(request_output)
# Avoid a KeyError which can occur if the request was aborted while the
# outputs were generated
if request_id in self._request_streams:
self._request_streams[request_id].put(request_output)
if request_output.finished:
if verbose:
logger.info("Finished request %s.", request_id)
Expand Down
5 changes: 4 additions & 1 deletion vllm/engine/output_processor/single_step.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,10 @@ def _process_sequence_group_outputs(self, seq_group: SequenceGroup,
for parent_seq in parent_seqs
}
for sample in samples:
parent_child_dict[sample.parent_seq_id].append(sample)
# Avoid a KeyError which can occur if the request was aborted while
# the outputs were generated
if sample.parent_seq_id in parent_child_dict:
parent_child_dict[sample.parent_seq_id].append(sample)
# List of (child, parent)
child_seqs: List[Tuple[Sequence, Sequence]] = []

Expand Down

0 comments on commit 817974a

Please sign in to comment.