Repository navigation
[data] Point write_parquet's filename_provider docstring at pyarrow.dataset.write_dataset - #67600
Merged
Merged
Conversation
…ataset.write_dataset
ParquetDatasink writes through pyarrow.dataset.write_dataset, and the
{i} requirement comes from that function's basename_template argument.
The docstring linked pyarrow.parquet.write_to_dataset, which Ray's write
path doesn't call.
@rtd-build
Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request updates the documentation in python/ray/data/dataset.py to reference write_dataset instead of write_to_dataset, along with updating the corresponding URL to point to the correct PyArrow documentation. No review comments were provided, and the changes are straightforward and correct.
AarryaSaraf
approved these changes
Oct 30, 2026
dstrodtman
added a commit
that referenced
this pull request
Oct 30, 2026
…API (#67605) ## Summary Adds the missing docstrings, `Args:` entries, and `Returns:` sections on public Ray Data symbols in `aggregate`, `dataset`, `iterator`, `catalog`, `datasource`, `datatype`, and the public classes under `_internal`: the Databricks and LeRobot datasources and the object and tensor extensions. Each describes existing behavior, written from the code. It follows #67603, which covers the preprocessors. ## Before These symbols had no docstring, or their docstring had no section for some parameters or for the return value. `ApproximateQuantile` and `ApproximateTopK` kept their whole docstring on `__init__`, and the class reference page doesn't render that, so [their pages](https://docs.ray.io/en/master/data/api/doc/ray.data.aggregate.ApproximateQuantile.html) show no description. ## After The symbols are documented. The `ApproximateQuantile` and `ApproximateTopK` docstrings move, unchanged, from `__init__` to the class, so their pages show the description, examples, and arguments, and `__init__` drops out of their method tables. Where a base class lacked the docstring an override would inherit, this PR documents the base instead of each override: `Datasource.get_name`, `Datasource.estimate_inmemory_data_size`, `AggregateFn.output_field`, and `Catalog.resolve`. Behavior is unchanged. The diff touches only docstrings, which the guard below confirms. ## Subsystems API, IO, shuffle and aggregation, block and data format. Docstrings only. ## For reviewers These docstrings state behavior that looks unintended, so they're the ones worth a close read: - `PythonObjectArray.to_numpy` ignores `dtype`. - `ArrowPythonObjectArray.to_numpy` ignores `zero_copy_only` and `writable`. - `Dataset.__init__` now documents its arguments and keeps the note that the constructor isn't part of the public API. Three methods can't be documented without a signature change, so their code fixes and docstrings are in #67602: `ArrowPythonObjectScalar.as_py`, `ArrowTensorScalar.as_py`, and `ArrowPythonObjectArray.from_objects`. The `ArrowTensorScalar` class docstring sits directly above one of those signatures, so it's in #67602 too. #67602 also corrects the return annotation of `TensorArray.isna`, which this PR documents as returning a boolean NumPy array. ## Duplicate check No open PR documents these symbols. Open PRs #67600, #66927, #67238, and #67237 change other parts of `dataset.py`, and none of them edit the docstrings changed here. ## Testing - `python ci/ray_ci/doc/check_docstring_only.py --base "$(git merge-base upstream/master HEAD)"`: `docstring-only guard: 15 file(s), docstrings only.` - The full pre-commit suite on the changed files, including ruff, black, pydoclint, and the docstyle hook: passed. - The commit carries an `@rtd-build` line, so the Read the Docs preview renders the changed docstrings. AI assistance (Claude Code) was used to prepare this PR. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
The
filename_providerentry in theDataset.write_parquetdocstring says Ray Data adds{i}to the filename for compatibility with pyarrow'swrite_to_dataset, and linkspyarrow.parquet.write_to_dataset. Ray's write path doesn't call that function. This PR points the sentence and link atpyarrow.dataset.write_dataset, the function Ray actually calls.Before
The docstring named and linked
pyarrow.parquet.write_to_dataset. #66154 put that link in place to fix a 404. The link works, andwrite_to_datasetalso acceptsbasename_template, but it isn't the API Ray uses.After
The docstring names and links
pyarrow.dataset.write_dataset.ParquetDatasinkcalls it with thebasename_templatethat carries the{i}requirement:https://github.com/ray-project/ray/blob/5fe30798cd3/python/ray/data/_internal/datasource/parquet_datasink.py#L395-L399
_get_basename_templatein the same file builds that template and appends{i}when the filename lacks it (lines 336-355). Behavior is unchanged. Only the docstring text changes.Subsystems
API (docstring only)
Duplicate check
No open PR changes this docstring. I searched open PRs for
write_parquet filename_providerandwrite_to_dataset.Testing
python ci/ray_ci/doc/check_docstring_only.py --base "$(git merge-base upstream/master HEAD)":docstring-only guard: 1 file(s), docstrings only.AI assistance (Claude Code) was used to prepare this PR.
🤖 Generated with Claude Code