From a7029d039b33d52c4f56dded46f80700ccd4e0e1 Mon Sep 17 00:00:00 2001 From: QI JUN <22017000+QiJune@users.noreply.github.com> Date: Tue, 27 May 2025 10:50:04 +0800 Subject: [PATCH] skip evaluating empty batch_input_ids in summarize.py Signed-off-by: QI JUN <22017000+QiJune@users.noreply.github.com> --- examples/summarize.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/examples/summarize.py b/examples/summarize.py index afd598e8418..afe037d9435 100644 --- a/examples/summarize.py +++ b/examples/summarize.py @@ -314,7 +314,7 @@ def eval_trt_llm(datapoint, theta=pretrain_config.rotary_base, ) - if batch_size == 0: + if batch_size == 0 or len(batch_input_ids) == 0: return [], [], [], {} input_lengths = [x.size(0) for x in batch_input_ids]