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] [Docs] Standardize API Refs for Input/Output #37017

Merged
merged 21 commits into from
Jul 7, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
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
Prev Previous commit
Next Next commit
fixes
Signed-off-by: amogkam <[email protected]>
  • Loading branch information
amogkam committed Jul 3, 2023
commit 7c2bb34b0ea2a8084c3314ffc894f098646e1cf9
2 changes: 1 addition & 1 deletion python/ray/data/dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -2852,7 +2852,7 @@ def write_numpy(
To control the number of number of blocks, call
:meth:`~ray.data.Dataset.repartition`.

By default, the format of the output files will be {uuid}_{block_idx}.npy,
By default, the format of the output files will be {uuid}_{block_idx}.npy,
amogkam marked this conversation as resolved.
Show resolved Hide resolved
amogkam marked this conversation as resolved.
Show resolved Hide resolved
where ``uuid`` is an unique id for the dataset. To modify this behavior,
implement a custom
:class:`~ray.data.datasource.BlockWritePathProvider`
Expand Down
2 changes: 1 addition & 1 deletion python/ray/data/read_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -1888,7 +1888,7 @@ def from_numpy_refs(
>>> ray.data.from_numpy(arr_ref)
MaterializedDataset(num_blocks=1, num_rows=1, schema={data: int64})

>>> # Create a Ray Dataset from a list of NumPy array references.
>>> # Create a Ray Dataset from a list of NumPy array references.
>>> ray.data.from_numpy([arr, arr])
MaterializedDataset(num_blocks=2, num_rows=2, schema={data: int64})

Expand Down
4 changes: 1 addition & 3 deletions rllib/offline/dataset_writer.py
Original file line number Diff line number Diff line change
Expand Up @@ -71,9 +71,7 @@ def write(self, sample_batch: SampleBatchType):
# Todo: We should flush at the end of sampling even if this
# condition was not reached.
if len(self.samples) >= self.max_num_samples_per_file:
ds = data.from_items(self.samples).repartition(
num_blocks=1, shuffle=False
)
ds = data.from_items(self.samples).repartition(num_blocks=1, shuffle=False)
if self.format == "json":
ds.write_json(self.path, try_create_dir=True)
elif self.format == "parquet":
Expand Down