[BugFix] Fix metrics error for --num-scheduler-steps > 1 (#8234)
This commit is contained in:
@@ -1718,6 +1718,15 @@ class LLMEngine:
|
||||
# TPOTs.
|
||||
latency = seq_group.get_last_latency(now)
|
||||
time_per_output_tokens_iter.append(latency)
|
||||
if seq_group.state.current_step == 0:
|
||||
# For async_output_proc, the do_log_stats()
|
||||
# is called following init_multi_step(), which
|
||||
# sets the current_step to zero.
|
||||
actual_num_batched_tokens +=\
|
||||
seq_group.state.num_steps - 1
|
||||
else:
|
||||
actual_num_batched_tokens +=\
|
||||
seq_group.state.current_step - 1
|
||||
|
||||
# Because of chunked prefill, we can have a single sequence
|
||||
# group that does multiple prompt_runs. To prevent logging
|
||||
|
||||
Reference in New Issue
Block a user