Merge pull request #200 from KinglittleQ/fix-scheduler-typing

Fix scheduler.postprocess return type
This commit is contained in:
Xingkai Yu
2026-04-13 21:13:37 +08:00
committed by GitHub
+1 -1
View File
@@ -62,7 +62,7 @@ class Scheduler:
self.block_manager.deallocate(seq) self.block_manager.deallocate(seq)
self.waiting.appendleft(seq) self.waiting.appendleft(seq)
def postprocess(self, seqs: list[Sequence], token_ids: list[int]) -> list[bool]: def postprocess(self, seqs: list[Sequence], token_ids: list[int]):
for seq, token_id in zip(seqs, token_ids): for seq, token_id in zip(seqs, token_ids):
seq.append_token(token_id) seq.append_token(token_id)
if (not seq.ignore_eos and token_id == self.eos) or seq.num_completion_tokens == seq.max_tokens: if (not seq.ignore_eos and token_id == self.eos) or seq.num_completion_tokens == seq.max_tokens: