Skip to content

Commit

Permalink
fix log stats bug
Browse files Browse the repository at this point in the history
  • Loading branch information
alexm-redhat committed Aug 24, 2024
1 parent 4e35208 commit b51ef39
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions vllm/engine/llm_engine.py
Original file line number Diff line number Diff line change
Expand Up @@ -1665,11 +1665,13 @@ def _get_stats(self,
n_requests: List[int] = []
finished_reason_requests: List[str] = []

actual_num_batched_tokens = scheduler_outputs.num_batched_tokens # type: ignore

# NOTE: This loop assumes prefill seq_groups are before
# decode seq_groups in scheduled_seq_groups.
if scheduler_outputs is not None:
# For async postprocessor, already finished sequences need to be
# not counted (to avoid double counting)
actual_num_batched_tokens = scheduler_outputs.num_batched_tokens # type: ignore

num_generation_tokens_from_prefill_groups = 0.
# NOTE: if scheduler_outputs.num_prefill_groups > 0 and
# the len of scheduler_outputs.scheduled_seq_groups is !=
Expand Down

0 comments on commit b51ef39

Please sign in to comment.