Skip to content

Commit 32ec2d8

Browse files
committed
Remove equality methods in KV Cache events data classes
Equality methods are unnecessary as its provided by the parent class 'msgspec.Struct' which they extend from. Review comment: https://github.com/vllm-project/vllm/pull/28309/files#r2539044714 Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
1 parent dcbbfe6 commit 32ec2d8

File tree

1 file changed

+0
-19
lines changed

1 file changed

+0
-19
lines changed

vllm/distributed/kv_events.py

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -54,30 +54,11 @@ class BlockStored(KVCacheEvent):
5454
lora_id: int | None
5555
medium: str | None
5656

57-
def __eq__(self, other):
58-
if isinstance(other, BlockStored):
59-
return (
60-
self.block_hashes == other.block_hashes
61-
and self.parent_block_hash == other.parent_block_hash
62-
and self.token_ids == other.token_ids
63-
and self.block_size == other.block_size
64-
and self.lora_id == other.lora_id
65-
and self.medium == other.medium
66-
)
67-
return False
68-
6957

7058
class BlockRemoved(KVCacheEvent):
7159
block_hashes: list[ExternalBlockHash]
7260
medium: str | None
7361

74-
def __eq__(self, other):
75-
if isinstance(other, BlockRemoved):
76-
return (
77-
self.block_hashes == other.block_hashes and self.medium == other.medium
78-
)
79-
return False
80-
8162

8263
class AllBlocksCleared(KVCacheEvent):
8364
pass

0 commit comments

Comments
 (0)