Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[data] The iter_batch default batch size should be block size #32004

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions python/ray/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2786,7 +2786,7 @@ def iter_batches(
self,
*,
prefetch_blocks: int = 0,
batch_size: Optional[int] = 256,
batch_size: Optional[int] = None,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think is the batch_size at iteration is affecting the model and block size may not be a good default (folks with more context in ML can correct this).
The other thing is we tie the shuffle size to batch_size, so it can impact performance as well.

batch_format: str = "default",
drop_last: bool = False,
local_shuffle_buffer_size: Optional[int] = None,
Expand All @@ -2807,7 +2807,7 @@ def iter_batches(
batch_size: The number of rows in each batch, or None to use entire blocks
as batches (blocks may contain different number of rows).
The final batch may include fewer than ``batch_size`` rows if
``drop_last`` is ``False``. Defaults to 256.
``drop_last`` is ``False``. Defaults to None.
batch_format: The format in which to return each batch.
Specify "default" to use the default block format (promoting
tables to Pandas and tensors to NumPy), "pandas" to select
Expand Down