[Bugfix] Fix tqdm progress bar when SamplingParams.n > 1 (#12428)

Signed-off-by: Yuchen Yan <740987012@qq.com>
This commit is contained in:
Yuchen Yan
2025-03-09 12:14:53 +08:00
committed by GitHub
parent 6d7f037748
commit 73ae0b44e9

View File

@ -1394,7 +1394,9 @@ class LLM:
pbar.postfix = (
f"est. speed input: {in_spd:.2f} toks/s, "
f"output: {out_spd:.2f} toks/s")
pbar.update(1)
pbar.update(len(output.outputs))
else:
pbar.update(1)
if use_tqdm:
pbar.close()