mirror of
https://git.datalinker.icu/vllm-project/vllm.git
synced 2025-12-22 02:35:40 +08:00
[V1][Spec Decoding] Log accumulated metrics after system goes idle (#17913)
Signed-off-by: Mark McLoughlin <markmc@redhat.com>
This commit is contained in:
parent
0c0fdae84f
commit
7042cc96b0
@ -128,8 +128,6 @@ class LoggingStatLogger(StatLoggerBase):
|
|||||||
scheduler_stats.gpu_cache_usage * 100,
|
scheduler_stats.gpu_cache_usage * 100,
|
||||||
self.prefix_caching_metrics.hit_rate * 100,
|
self.prefix_caching_metrics.hit_rate * 100,
|
||||||
)
|
)
|
||||||
|
|
||||||
if scheduler_stats.spec_decoding_stats is not None:
|
|
||||||
self.spec_decoding_logging.log(log_fn=log_fn)
|
self.spec_decoding_logging.log(log_fn=log_fn)
|
||||||
|
|
||||||
def log_engine_initialized(self):
|
def log_engine_initialized(self):
|
||||||
|
|||||||
@ -67,6 +67,8 @@ class SpecDecodingLogging:
|
|||||||
spec_decoding_stats.num_accepted_tokens_per_pos)
|
spec_decoding_stats.num_accepted_tokens_per_pos)
|
||||||
|
|
||||||
def log(self, log_fn=logger.info):
|
def log(self, log_fn=logger.info):
|
||||||
|
if not self.num_drafts:
|
||||||
|
return
|
||||||
num_drafts = np.sum(self.num_drafts)
|
num_drafts = np.sum(self.num_drafts)
|
||||||
num_draft_tokens = np.sum(self.num_draft_tokens)
|
num_draft_tokens = np.sum(self.num_draft_tokens)
|
||||||
num_accepted_tokens = np.sum(self.num_accepted_tokens)
|
num_accepted_tokens = np.sum(self.num_accepted_tokens)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user