Unverified Commit 7cd0bd72 authored by look's avatar look Committed by GitHub
Browse files

[Bugfix] Fix output token length check logic (#16419)


Signed-off-by: default avatarlook <eeslook@163.com>
parent 56d4aefa
...@@ -156,7 +156,7 @@ def calculate_metrics( ...@@ -156,7 +156,7 @@ def calculate_metrics(
if outputs[i].success: if outputs[i].success:
output_len = outputs[i].output_tokens 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 # We use the tokenizer to count the number of output tokens
# for some serving backends instead of looking at # for some serving backends instead of looking at
# len(outputs[i].itl) since multiple output tokens may be # len(outputs[i].itl) since multiple output tokens may be
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment