[Refactor] Make MOSS-TTS-Local stream session dynamic batch (#5235)
Signed-off-by: gcanlin <canlinguosdu@gmail.com> Signed-off-by: Canlin Guo <canlinguosdu@gmail.com>
This commit is contained in:
1 parent
f775e80732
commit
61324e65d7
11 files changed
+616
-294
No files matched your search
@@ -550,6 +550,11 @@ class OmniChunkTransferAdapter(OmniTransferAdapterBase):
|
||||
self._active_streams[request_id] = request
|
||||
return True
|
||||
|
||||
@property
|
||||
def num_running_waiting_for_chunk(self) -> int:
|
||||
"""Count running requests temporarily removed while awaiting a chunk."""
|
||||
return len(self.waiting_for_chunk_running_requests)
|
||||
|
||||
def _preempt_non_active_running(self, waiting_queue: Any, running_queue: list[Request]) -> None:
|
||||
# Hold non-active running requests in a private deque rather than
|
||||
# routing them back through waiting_queue. Routing through the
|
||||
|
||||
Reference in new issue
Block a user