Skip to content

Commit 2fdce73

Browse files
committed
Revert "fix test"
This reverts commit 12e2d25.
1 parent a652b83 commit 2fdce73

File tree

1 file changed

+2
-18
lines changed

1 file changed

+2
-18
lines changed

tests/ut/kv_connector/utils.py

Lines changed: 2 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,6 @@
33
# SPDX-FileCopyrightText: Copyright contributors to the vLLM project
44
# Copyright (c) 2025 Huawei Technologies Co., Ltd. All Rights Reserved.
55

6-
import hashlib
76
import os
87
from typing import Any, Optional
98

@@ -129,26 +128,11 @@ def create_request(
129128
) -> Request:
130129
"""Make dummy request for testing."""
131130
global _none_hash_initialized
132-
133-
# Create a hash function that returns bytes instead of int
134-
def bytes_hash(data):
135-
"""Hash function that returns bytes instead of int."""
136-
if isinstance(data, (list, tuple)):
137-
# Convert list/tuple to string representation, then encode to bytes
138-
data_str = str(data)
139-
elif isinstance(data, str):
140-
data_str = data
141-
else:
142-
data_str = str(data)
143-
144-
# Use hashlib to create a consistent bytes hash
145-
return hashlib.sha256(data_str.encode('utf-8')).digest()[:8] # Use first 8 bytes
146-
147131
if not _none_hash_initialized:
148-
init_none_hash(bytes_hash)
132+
init_none_hash(hash)
149133
_none_hash_initialized = True
150134

151-
block_hasher = get_request_block_hasher(block_size, bytes_hash)
135+
block_hasher = get_request_block_hasher(block_size, hash)
152136

153137
kv_transfer_params: Optional[dict[str, Any]] = None
154138

0 commit comments

Comments
 (0)