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
e1f0835a
Unverified
Commit
e1f0835a
authored
Mar 07, 2025
by
Mark McLoughlin
Committed by
GitHub
Mar 07, 2025
Browse files
[V1][Metrics] Fix traceback with preemptions+LoRA (#14220)
Signed-off-by:
Mark McLoughlin
<
markmc@redhat.com
>
parent
8ed5421a
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
0 deletions
+8
-0
vllm/v1/metrics/stats.py
vllm/v1/metrics/stats.py
+8
-0
No files found.
vllm/v1/metrics/stats.py
View file @
e1f0835a
...
@@ -150,6 +150,7 @@ class IterationStats:
...
@@ -150,6 +150,7 @@ class IterationStats:
LoRARequestStates
.
scheduled_request
(
lora_stats
,
req_id
)
LoRARequestStates
.
scheduled_request
(
lora_stats
,
req_id
)
elif
event
.
type
==
EngineCoreEventType
.
PREEMPTED
:
elif
event
.
type
==
EngineCoreEventType
.
PREEMPTED
:
self
.
num_preempted_reqs
+=
1
self
.
num_preempted_reqs
+=
1
LoRARequestStates
.
preempted_request
(
lora_stats
,
req_id
)
def
update_from_finished_request
(
self
,
finish_reason
:
"FinishReason"
,
def
update_from_finished_request
(
self
,
finish_reason
:
"FinishReason"
,
num_prompt_tokens
:
int
,
num_prompt_tokens
:
int
,
...
@@ -224,6 +225,13 @@ class LoRARequestStates:
...
@@ -224,6 +225,13 @@ class LoRARequestStates:
lora_stats
.
waiting_requests
.
remove
(
request_id
)
lora_stats
.
waiting_requests
.
remove
(
request_id
)
lora_stats
.
running_requests
.
add
(
request_id
)
lora_stats
.
running_requests
.
add
(
request_id
)
@
staticmethod
def
preempted_request
(
lora_stats
:
Optional
[
LoRAStats
],
request_id
:
str
):
if
lora_stats
is
None
:
return
lora_stats
.
running_requests
.
remove
(
request_id
)
lora_stats
.
waiting_requests
.
add
(
request_id
)
def
update_iteration_stats
(
self
,
def
update_iteration_stats
(
self
,
iteration_stats
:
Optional
[
IterationStats
]):
iteration_stats
:
Optional
[
IterationStats
]):
if
iteration_stats
is
None
:
if
iteration_stats
is
None
:
...
...
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