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
ade3f7d9
Unverified
Commit
ade3f7d9
authored
Mar 04, 2025
by
Cody Yu
Committed by
GitHub
Mar 05, 2025
Browse files
[V1][Bugfix] Do not reset prefix caching metrics (#14235)
parent
0df25101
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
vllm/v1/metrics/loggers.py
vllm/v1/metrics/loggers.py
+3
-3
No files found.
vllm/v1/metrics/loggers.py
View file @
ade3f7d9
...
...
@@ -34,6 +34,9 @@ class LoggingStatLogger(StatLoggerBase):
def
__init__
(
self
):
self
.
_reset
(
time
.
monotonic
())
self
.
last_scheduler_stats
=
SchedulerStats
()
# Prefix cache metrics. This cannot be reset.
# TODO: Make the interval configurable.
self
.
prefix_caching_metrics
=
PrefixCachingMetrics
()
def
_reset
(
self
,
now
):
self
.
last_log_time
=
now
...
...
@@ -42,9 +45,6 @@ class LoggingStatLogger(StatLoggerBase):
self
.
num_prompt_tokens
:
list
[
int
]
=
[]
self
.
num_generation_tokens
:
list
[
int
]
=
[]
# Prefix cache metrics. TODO: Make the interval configurable.
self
.
prefix_caching_metrics
=
PrefixCachingMetrics
()
def
_track_iteration_stats
(
self
,
iteration_stats
:
IterationStats
):
# Save tracked stats for token counters.
self
.
num_prompt_tokens
.
append
(
iteration_stats
.
num_prompt_tokens
)
...
...
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