Skip to content

Commit

Permalink
fix: fix optim issue with optimization
Browse files Browse the repository at this point in the history
  • Loading branch information
JoanFM committed Jul 23, 2024
1 parent 268ceb7 commit 0d5f644
Show file tree
Hide file tree
Showing 3 changed files with 169 additions and 117 deletions.
1 change: 1 addition & 0 deletions jina/serve/runtimes/worker/batch_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -200,6 +200,7 @@ async def _assign_results(
for docs_group, request_idx in zip(docs_grouped, completed_req_idxs):
request = self._requests[request_idx]
request_completed = self._requests_completed[request_idx]
request.direct_docs = None # batch queue will work in place, therefore result will need to read from data.
request.data.set_docs_convert_arrays(
docs_group, ndarray_type=self._output_array_type
)
Expand Down
1 change: 1 addition & 0 deletions jina/serve/runtimes/worker/request_handling.py
Original file line number Diff line number Diff line change
Expand Up @@ -704,6 +704,7 @@ async def handle(
**self._batchqueue_config[exec_endpoint],
)
# This is necessary because push might need to await for the queue to be emptied
# the batch queue will change the request in-place
queue = await self._batchqueue_instances[exec_endpoint][param_key].push(
requests[0]
)
Expand Down
Loading

0 comments on commit 0d5f644

Please sign in to comment.