Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
OpenDAS
vllm_cscc
Commits
3f8d42c8
Unverified
Commit
3f8d42c8
authored
Jul 19, 2024
by
Travis Johnson
Committed by
GitHub
Jul 19, 2024
Browse files
Pipeline Parallel: Guard for KeyErrors at request abort (#6587)
Signed-off-by:
Travis Johnson
<
tsjohnso@us.ibm.com
>
parent
7bd82002
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
9 additions
and
2 deletions
+9
-2
vllm/engine/async_llm_engine.py
vllm/engine/async_llm_engine.py
+4
-1
vllm/engine/output_processor/single_step.py
vllm/engine/output_processor/single_step.py
+5
-1
No files found.
vllm/engine/async_llm_engine.py
View file @
3f8d42c8
...
...
@@ -131,7 +131,10 @@ class RequestTracker:
"""Process a request output from the engine."""
request_id
=
request_output
.
request_id
self
.
_request_streams
[
request_id
].
put
(
request_output
)
# Guard against a KeyError which can occur if the request was aborted
# while the output was generated
if
(
stream
:
=
self
.
_request_streams
.
get
(
request_id
))
is
not
None
:
stream
.
put
(
request_output
)
if
request_output
.
finished
:
if
verbose
:
logger
.
info
(
"Finished request %s."
,
request_id
)
...
...
vllm/engine/output_processor/single_step.py
View file @
3f8d42c8
...
...
@@ -90,7 +90,11 @@ class SingleStepOutputProcessor(SequenceGroupOutputProcessor):
for
parent_seq
in
parent_seqs
}
for
sample
in
samples
:
parent_child_dict
[
sample
.
parent_seq_id
].
append
(
sample
)
# Guard against a KeyError which can occur if the request was
# aborted while the output was generated
if
(
child_list
:
=
parent_child_dict
.
get
(
sample
.
parent_seq_id
))
is
not
None
:
child_list
.
append
(
sample
)
# List of (child, parent)
child_seqs
:
List
[
Tuple
[
Sequence
,
Sequence
]]
=
[]
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment