Skip to content

Commit 6973123

Browse files
committed
Add improvements from code review comments
Review comments: - vllm-project#28309 (comment) - vllm-project#28309 (comment) Signed-off-by: Martin Hickey <martin.hickey@ie.ibm.com>
1 parent 8f45549 commit 6973123

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

vllm/distributed/kv_events.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ def combine_unique_ordered_events(self, other: "KVEventBatch") -> "KVEventBatch"
7171
"""
7272
Combine non duplicated events with another `KVEventBatch` object.
7373
"""
74-
combined_events = self.events[:]
74+
checked_events = set(self.events)
7575
for item in other.events:
76-
if item not in combined_events:
77-
combined_events.append(item)
78-
self.events = combined_events
76+
if item not in checked_events:
77+
self.events.append(item)
78+
checked_events.add(item)
7979
return self
8080

8181

0 commit comments

Comments
 (0)