Unverified Commit 417bcefb authored by Chenyaaang's avatar Chenyaaang Committed by GitHub
Browse files

fix sonnet dataset sample when prefix len is very small (#16379)


Signed-off-by: default avatarChenyaaang <chenyangli@google.com>
parent baada0e7
......@@ -472,7 +472,7 @@ class SonnetDataset(BenchmarkDataset):
# Determine how many poem lines to use.
num_input_lines = round((input_len - base_offset) / avg_len)
num_prefix_lines = round((prefix_len - base_offset) / avg_len)
num_prefix_lines = max(round((prefix_len - base_offset) / avg_len), 0)
prefix_lines = self.data[:num_prefix_lines]
samples = []
......
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