Skip to content

Commit 3c4cdb8

Browse files
committed
revert deadcode removal
1 parent 57f3da3 commit 3c4cdb8

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

src/litserve/loops.py

+11
Original file line numberDiff line numberDiff line change
@@ -61,6 +61,17 @@ def _inject_context(context: Union[List[dict], dict], func, *args, **kwargs):
6161
return func(*args, **kwargs)
6262

6363

64+
def get_batch_from_uid(uids, lit_api, request_buffer):
65+
batches = []
66+
for uid in uids:
67+
try:
68+
x_enc, pipe_s = request_buffer.pop(uid)
69+
except KeyError:
70+
continue
71+
batches.append((x_enc, pipe_s))
72+
return batches
73+
74+
6475
def collate_requests(
6576
lit_api: LitAPI, request_queue: Queue, max_batch_size: int, batch_timeout: float
6677
) -> Tuple[List, List]:

0 commit comments

Comments
 (0)