Skip to content

Commit 9ca3fa2

Browse files
committed
fix.
Signed-off-by: Yuchuan <[email protected]>
1 parent 6146895 commit 9ca3fa2

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

tests/python/test_grammar_matcher_basic.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -588,7 +588,7 @@ def test_batch_fill_next_token_bitmask_pressure_shuffled():
588588
input_strs = [input_str[:i] for i in range(len(input_str))] + [input_str]
589589
xgr.GrammarMatcher.batch_accept_string(matchers, input_strs)
590590

591-
shuffled_indices = [i for i in range(len(matchers))]
591+
shuffled_indices = list(range(len(matchers)))
592592
random.shuffle(shuffled_indices)
593593
bitmask_2d = xgr.allocate_token_bitmask(len(matchers), tokenizer_info.vocab_size)
594594
xgr.GrammarMatcher.batch_fill_next_token_bitmask(matchers, bitmask_2d, shuffled_indices)

0 commit comments

Comments
 (0)