Skip to content

Commit 62cd7e9

Browse files
committed
Fix synthetic data generation edge case where text is much larger than requested
1 parent 0a6230b commit 62cd7e9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/guidellm/dataset/synthetic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def _create_prompt(self, prompt_tokens: int, start_index: int) -> str:
176176
else:
177177
right = mid
178178

179-
return self.text_creator.create_text(start_index, left)
179+
return self.text_creator.create_text(start_index, left - start_index)
180180

181181

182182
class SyntheticDatasetCreator(DatasetCreator):

0 commit comments

Comments
 (0)