From 7cd0bd7212802f845e6cb9e3f1ba0faa422465f4 Mon Sep 17 00:00:00 2001 From: look Date: Fri, 11 Apr 2025 04:16:48 +0800 Subject: [PATCH] [Bugfix] Fix output token length check logic (#16419) Signed-off-by: look --- benchmarks/benchmark_serving.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/benchmarks/benchmark_serving.py b/benchmarks/benchmark_serving.py index 431adb8e997ee..0f061f89b2306 100644 --- a/benchmarks/benchmark_serving.py +++ b/benchmarks/benchmark_serving.py @@ -156,7 +156,7 @@ def calculate_metrics( if outputs[i].success: output_len = outputs[i].output_tokens - if output_len is None: + if not output_len: # We use the tokenizer to count the number of output tokens # for some serving backends instead of looking at # len(outputs[i].itl) since multiple output tokens may be