Skip to content

Commit

Permalink
Fix index for batch remainder (#21)
Browse files Browse the repository at this point in the history
  • Loading branch information
austinweisgrau authored Jun 21, 2023
1 parent ed306d3 commit 5f87e47
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/prefecto/concurrency.py
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,7 @@ def _make_batches(self, **params) -> list[dict[str, list[Any]]]:
if length % self.size != 0:
batch = {p: [] for p in parameters}
for p in parameters:
batch[p] = params[p][(i + 1) * self.size :]
batch[p] = params[p][(length // self.size) * self.size :]
batches.append(batch)

return batches
Expand Down

0 comments on commit 5f87e47

Please sign in to comment.