mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2026-05-16 16:02:27 +08:00
[V1][Bugfix] Do not reset prefix caching metrics (#14235)
This commit is contained in:
parent
0df25101d6
commit
ade3f7d988
@ -34,6 +34,9 @@ class LoggingStatLogger(StatLoggerBase):
|
|||||||
def __init__(self):
|
def __init__(self):
|
||||||
self._reset(time.monotonic())
|
self._reset(time.monotonic())
|
||||||
self.last_scheduler_stats = SchedulerStats()
|
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):
|
def _reset(self, now):
|
||||||
self.last_log_time = now
|
self.last_log_time = now
|
||||||
@ -42,9 +45,6 @@ class LoggingStatLogger(StatLoggerBase):
|
|||||||
self.num_prompt_tokens: list[int] = []
|
self.num_prompt_tokens: list[int] = []
|
||||||
self.num_generation_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):
|
def _track_iteration_stats(self, iteration_stats: IterationStats):
|
||||||
# Save tracked stats for token counters.
|
# Save tracked stats for token counters.
|
||||||
self.num_prompt_tokens.append(iteration_stats.num_prompt_tokens)
|
self.num_prompt_tokens.append(iteration_stats.num_prompt_tokens)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user