Skip to content

Commit

Permalink
#12: fix queue iteration bug (#15)
Browse files Browse the repository at this point in the history
  • Loading branch information
juliuslipp authored Dec 17, 2024
1 parent 9599bb7 commit b951bde
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion batched/batch_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def optimal_batches(self) -> Generator[list[BatchItem[T, U]], None, None]:

n_batches = max(1, queue_size // self._batch_size)
size_batches = min(self._batch_size * n_batches, queue_size)
batch_items = [self._queue._get() for _ in range(size_batches)] # noqa: SLF001
batch_items = [self._queue.get() for _ in range(size_batches)]
for batch in batch_iter(batch_items, self._batch_size):
if self._stop_requested:
break
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[project]
name = "batched"
version = "0.1.3"
version = "0.1.4"
description = "Batched is a flexible and efficient batch processing library implemented in Python. It supports asynchronous batch processing with dynamic batching and prioritization."
authors = [
{ name = "Mixedbread", email = "support@mixedbread.ai" },
Expand Down

0 comments on commit b951bde

Please sign in to comment.