Skip to content

Commit

Permalink
[Data] Clarify that num_rows_per_file isn't strict (ray-project#45529)
Browse files Browse the repository at this point in the history
The parameter name num_rows_per_file suggests that the resulting files should have exactly the specified number of rows, but that isn't the case. This PR clarifies that the value is more of a hint.

Signed-off-by: Balaji Veeramani <[email protected]>
  • Loading branch information
bveeramani authored May 24, 2024
1 parent 4fb670b commit 48e5711
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions python/ray/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2795,6 +2795,8 @@ def write_parquet(
arguments for each dataset block.
num_rows_per_file: The target number of rows to write to each file. If
``None``, Ray Data writes a system-chosen number of rows to each file.
The specified value is a hint, not a strict limit. Ray Data might write
more or fewer rows to each file.
ray_remote_args: Kwargs passed to :meth:`~ray.remote` in the write tasks.
concurrency: The maximum number of Ray tasks to run concurrently. Set this
to control number of tasks to run concurrently. This doesn't change the
Expand Down Expand Up @@ -2903,6 +2905,8 @@ def write_json(
arguments for each dataset block.
num_rows_per_file: The target number of rows to write to each file. If
``None``, Ray Data writes a system-chosen number of rows to each file.
The specified value is a hint, not a strict limit. Ray Data might write
more or fewer rows to each file.
ray_remote_args: kwargs passed to :meth:`~ray.remote` in the write tasks.
concurrency: The maximum number of Ray tasks to run concurrently. Set this
to control number of tasks to run concurrently. This doesn't change the
Expand Down Expand Up @@ -3083,6 +3087,8 @@ def write_csv(
write arguments for each dataset block.
num_rows_per_file: The target number of rows to write to each file. If
``None``, Ray Data writes a system-chosen number of rows to each file.
The specified value is a hint, not a strict limit. Ray Data might write
more or fewer rows to each file.
ray_remote_args: kwargs passed to :meth:`~ray.remote` in the write tasks.
concurrency: The maximum number of Ray tasks to run concurrently. Set this
to control number of tasks to run concurrently. This doesn't change the
Expand Down Expand Up @@ -3183,6 +3189,8 @@ def write_tfrecords(
look like.
num_rows_per_file: The target number of rows to write to each file. If
``None``, Ray Data writes a system-chosen number of rows to each file.
The specified value is a hint, not a strict limit. Ray Data might write
more or fewer rows to each file.
ray_remote_args: kwargs passed to :meth:`~ray.remote` in the write tasks.
concurrency: The maximum number of Ray tasks to run concurrently. Set this
to control number of tasks to run concurrently. This doesn't change the
Expand Down Expand Up @@ -3267,6 +3275,8 @@ def write_webdataset(
implementation to write each dataset block to a custom output path.
num_rows_per_file: The target number of rows to write to each file. If
``None``, Ray Data writes a system-chosen number of rows to each file.
The specified value is a hint, not a strict limit. Ray Data might write
more or fewer rows to each file.
ray_remote_args: Kwargs passed to ``ray.remote`` in the write tasks.
concurrency: The maximum number of Ray tasks to run concurrently. Set this
to control number of tasks to run concurrently. This doesn't change the
Expand Down Expand Up @@ -3354,6 +3364,8 @@ def write_numpy(
look like.
num_rows_per_file: The target number of rows to write to each file. If
``None``, Ray Data writes a system-chosen number of rows to each file.
The specified value is a hint, not a strict limit. Ray Data might write
more or fewer rows to each file.
ray_remote_args: kwargs passed to :meth:`~ray.remote` in the write tasks.
concurrency: The maximum number of Ray tasks to run concurrently. Set this
to control number of tasks to run concurrently. This doesn't change the
Expand Down

0 comments on commit 48e5711

Please sign in to comment.