Unverified Commit ade3f7d9 authored by Cody Yu's avatar Cody Yu Committed by GitHub
Browse files

[V1][Bugfix] Do not reset prefix caching metrics (#14235)

parent 0df25101
......@@ -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)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment