Skip to content

Commit d624a26

Browse files
committed
fix start token
Signed-off-by: guangli.bao <[email protected]>
1 parent a4bdbb5 commit d624a26

File tree

2 files changed

+6
-3
lines changed

2 files changed

+6
-3
lines changed

src/guidellm/dataset/synthetic.py

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -194,14 +194,17 @@ def __iter__(
194194
}
195195

196196
def _create_prompt(
197-
self, prompt_tokens: int, start_index: int, unique_prefix: Optional[int] = None
197+
self,
198+
prompt_tokens: int,
199+
start_index: int,
200+
unique_prefix: Optional[int] = None, # noqa: ARG002
198201
) -> list[int]:
199202
if prompt_tokens <= 0:
200203
return []
201204

202205
left = start_index
203206
right = start_index + 4 * prompt_tokens
204-
start_tokens = [unique_prefix] if unique_prefix else []
207+
start_tokens = []
205208

206209
while left < right:
207210
mid = (left + right) // 2

tests/unit/dataset/test_synthetic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -415,7 +415,7 @@ def test_create_prompt_method(
415415

416416
# Test normal case
417417
result = generator._create_prompt(5, 0, 42)
418-
assert result == [42, 1, 2, 3]
418+
assert result == [1, 2, 3]
419419

420420
# Test zero tokens
421421
result = generator._create_prompt(0, 0, 42)

0 commit comments

Comments
 (0)