Bug fix for metrics counter (#4660)

This commit is contained in:
Zhiqiang Xie
2025-03-22 13:39:21 -07:00
committed by GitHub
parent 8f163b1653
commit ecbfe58bb0

View File

@@ -878,6 +878,8 @@ class ScheduleBatch(ScheduleBatchDisaggregationDecodeMixin):
# If req.input_embeds is already a list, append its content directly
input_embeds.extend(req.input_embeds) # Use extend to avoid nesting
if req.is_retracted:
req.already_computed = 0
req.cached_tokens += pre_len - req.already_computed
req.already_computed = seq_len
req.is_retracted = False