mirror of
https://github.com/hpcaitech/ColossalAI.git
synced 2025-09-07 20:10:17 +00:00
[Inference] Fix request handler and add recycle logic (#5260)
* fix request handler * fix comment
This commit is contained in:
@@ -134,6 +134,16 @@ class Sequence:
|
||||
"""
|
||||
self.status = RequestStatus.ABORTED
|
||||
|
||||
def recycle(self) -> None:
|
||||
"""
|
||||
Recycle a running sequnce to waiitting list
|
||||
"""
|
||||
assert (
|
||||
not self.status.is_finished and not self.status == RequestStatus.ABORTED
|
||||
), "The running sequence \
|
||||
is already done but it still in running list"
|
||||
self.status = RequestStatus.WAITING
|
||||
|
||||
def __repr__(self) -> str:
|
||||
return (
|
||||
f"(request_id={self.request_id}, "
|
||||
|
Reference in New Issue
Block a user