Skip to content

Commit 4783143

Browse files
authored
[Bugfix][V1] Fix test_kv_cache_utils.py (vllm-project#11738)
Signed-off-by: Jee Jee Li <pandaleefree@gmail.com>
1 parent 65c0892 commit 4783143

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

tests/v1/core/test_kv_cache_utils.py

+5-5
Original file line numberDiff line numberDiff line change
@@ -147,12 +147,12 @@ def test_generate_block_hash_extra_keys():
147147

148148
# Test with no extra keys
149149
extra_keys, next_mm_idx = generate_block_hash_extra_keys(request, 0, 5, 0)
150-
assert extra_keys == (("hash1", 0), )
150+
assert extra_keys == ("hash1", )
151151
assert next_mm_idx == 1
152152

153153
# Test with partial overlap
154154
extra_keys, next_mm_idx = generate_block_hash_extra_keys(request, 3, 8, 0)
155-
assert extra_keys == (("hash1", 3), )
155+
assert extra_keys == ("hash1", )
156156
assert next_mm_idx == 1
157157

158158
# Test with no overlap
@@ -162,7 +162,7 @@ def test_generate_block_hash_extra_keys():
162162

163163
# Test with multiple extra keys
164164
extra_keys, next_mm_idx = generate_block_hash_extra_keys(request, 0, 15, 0)
165-
assert extra_keys == (("hash1", 0), ("hash2", 0))
165+
assert extra_keys == ('hash1', 'hash2')
166166
assert next_mm_idx == 2
167167

168168

@@ -216,11 +216,11 @@ def test_hash_request_tokens():
216216

217217
# Check the first block
218218
assert block_hashes[0].token_ids == (0, 1, 2)
219-
assert block_hashes[0].extra_keys == (("hash1", 0), )
219+
assert block_hashes[0].extra_keys == ("hash1", )
220220

221221
# Check the second block
222222
assert block_hashes[1].token_ids == (3, 4, 5)
223-
assert block_hashes[1].extra_keys == (("hash2", 0), )
223+
assert block_hashes[1].extra_keys == ("hash2", )
224224

225225

226226
def test_hash_request_tokens_no_mm_inputs():

0 commit comments

Comments
 (0)