Skip to content

Commit

Permalink
[Fix] Keep scheduler.running as deque (vllm-project#2523)
Browse files Browse the repository at this point in the history
  • Loading branch information
njhill authored Jan 21, 2024
1 parent 5b23c3f commit d75c407
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions vllm/core/scheduler.py
Original file line number Diff line number Diff line change
Expand Up @@ -332,10 +332,8 @@ def free_seq(self, seq: Sequence) -> None:
self.block_manager.free(seq)

def free_finished_seq_groups(self) -> None:
self.running = [
seq_group for seq_group in self.running
if not seq_group.is_finished()
]
self.running = deque(seq_group for seq_group in self.running
if not seq_group.is_finished())

def _allocate(self, seq_group: SequenceGroup) -> None:
self.block_manager.allocate(seq_group)
Expand Down

0 comments on commit d75c407

Please sign in to comment.