[DOC] Add additional comments for LLMEngine and AsyncLLMEngine (#1011)

This commit is contained in:
Jiaxiang
2024-01-11 19:26:49 -08:00
committed by GitHub
parent 50376faa7b
commit 6549aef245
9 changed files with 242 additions and 15 deletions
+12
View File
@@ -88,6 +88,18 @@ class Scheduler:
self.waiting.append(seq_group)
def abort_seq_group(self, request_id: Union[str, Iterable[str]]) -> None:
"""Aborts a sequence group with the given ID.
Check if the sequence group with the given ID
is present in any of the state queue.
If present, remove the sequence group from the state queue.
Also, if any of the sequences in the sequence group is not finished,
free the sequence with status `FINISHED_ABORTED`.
Otherwise, do nothing.
Args:
request_id: The ID(s) of the sequence group to abort.
"""
if isinstance(request_id, str):
request_id = (request_id, )
request_ids = set(request_id)