[Bug]: Duration-limited benchmark crashes when no request completes

オープン
#23,250 コメント 0 件 リアクション 0 件 担当者 0 名 GitHub で見る

メンテナーはふだん 1 日以内に返信

@JunkaiWang-TheoPhy がすでに取り組んでいます。

2026年12月2日 から。

  • #23251 @JunkaiWang-TheoPhy による — オープン

評価

難易度
3/5
見積もり時間
1〜2日
初心者へのやさしさ
35/100
issue の種類
バグ
明瞭さ
おおむね明確
活発さ
停滞
技術スタック
python
領域
performance

調査の方向性

Start with the trtllm-bench throughput worker and StatsKeeper.generate_statistics_summary, then trace how the worker handles a duration deadline when no request completes. Reproduce with the two-turn JSONL example and a deadline before the second turn; done when the run reports that no requests completed without computing statistics from an empty sample, while runs with completed requests still report those requests.

索引モデルが issue の本文から書いたものです。

説明

Inference runtime
System Info

TensorRT-LLM main at ef375f87565b89a5818e705c735ec59a182efb86. Reproduced on Python 3.12 / macOS ARM64 with real benchmark worker and statistics code, a controlled clock, and mocked LLM, tokenizer, and energy collection. No GPU inference or model downloads were needed.

Reproduction

Use a duration-limited trtllm-bench throughput run with one multi-turn request and choose a duration shorter than the time needed to reach the second turn. For example, a single two-turn JSONL record can use:

{"task_id":0,"input_ids":[1,2],"output_tokens":8,"turns":["First question","Follow-up question"]}

In the CPU reproducer, the first completion moves the clock to the one-second deadline. The real worker correctly discards the now-incomplete conversation, and no response reaches the statistics. Calling StatsKeeper().generate_statistics_summary(0, 1) reproduces the downstream division by zero.

Expected behavior

A run with no completed requests should stop with a message indicating that the deadline prevented any request from completing. Statistics should not be computed from the empty sample.

Actual behavior

The worker logs that it processed 0/1 requests, logs that the benchmark is complete, and returns empty statistics. Report generation then fails with ZeroDivisionError: division by zero.

Additional notes

The valid case where at least one request finishes should continue reporting only the completed requests. Searches for trtllm-bench, ZeroDivisionError, and a deadline with no completed requests did not identify an equivalent fix. #22049 is about no-output serving streams, which follows a different path.

OpenAI Codex assisted with reproducing the failure.

主要言語
Python
スター
15.2k
フォーク
3k
平均マージ
2日 21時間
マージ済み PR(30日)
477

環境構築

Codespaces で開く

このプロジェクトの開発コンテナを、あなたの GitHub アカウントでブラウザ上に起動します。

はじめの一歩

  1. issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
  2. 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
  3. リポジトリをフォークし、ブランチを切って変更します。
  4. issue 番号を参照したプルリクエストを送ります。

NVIDIA/TensorRT-LLM のほかの issue

NVIDIA/TensorRT-LLM の issue をすべて見る

似ている issue

Python の issue をもっと見る

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。