Skip to content

Commit

Permalink
Merge branch 'fix-dbatch' of https://github.com/jina-ai/jina into fix…
Browse files Browse the repository at this point in the history
…-dbatch

Signed-off-by: Joan Fontanals Martinez <[email protected]>
  • Loading branch information
JoanFM committed Jul 18, 2023
2 parents 57901a8 + 72f9407 commit a62f374
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions jina/serve/runtimes/worker/batch_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ async def _await_then_flush(self) -> None:
raise ValueError(
f'Dynamic Batching requires input size to equal output size. Expected output size {input_len_before_call}, but got {len(self._big_doc)}'
)
elif return_docs is None:
if not len(self._big_doc) == input_len_before_call:
raise ValueError(
f'Dynamic Batching requires input size to equal output size. Expected output size {input_len_before_call}, but got {len(self._big_doc)}'
)
else:
array_name = 'DocumentArray' if not docarray_v2 else 'DocList'

Check warning on line 141 in jina/serve/runtimes/worker/batch_queue.py

View check run for this annotation

Codecov / codecov/patch

jina/serve/runtimes/worker/batch_queue.py#L141

Added line #L141 was not covered by tests
raise TypeError(
Expand Down

0 comments on commit a62f374

Please sign in to comment.