Skip to content

[doc] Style pass on Ray Data overview pages - #66418

Merged
dstrodtman merged 7 commits into
masterfrom
doc-1524-data-style-core
Sep 30, 2026
Merged

dstrodtman merged 7 commits into
masterfrom
doc-1524-data-style-core

Conversation

@dstrodtman

@dstrodtman dstrodtman commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Style and grammar pass on five Ray Data overview pages against Ray's writing-style guide: index.md, quickstart.md, key-concepts.md, user-guide.md, and benchmark.md. Prose only: no code, testcode, URLs, anchors, or role targets changed.

Stacked on #66413. Review and merge that stack first. This branch targets doc-1524-data-style-pilot. It's the first of several PRs that apply the same pass to the rest of the top-level Ray Data pages.

All five pages

  • Sentence-cases headings, card titles, and button labels.
  • Rewords headings to the style guide: imperatives for the quickstart task sections ("Load data", "Consume data"), questions for conceptual sections ("What is a dataset?", "How does streaming execution work?"), and "Case studies" and "Quickstart" on the landing page. Each reworded heading gets an explicit label named after its old slug, such as (consuming-data)=, so existing URL fragments keep resolving. Two can't: quickstart#saving-data and index#quick-start, because saving-data.md and serve/llm/quick-start.md already define those label names. Nothing in the repo links to either fragment. The quickstart#datasets fragment is also dropped on purpose: Sphinx labels are global, so a label with a single-word name such as datasets would claim that name for the whole site and break the build of any later page that defines it.
  • Uses second person, active voice, present tense, and "such as" for examples. Recasts "lets", "allows", and "enables".
  • Removes dashes, parentheticals, filler, and marketing qualifiers such as "seamlessly", "performant", and "simple".
  • Adds list lead-ins, fixes list punctuation, and uses 1. for ordered lists.

Page-specific changes

  • index.md: Fixes "Hugging Face" and "pandas" spellings, fixes the "how to do perform" typo, and replaces the two bold pseudo-headings in the case studies with lead-in sentences. The advantages list is now a tight list.
  • quickstart.md: Keeps the opening list of section links with a new lead-in.
  • key-concepts.md: Converts the shuffle caveat into a note admonition and turns the non-sequential "during this translation" list into bullets. Names the operator classes as the source does: the logical read operator is Read, not ReadOp, and the fusion rule is FuseOperators, which replaced OperatorFusionRule. Keeps "Physical operators" plural in the list of what they do, because InputDataBuffer takes no input stream.
  • benchmark.md: Adds descriptive alt text to the results chart, taken from the chart's own axis and legend. Replaces bold header and row-label cells in the tables with :stub-columns: 1, and replaces "Link" link text with "Benchmark code". Every number, version, instance type, and S3 path is unchanged.
  • user-guide.md: Updates the quickstart link text to the new title casing.

Questions for reviewers

Apart from the two class names, this pass kept the scope of every claim. These points need a Ray Data maintainer:

  • benchmark.md data size: the page says "4TiB" and "4 TiB", but the S3 path says 10TiB-b64encoded-images-in-parquet-v3. Is 4 TiB a subset?
  • benchmark.md video workload: the workload list says "10k video frames" and the configuration table says "1,000 videos". The dataset is also "Hollywood2" in one place and "Hollywood-2" in the other.
  • benchmark.md run counts: the image-classification instance-type experiment averages three runs, but the summary says four, and its g6.8xlarge values match the summary table exactly.
  • benchmark.md bold results: the faster result in each column is bold, but nothing on the page says so.
  • key-concepts.md code: the streaming example is a plain python block with undefined names, so it isn't tested. Its comment "Create a dataset with 1K rows" doesn't match read_parquet(...). Two logical-plan output blocks have no language tag.
  • key-concepts.md alt text: the three {image} directives have no :alt: text. The first could reuse the surrounding prose, but the other two need someone who knows the diagrams.
  • benchmark.md warmup: the page says the warmup run "downloads the model". This wording predates this PR. In release/nightly_tests/multimodal_inference_benchmarks/, the image_classification, audio_transcription, and document_embedding scripts warm up by launching 64 no-op tasks to absorb cluster startup overhead, and video_object_detection has no warmup step. Should the sentence describe the task warmup instead?
  • key-concepts.md optimization order: the paragraph says Ray Data optimizes the logical plan and then translates it, but the list under it says both plans go through optimization passes during translation. This predates this PR. Which order is accurate?
  • index.md terms: the Key concepts card says "what Datasets are". Should that be the Dataset class or plain "datasets"? The page also uses "multi-modal" where Google style uses "multimodal".
  • index.md install block: the console block shows a $ prompt, which the style guide discourages.
  • quickstart.md opening list: the style guide says to skip opening lists that restate the headings below. I kept this one because removing it drops the page's only links to its section labels.
  • Link text elsewhere: five links in Train pages and notebooks still say "Ray Data Quickstart". They resolve and differ only in case, so they're out of scope here.

Verification

  • A meaning-diff review compared every before-and-after pair. It cleared 59 edits as cosmetic and found that 37 of the remaining 38 kept their meaning. It found one drift, a lead-in that made an example list exhaustive, fixed in a follow-up commit.
  • A second scan of the full diff found that the translation-list rewrite had changed "Physical operators work by" to "Each physical operator", which overstates the list. A follow-up commit restores the plural.
  • vale with Vale 3.12, run from the repo root: no warning- or error-level alerts on the five pages.
  • codespell: no hits.
  • The pre-commit hooks passed.
  • A structural check against each pre-edit file confirmed the code-fence count, role targets, anchors, and URLs are unchanged.
  • A grep for inbound links to every reworded heading found only the quickstart link text updated here and the Train links listed above.
  • benchmark.md is the only Ray page that uses :stub-columns:. Check the Read the Docs preview to confirm the first table column still renders as headers.

AI assistance

I made these edits with AI assistance (Claude Code).

🤖 Generated with Claude Code

@dstrodtman dstrodtman added the docs An issue or change related to documentation label Sep 23, 2026
@dstrodtman
dstrodtman requested review from a team as code owners September 23, 2026 11:43
@dstrodtman dstrodtman added the docs An issue or change related to documentation label Sep 23, 2026

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Code Review

This pull request refactors and improves the Ray Data documentation across several files, focusing on readability, grammatical clarity, and consistent sentence-case capitalization for headers. The review feedback suggests minor adjustments to maintain terminology consistency, such as using 'multimodal' instead of 'multi-modal', hyphenating 'Framework-friendly' and 'open-source', and adding a space in '4 TiB' for consistency.

Comment thread doc/source/data/index.md Resolved
Comment thread doc/source/data/index.md Resolved
Comment thread doc/source/data/benchmark.md Resolved
Comment thread doc/source/data/benchmark.md Resolved

@dstrodtman dstrodtman left a comment

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Meaning-diff review of this style pass: a check of whether any edit changed what the text asserts, not just how it reads.

  • 59 of 97 changed blocks are cosmetic, such as casing, "such as" for "like", list punctuation, blank lines, and table bolding. They're safe to skim.
  • 37 of the remaining 38 kept their meaning. A reviewer checked each against the pre-edit text and, where a claim touched behavior, the Ray source.
  • 1 drifted and is fixed in 9cb4bb7. key-concepts.md:68 had changed "During this translation:" to "Two things happen during this translation:", which made an example list exhaustive. It now reads "The following happens during this translation:".

The two inline comments are questions about claims that were in the text before this PR. The pass kept their meaning, but the Ray source doesn't back them as written. They need a Ray Data maintainer to decide.

This review was made with AI assistance (Claude Code).

- **105.81 ± 0.79**
```

Each result is the mean and standard deviation across four runs. A warmup run first downloads the model and removes startup overhead that would otherwise affect the result.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Question for the benchmark owner (predates this PR): this sentence, and the matching ones at L103 and L128, say the warmup run downloads the model. In release/nightly_tests/multimodal_inference_benchmarks/, the image_classification, audio_transcription, and document_embedding scripts warm up with ray.get([warmup.remote() for _ in range(64)]) on a no-op task. The code comment there says it's so that "benchmarks compare data processing speed and not cluster startup overhead." video_object_detection has no warmup step at all. Should these sentences describe the task warmup instead? For example: "A warmup launches tasks first so that cluster startup overhead doesn't affect the result."

Comment thread doc/source/data/key-concepts.md Outdated
1. A single logical operator may become multiple physical operators. For example, `ReadOp` becomes both `InputDataBuffer` and `TaskPoolMapOperator`.
2. Both logical and physical plans go through optimization passes. For example, `OperatorFusionRule` combines map operators to reduce serialization overhead.
* A single logical operator can become multiple physical operators. For example, `ReadOp` becomes both `InputDataBuffer` and `TaskPoolMapOperator`.
* Both logical and physical plans go through optimization passes. For example, `OperatorFusionRule` combines map operators to reduce serialization overhead.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Question (predates this PR): L68 says Ray Data optimizes the logical plan and then translates it. This item says both logical and physical plans go through optimization passes during translation. Which order is accurate? If logical optimization happens before translation, this item might belong outside the "during this translation" list.

@dstrodtman
dstrodtman force-pushed the doc-1524-data-style-core branch 2 times, most recently from 9d883ad to ed5ddfe Compare September 23, 2026 16:03
@dstrodtman
dstrodtman force-pushed the doc-1524-data-style-core branch from ed5ddfe to 5a41da7 Compare September 23, 2026 17:10
@dstrodtman
dstrodtman requested review from a team as code owners September 23, 2026 20:36
@dstrodtman
dstrodtman force-pushed the doc-1524-data-style-core branch from 5a41da7 to 9b67975 Compare September 24, 2026 11:54
Base automatically changed from doc-1524-data-style-pilot to master September 24, 2026 16:50
@richardliaw
richardliaw force-pushed the doc-1524-data-style-core branch from 7430ea9 to 9112c37 Compare September 24, 2026 16:50
@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Sep 24, 2026
dstrodtman and others added 7 commits September 24, 2026 15:22
Apply Ray's writing-style guide to the Ray Data landing page, quickstart,
key concepts, user guide index, and benchmarks page: sentence-case
headings, card titles, and button labels; use second person, active voice,
and "such as"; recast lets/allows/enables; remove dashes, parentheticals,
filler, and marketing qualifiers; add list lead-ins and fix list
punctuation; fix "Hugging Face" and "pandas" spellings; and add alt text
to the benchmark results chart. Update the quickstart link text in
user-guide.md to match the new title casing.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
The style pass changed "During this translation:" to "Two things happen
during this translation:", which claims the list is exhaustive. Restore the
original scope.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Use imperative headings for the quickstart task sections and question
headings for the conceptual sections of the quickstart and key concepts
pages, drop the redundant "for Ray Data" from the landing page's case
studies heading, and spell "Quickstart" as the product does. Add an explicit
label named after each old heading slug so existing URL fragments keep
resolving. Two old fragments, quickstart#saving-data and index#quick-start,
can't keep a label because saving-data.md and serve/llm/quick-start.md
already define those names; nothing in the repo links to either.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Hyphenate the "Framework-friendly" label, spell "multimodal" as the
benchmark page does, and write "4 TiB" with a space to match the page's
own table.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Sphinx labels are global, so an old-slug label with a single-word name
such as "datasets" reserves that name for the whole site and would break
the build of any later page that defines it. Nothing in the repo links to
the old quickstart#datasets fragment.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Vale's Google.Contractions rule errors on "What is". Nothing links to the
new heading's fragment.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
…a key concepts

The logical read operator is Read (read_operator.py) and the fusion rule is
FuseOperators (operator_fusion.py). No ReadOp class exists, and
OperatorFusionRule was renamed to FuseOperators.

The style pass had turned "Physical operators work by" into "Each physical
operator does the following", which overstates the list: InputDataBuffer takes
no input stream. Restore the plural.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman force-pushed the doc-1524-data-style-core branch from 9112c37 to f9eb0cf Compare September 24, 2026 19:22

@ronny-anyscale ronny-anyscale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

stamp

@dstrodtman
dstrodtman merged commit 448a9c9 into master Sep 30, 2026
6 checks passed
@dstrodtman
dstrodtman deleted the doc-1524-data-style-core branch September 30, 2026 14:43
dstrodtman added a commit that referenced this pull request Sep 30, 2026
## Description

Style and grammar pass on `doc/source/data/loading-data.md` against
Ray's [writing-style
guide](https://docs.ray.io/en/master/ray-contribute/writing-style.html).
Prose only, apart from one code fix: a missing comma in the Snowflake
example. No other code, testcode, code comments, or URLs changed.

Stacked on #66418. Review and merge that stack first. This branch
targets `doc-1524-data-style-core`. It's the second of several PRs that
apply the same pass to the top-level Ray Data pages.

### `loading-data.md`

- Rewords task headings as imperatives, such as "Read files" and "Load
data from ML libraries", and sentence-cases the H1 and tab titles. Each
reworded heading gets an explicit label named after its old slug, such
as `(reading-files-from-cloud-storage)=`, so existing URL fragments keep
resolving. Headings that already had a label, such as
`(loading_huggingface_datasets)=`, keep it with the new one stacked
beneath. The one exception is "Read from MongoDB": its existing
`(reading_mongodb)=` label already generates the `#reading-mongodb` id.
- Replaces the intro's bullet preview of the page's headings with one
sentence that keeps all three links, and adds a lead-in under "Load data
from other libraries".
- Uses "such as" for examples, second person, and active voice. Recasts
"lets" and "enables", and cuts filler such as "simply".
- Uses the vendor spellings "Hugging Face", "pandas", "Parquet", and
"Arrow".
- Puts quoted column names (`item`, `id`, `data`) in inline code.
- Changes "schema" to "scheme" for URI schemes, which matches the S3,
GCS, and Azure tabs.
- Fixes "underly" to "underlie" and adds lead-ins before code blocks.
- Describes the MongoDB `pipeline` as optional. The page said you need
one, but `read_mongo` declares it `Optional` with a `None` default and
reads the entire collection without one. It has been optional since at
least Ray 2.5. This is a factual correction.

### Other files

- Updates link text that quotes the old headings in
`batch-inference.rst`, `working-with-images.md`, and
`train/user-guides/data-loading-preprocessing.rst`. The matching
`read_api.py` docstring edits are in #66604.
- Fixes a link in `working-with-images.md` whose text says "Saving data"
but pointed at `loading_data`. It now points at `saving-data`.

## Questions for reviewers

Apart from the BigQuery and MongoDB corrections, this pass kept the
scope of every claim. These points need a Ray Data maintainer:

- **BigQuery:** "project ID, dataset, and query (if applicable)" now
reads "the project ID and either a dataset or a query". This is a
factual correction. The `read_bigquery` docstring says the two are
mutually exclusive, and `BigQueryDatasource` raises `ValueError` when
both are passed. Please confirm.
- **PostgreSQL:** "It's the most popular PostgreSQL database connector"
has no source.
- **Code the pass didn't touch:**
  - The GCS example uses `gcsfs.GCSFileSystem` without `import gcsfs`.
  - The MongoDB write example uses an undefined `MongoDatasource()`.
- The Azure example passes the filesystem to `read_parquet`
positionally.
  - The Zarr tab is a plain `python` block, not `testcode`.
- **Warnings and contractions:** Ray's guide says to avoid contractions
in warnings, but Vale's `Google.Contractions` rule errors on the
expanded forms, so the warnings keep their contractions. The guide and
the rule disagree.
- **Label placement:** `(reading_kafka)=` sits after the first paragraph
of the Kafka section rather than above the heading. I left it where it
is.

## Verification

- Follow-up commits apply fixes from automated review: the missing comma
in the Snowflake example, Hugging Face in the ML-libraries lead-in, and
`{func}` for `from_tf`.
- A meaning-diff review compared every before-and-after pair. It cleared
51 edits as cosmetic and found that 19 of the remaining 21 kept their
meaning. One drift, a permissive "you can" turned into an instruction,
is fixed in a follow-up commit. The BigQuery change is the intended
correction above.
- `vale` with Vale 3.12, run from the repo root: no warning- or
error-level alerts. Two suggestion-level alerts remain, both acronym
definitions ("HDFS" and "JVM") that the style guide requires.
- `codespell`: no hits.
- The pre-commit hooks passed.
- A structural check against the pre-edit file confirmed the code-fence
count, role targets, and URLs are unchanged. The only anchor changes are
the added old-slug labels. None were removed.
- Before adding each label, I grepped `doc/source` for the label name in
both hyphen and underscore forms. None collide.
- A grep for `{ref}` and Markdown links into this page found the link
text updated above and no other stale text.

## AI assistance

I made these edits with AI assistance (Claude Code).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
dstrodtman added a commit that referenced this pull request Sep 30, 2026
)

## Why are these changes needed?

The Ray Data style pass (#66413, #66418, #66419, #66420, #66422, #66423)
kept the scope of every technical claim. That round flagged statements
that disagree with the current source, or with other statements on the
same page. This PR fixes the ones the source settles. Each edit below
names the source it follows and, where one exists, the PR that caused
the drift.

Ray Data reviewers: please confirm each item. LLM owners: please check
the `working-with-llms.md` edits.

### Performance, monitoring, and configuration

- `performance-tips.md`: The default object store limit is 0.5, not 1/4.
`ResourceManager.DEFAULT_OBJECT_STORE_MEMORY_LIMIT_FRACTION` is 0.5 when
the resource allocator is on, and `op_resource_reservation_enabled`
defaults to `True`. Docs lag since #43171 (2.10).
- `performance-tips.md`: `select_columns` after `read_parquet` prunes at
read time. `ProjectionPushdown` is in `_LOGICAL_RULESET`, and
`ParquetDatasource.supports_projection_pushdown` returns true. Docs lag
since #56500 (2.50). The page now recommends the pattern its own example
uses.
- `performance-tips.md`: The "following procedure" lead-in introduced
bullets that don't describe a procedure. It now introduces them as
rules.
- `monitoring-your-workload.md`: Dropped `RAY_DATA_TRACE_SCHEDULING`,
which nothing under `python/` references anymore. It was removed in
#44399 (2.11).
- `monitoring-your-workload.md`: Dropped the
`ray.data._internal.progress_bar.ProgressBar.MAX_NAME_LENGTH` knob. The
module moved to `_internal/progress/progress_bar.py`, and the tqdm,
logging, and rich progress implementations read a separate copy in
`base_progress.py` (#59629, 2.54). The documented public setting,
`enable_progress_bar_name_truncation`, stays.
- `monitoring-your-workload.md`: The lead-in no longer says all three
settings reduce output. `use_ray_tqdm = False` changes the
implementation, not the amount of output.
- `execution-configurations.md`: Documents `retried_io_errors` in place
of `write_file_retry_on_errors`. `DataContext.__setattr__` warns that
the old option is deprecated. It was deprecated in #46685 (2.33). The
substring-then-regex matching comes from the `retried_io_errors`
docstring.
- `execution-configurations.md`: The example set `verbose_progress =
True`, which is already the default (#43360). It now sets
`preserve_order = True`.
- `how-to-avoid-ooms.md`: "Eliminates kernel OOMs" contradicted the
page's own later statement that kernel OOMs can still happen with
isolation enabled. It now uses the conditional wording of the page's
summary. For "older versions", the object store proportion warning was
removed in #62387, first released in 2.56. The node-death line no longer
cites a version.

### Shuffle, aggregation, joins, and mixing

- `internals.md`: The range-partitioning sampler takes `num_reducers *
10 / len(blocks)` samples per block (`SortTaskSpec.sample_boundaries`),
not 10. The docs were wrong from the start, #52987.
- `internals.md`: `random_shuffle` builds on `ShuffleTaskSpec`, with the
push-based scheduler under `SORT_SHUFFLE_PUSH_BASED` and the pull-based
scheduler otherwise (`planner/random_shuffle.py`). It doesn't use the
range-partitioning shuffle. The docs were wrong from the start, #65372.
- **Note:** #64875 now plans `sort()` on shuffle v2 by default. This PR
removes the stale "shuffle v2 doesn't support sort" claim from the
sentence it edits. It leaves documenting sort on shuffle v2, including
the "doesn't yet replace the range-partitioning shuffle" sentence, to
the Ray Data docs update for that change.
- `shuffling-data.md`: The push-based shuffle section now uses
`DataContext.shuffle_strategy` and `RAY_DATA_DEFAULT_SHUFFLE_STRATEGY`
instead of the deprecated `use_push_based_shuffle` and
`RAY_DATA_PUSH_BASED_SHUFFLE` (#50215, 2.43). The section also drops the
2022 log output: the "Using experimental push-based shuffle" line now
logs at debug level.
- `shuffling-data.md` and `joining-data.md`: Key-based repartitioning
and joins no longer link "hash-shuffle" to the legacy `HASH_SHUFFLE`
section. Shuffle v2 is the default for both.
- `shuffling-data.md`: Dropped "in increasing order of resource
consumption and runtime". The page's own benchmark shows `map_batches`
shuffle keeping more throughput than local buffer shuffle.
- `aggregating-data.md`: `AggregateFnV2` has two abstract methods,
`aggregate_block` and `combine`. `finalize` is optional and defaults to
returning the accumulator. The docs were wrong from the start, reworded
in #59311.
- `joining-data.md`: `_derive_max_shuffle_aggregators` caps the
aggregator count at the CPU count. One partition per aggregator also
needs at least `num_partitions` CPUs.
- `joining-data.md`: The lead-in offered `partition_size_hint` as a
tuning parameter, but the page says Ray Data ignores it.
- `mixing-data.md`: `MixOperator` interleaves whole blocks, but batches
can span blocks, as the page's note says. "Each local batch drawn from a
single dataset" now holds only when block sizes match the batch size.
- `saving-data.md`: `to_pandas()` builds the DataFrame in the calling
process by iterating batches. It doesn't build it on the head node.

### Overview, loading, and modality pages

- `key-concepts.md`: `get_execution_plan` runs the logical optimizer,
then the planner, then the physical optimizer. `FuseOperators` is a
physical rule. The paragraph no longer puts both passes "during this
translation".
- `key-concepts.md`: `Read` plans to `InputDataBuffer` plus a map
operator (`plan_read_op.py`), matching line 74 and `internals.md`. The
example also switches from `read_parquet` to `read_csv`, because
`read_parquet` goes through `ListFiles` and `ReadFiles` when
`use_datasource_v2` is on. That's the default since #64821 (2.57).
- `custom-datasource-example.md`: "Unstable internal APIs" is now
"developer APIs". `FileBasedDatasource` and `RowBasedFileDatasink` are
`@DeveloperAPI`, and `Datasource` is `@PublicAPI`.
- `loading-data.md`: `read_kafka` also accepts per-partition offsets.
`"earliest"` is valid only as a start offset and `"latest"` only as an
end offset (`kafka_datasource.py` raises otherwise).
- `working-with-llms.md`: Hosted OpenAI-compatible endpoints use
`HttpRequestProcessorConfig`, and `ServeDeploymentProcessorConfig`
addresses Ray Serve deployments. The intro was wrong from the start,
#59214.
- `working-with-llms.md`: `size` is a whole-input budget. For video,
Qwen3-VL's `smart_resize` compares `t * h * w` against it. The docs were
wrong from the start, #63593.
- `working-with-tensors.md`: `map_batches` raises `ValueError` for
`batch_size="auto"` when `num_gpus` is set (#62648).

## Duplicate check

This isn't duplicating an existing PR. I searched open `ray-project/ray`
PRs for Ray Data docs and shuffle docs work, and none edits these
statements. The one related open item is a planned Ray Data docs update
for #64875. This PR deliberately leaves that change's sort-on-shuffle-v2
content alone.

## Testing

- Ran the changed `testcode` snippets from `execution-configurations.md`
and `shuffling-data.md` against a Ray nightly wheel. `random_shuffle`
under `SORT_SHUFFLE_PUSH_BASED` returned all 1,000 rows, and
`RAY_DATA_DEFAULT_SHUFFLE_STRATEGY=sort_shuffle_push_based` resolves to
that strategy.
- `vale` on the 15 changed files shows no new findings compared to
`master`.
- `pre-commit` hooks passed on commit.
- I didn't run a local Sphinx build. The new cross-references target
existing API entries, and the Read the Docs preview covers the build.

## AI assistance

I used AI assistance (Claude Code) to trace each claim to the source and
draft the edits. I reviewed every changed line.

🤖 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]>
dstrodtman added a commit that referenced this pull request Oct 1, 2026
#66615)

## Why are these changes needed?

The Ray Data style-pass PRs (#66413, #66418, #66419, #66420, #66422,
#66423) left a set of mechanical and structural items open. This PR
clears them. None of the edits changes a technical claim, so it needs a
style review rather than an SME review.

**Markup and links**

- `key-concepts.md`: tags the two logical-plan output blocks as `text`,
and adds alt text to the three diagrams.
- `index.md`, `shuffling-data.md`: removes `$` prompts from shell
blocks.
- `aggregating-data.md`, `iterating-over-data.md`: uses `{meth}` instead
of `{class}` for `Dataset.max`, `min`, `sum`, and `random_shuffle`.
- `aggregating-data.md`: drops the trailing slash from the blog link
fragment `#performance-benchmarks/`.
- `train/getting-started-lightgbm.rst`,
`train/getting-started-xgboost.rst`, and two Lightning example
notebooks: replaces the hard-coded "Ray Data Quickstart" link text with
a bare reference, so the link renders the page title.
- `loading-data.md`: moves the `(reading_kafka)=` label above the Kafka
heading, stacked with `(reading-from-kafka)=`.

**Structure and wording**

- `quickstart.md`: replaces the opening bullet list, which restated the
section headings, with one sentence that keeps the section links.
- `custom-datasource-example.md`: renames the two "Implement the
constructor" headings to "Implement the datasource constructor" and
"Implement the datasink constructor". Nothing links to the old anchors.
- `loading-data.md`: moves the Iceberg tab from the distributed
DataFrame libraries tab set to the "Read files" tab set, since Iceberg
is a data format rather than a DataFrame library. The tab content is
unchanged.
- `loading-data.md`: drops the unsourced "most popular PostgreSQL
database connector" claim.
- `loading-data.md`: the Hugging Face paragraph now leads with the
token, which the example uses, and presents `HfFileSystem()` without a
token as the fallback for public datasets. See the [#66419 review
thread](#66419 (comment)).
- `working-with-llms.md`: moves the usage-data note out from under the
NIXL troubleshooting heading into its own closing section.
- `working-with-pytorch.md`: drops the `torchaudio` mention, since the
section has no `torchaudio` example.
- `index.md`: "what Datasets are" becomes "what a `Dataset` is",
matching the class that the linked key-concepts page defines.

**For reviewers**

- Please confirm the diagram alt text in `key-concepts.md`. I wrote it
from what each diagram shows.
- #66192 adds a REST-catalog example inside the Iceberg tab that this PR
moves. Whichever PR merges second needs a small rebase: the added
content moves with the tab, and its `:::` fences become `::::`.

## Related issue number

None. This isn't a duplicate: the items come from reviewing the merged
style-pass PRs above, and I searched open PRs touching
`doc/source/data/` for overlap. The only overlap is #66192, noted above.

## Checks

- [x] I've signed off every commit (DCO).
- [x] `pre-commit run --files <changed files>` passes. No hook covers
`doc/source` Markdown or notebooks, so every content hook skipped.
- [x] Checked that both edited notebooks still parse as JSON.
- [ ] Sphinx build: not run locally. Relying on the Read the Docs
preview for directive nesting and cross-reference resolution.

AI assistance (Claude Code) was used to make these edits. I reviewed
every changed line.

🤖 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]>
dstrodtman added a commit that referenced this pull request Oct 1, 2026
…ptions (#66604)

## Why are these changes needed?

This PR corrects Ray Data source text that disagrees with the renamed
docs headings or with the code it describes. It touches comments and
docstrings only.

### Link text that repeats renamed headings

The Ray Data style-pass stack renamed several headings to sentence case
and imperative form. Three docstrings in `python/ray/data/` carry
explicit `:ref:` titles that repeat the old heading text. This PR
updates them to match:

- `read_api.py`, `read_sql`: "Reading from SQL Databases" → "Read SQL
databases"
- `read_api.py`, `from_huggingface`: "Loading Hugging Face datasets" →
"Load Hugging Face datasets"
- `dataset.py`, `repartition`: "Advanced: Performance Tips and Tuning" →
"Advanced: Performance tips and tuning", and "Changing the number of
output files" → "Change the number of output files"
- `dataset.py`, `random_shuffle`: "Optimizing shuffles" → "Optimize
shuffles", and lowercases the start of an inline link that sits
mid-sentence

The labels don't change, so every reference resolves before and after
this PR. The only effect is that the rendered link text matches the
target heading.

### Source text that contradicts the code

- `context.py`, `max_hash_shuffle_aggregators`: the comment said the
default is twice the cluster CPU count. The code in `hash_shuffle.py`
uses `min(max(1, ceil(cluster CPUs)), max_hash_shuffle_aggregators or
DEFAULT_MAX_HASH_SHUFFLE_AGGREGATORS)`, and has never doubled since
#55510 added the comment and the code together. The comment now says the
CPU count, at least 1.
- `execution_options.py`, `ExecutionOptions.verbose_progress`: #43360
made the option on by default and added "On by default.", but left the
older sentence that described the off state as the default. That
sentence now describes the off state explicitly. This matches
`RAY_DATA_VERBOSE_PROGRESS` defaulting to `"1"`.

After this change the API reference agrees with the
`execution-configurations.md` and `joining-data.md` pages.

The link-text edits used to sit in #66419, #66420, and #66423. They
moved here so the docs-only PRs in the stack need only docs review.

## Related issue number

None. Follow-up to the stack starting at #66418.

## Checks

- Not a duplicate. No other open PR touches these docstrings or
comments.
- `pre-commit` passed on all four files, including ruff, black,
pydoclint, and the Ray docstyle check.
- The diff changes comment and docstring text only. No code, defaults,
or labels change.
- AI assistance (Claude Code) was used to prepare this PR. I reviewed
every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 2, 2026
## Why are these changes needed?

A style pass over the Ray Data guides
([#66418](#66418),
[#66419](#66419),
[#66420](#66420),
[#66422](#66422),
[#66461](#66461)) turned up code
examples that are broken as written. They raise if you copy them, or
they don't match what the surrounding text says. This PR fixes only
those examples. It doesn't convert untested blocks to tests.

| Page | Problem | Fix |
|---|---|---|
| `loading-data.md` | GCS example uses `gcsfs` without importing it. |
Import it. |
| `loading-data.md` | Azure example passes `filesystem` positionally,
but it's keyword-only in `read_parquet` (`TypeError`). | Pass it by
keyword. |
| `loading-data.md` | BigQuery
`dataset="bigquery-public-data.ml_datasets.iris"`. `BigQueryDatasource`
reads `dataset` as `dataset_id.table_id` under `project_id`, so this
resolves to dataset `bigquery-public-data`, table `ml_datasets`. | Use a
`my_dataset.my_table` placeholder, and say the format in the comment. |
| `loading-data.md` | `write_mongo` example passes an undefined
`MongoDatasource()`, and `write_mongo` has no such parameter. | Remove
it. |
| `saving-data.md` | GCS and Azure examples use `gcsfs` and `adlfs`
without importing them. | Import them. |
| `inspecting-data.md` | Output shows `Image shape:`, but the print has
no colon. | Add the colon to the print. |
| `shuffling-data.md` | Key-based repartition on `id`, but `ds` is a
`read_images` dataset with only `image`. It passed only because nothing
consumed the dataset. Consumed, it raises `KeyError: Field "id" does not
exist`. | Use `ray.data.range(1000)` and materialize. |
| `key-concepts.md` | Streaming example uses undefined UDF names and
`read_parquet(...)`, under a "1K rows" comment. | Define placeholder
UDFs and use `ray.data.range(1000)`. |
| `scaling-collation-functions.md` | Example reassigns `dataset` but
passes `train_dataset` to the trainer. | Use `train_dataset` throughout.
|
| `transforming-data.md` | Polars example: imports `pl` but calls
`polars.` (`NameError`). `from_pyarrow` and `DataFrame.summary` don't
exist in Polars. The block never consumed `ds`, so the UDF never ran. |
`pl.from_arrow`, `describe()`, and materialize. |
| `transforming-data.md` | pandas `map_groups` example calls
`group.drop("target")`, which drops rows by label and raises `KeyError`.
| `group.pop("target")`, which sets the column aside as the code
intends. Materialize. |

## Duplicate check

Searched open PRs for each affected API and page (`polars from_pyarrow`,
`map_groups`, `gcsfs`, `read_bigquery`, `write_mongo`, `repartition`,
collation). Nothing open addresses these examples.
[#66614](#66614) and
[#66615](#66615) edited some of
the same pages, but not these examples. Both have merged, and this
branch is rebased on them.

## Testing

Ran against the Ray nightly wheel (`3.0.0.dev0`, `674900c91fa`) on macOS
arm64, using the same pytest arguments and Data doctest plugin as the
`doctest_each` targets in `doc/BUILD.bazel`, with `pytest==7.4.4` and
Ray's `pytest-sphinx` fork:

```bash
python -m pytest --doctest-modules --doctest-glob='*.md' --disable-warnings -c NO_PYTEST_CONFIG \
  -p doctest_pytest_plugin doc/source/data/<page>.md
```

- `loading-data.md`, `saving-data.md`, `inspecting-data.md`,
`shuffling-data.md`, and `key-concepts.md` pass, before and after the
change.
- `transforming-data.md` is in `doctest[data-gpu]` and stops at a CUDA
block on a host without a GPU, before and after. So I ran its Iris setup
block and the two changed blocks as a standalone doctest file, and it
passes. Before the fix, those blocks raise `NameError` and `KeyError`
once the dataset is consumed.
- `key-concepts.md` streaming and `scaling-collation-functions.md` are
untested `python` blocks. I ran the streaming block with `num_gpus=1`
removed, and it runs. The collation change is a rename, checked by
reading.
- The `:skipif: True` GCS, Azure, BigQuery, and MongoDB blocks need
credentials, so I checked them against the current signatures in
`read_api.py` and `dataset.py` and `bigquery_datasource.py`.
- `pre-commit run` passes on the changed files.

This change touches only `.md` files, so premerge doesn't run the Data
doc example tests.

## AI assistance

Claude Code helped find the source for each fix, apply the edits, and
run the tests. I reviewed every changed line.

🤖 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]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
## Description

Style and grammar pass on five Ray Data overview pages against Ray's
[writing-style
guide](https://docs.ray.io/en/master/ray-contribute/writing-style.html):
`index.md`, `quickstart.md`, `key-concepts.md`, `user-guide.md`, and
`benchmark.md`. Prose only: no code, testcode, URLs, anchors, or role
targets changed.

Stacked on ray-project#66413. Review and merge that stack first. This branch
targets `doc-1524-data-style-pilot`. It's the first of several PRs that
apply the same pass to the rest of the top-level Ray Data pages.

### All five pages

- Sentence-cases headings, card titles, and button labels.
- Rewords headings to the style guide: imperatives for the quickstart
task sections ("Load data", "Consume data"), questions for conceptual
sections ("What is a dataset?", "How does streaming execution work?"),
and "Case studies" and "Quickstart" on the landing page. Each reworded
heading gets an explicit label named after its old slug, such as
`(consuming-data)=`, so existing URL fragments keep resolving. Two
can't: `quickstart#saving-data` and `index#quick-start`, because
`saving-data.md` and `serve/llm/quick-start.md` already define those
label names. Nothing in the repo links to either fragment. The
`quickstart#datasets` fragment is also dropped on purpose: Sphinx labels
are global, so a label with a single-word name such as `datasets` would
claim that name for the whole site and break the build of any later page
that defines it.
- Uses second person, active voice, present tense, and "such as" for
examples. Recasts "lets", "allows", and "enables".
- Removes dashes, parentheticals, filler, and marketing qualifiers such
as "seamlessly", "performant", and "simple".
- Adds list lead-ins, fixes list punctuation, and uses `1.` for ordered
lists.

### Page-specific changes

- `index.md`: Fixes "Hugging Face" and "pandas" spellings, fixes the
"how to do perform" typo, and replaces the two bold pseudo-headings in
the case studies with lead-in sentences. The advantages list is now a
tight list.
- `quickstart.md`: Keeps the opening list of section links with a new
lead-in.
- `key-concepts.md`: Converts the shuffle caveat into a `note`
admonition and turns the non-sequential "during this translation" list
into bullets. Names the operator classes as the source does: the logical
read operator is `Read`, not `ReadOp`, and the fusion rule is
`FuseOperators`, which replaced `OperatorFusionRule`. Keeps "Physical
operators" plural in the list of what they do, because `InputDataBuffer`
takes no input stream.
- `benchmark.md`: Adds descriptive alt text to the results chart, taken
from the chart's own axis and legend. Replaces bold header and row-label
cells in the tables with `:stub-columns: 1`, and replaces "Link" link
text with "Benchmark code". Every number, version, instance type, and S3
path is unchanged.
- `user-guide.md`: Updates the quickstart link text to the new title
casing.

## Questions for reviewers

Apart from the two class names, this pass kept the scope of every claim.
These points need a Ray Data maintainer:

- **`benchmark.md` data size:** the page says "4TiB" and "4 TiB", but
the S3 path says `10TiB-b64encoded-images-in-parquet-v3`. Is 4 TiB a
subset?
- **`benchmark.md` video workload:** the workload list says "10k video
frames" and the configuration table says "1,000 videos". The dataset is
also "Hollywood2" in one place and "Hollywood-2" in the other.
- **`benchmark.md` run counts:** the image-classification instance-type
experiment averages three runs, but the summary says four, and its
g6.8xlarge values match the summary table exactly.
- **`benchmark.md` bold results:** the faster result in each column is
bold, but nothing on the page says so.
- **`key-concepts.md` code:** the streaming example is a plain `python`
block with undefined names, so it isn't tested. Its comment "Create a
dataset with 1K rows" doesn't match `read_parquet(...)`. Two
logical-plan output blocks have no language tag.
- **`key-concepts.md` alt text:** the three `{image}` directives have no
`:alt:` text. The first could reuse the surrounding prose, but the other
two need someone who knows the diagrams.
- **`benchmark.md` warmup:** the page says the warmup run "downloads the
model". This wording predates this PR. In
`release/nightly_tests/multimodal_inference_benchmarks/`, the
`image_classification`, `audio_transcription`, and `document_embedding`
scripts warm up by launching 64 no-op tasks to absorb cluster startup
overhead, and `video_object_detection` has no warmup step. Should the
sentence describe the task warmup instead?
- **`key-concepts.md` optimization order:** the paragraph says Ray Data
optimizes the logical plan and then translates it, but the list under it
says both plans go through optimization passes during translation. This
predates this PR. Which order is accurate?
- **`index.md` terms:** the Key concepts card says "what Datasets are".
Should that be the `Dataset` class or plain "datasets"? The page also
uses "multi-modal" where Google style uses "multimodal".
- **`index.md` install block:** the `console` block shows a `$` prompt,
which the style guide discourages.
- **`quickstart.md` opening list:** the style guide says to skip opening
lists that restate the headings below. I kept this one because removing
it drops the page's only links to its section labels.
- **Link text elsewhere:** five links in Train pages and notebooks still
say "Ray Data Quickstart". They resolve and differ only in case, so
they're out of scope here.

## Verification

- A meaning-diff review compared every before-and-after pair. It cleared
59 edits as cosmetic and found that 37 of the remaining 38 kept their
meaning. It found one drift, a lead-in that made an example list
exhaustive, fixed in a follow-up commit.
- A second scan of the full diff found that the translation-list rewrite
had changed "Physical operators work by" to "Each physical operator",
which overstates the list. A follow-up commit restores the plural.
- `vale` with Vale 3.12, run from the repo root: no warning- or
error-level alerts on the five pages.
- `codespell`: no hits.
- The pre-commit hooks passed.
- A structural check against each pre-edit file confirmed the code-fence
count, role targets, anchors, and URLs are unchanged.
- A grep for inbound links to every reworded heading found only the
quickstart link text updated here and the Train links listed above.
- `benchmark.md` is the only Ray page that uses `:stub-columns:`. Check
the Read the Docs preview to confirm the first table column still
renders as headers.

## AI assistance

I made these edits with AI assistance (Claude Code).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
## Description

Style and grammar pass on `doc/source/data/loading-data.md` against
Ray's [writing-style
guide](https://docs.ray.io/en/master/ray-contribute/writing-style.html).
Prose only, apart from one code fix: a missing comma in the Snowflake
example. No other code, testcode, code comments, or URLs changed.

Stacked on ray-project#66418. Review and merge that stack first. This branch
targets `doc-1524-data-style-core`. It's the second of several PRs that
apply the same pass to the top-level Ray Data pages.

### `loading-data.md`

- Rewords task headings as imperatives, such as "Read files" and "Load
data from ML libraries", and sentence-cases the H1 and tab titles. Each
reworded heading gets an explicit label named after its old slug, such
as `(reading-files-from-cloud-storage)=`, so existing URL fragments keep
resolving. Headings that already had a label, such as
`(loading_huggingface_datasets)=`, keep it with the new one stacked
beneath. The one exception is "Read from MongoDB": its existing
`(reading_mongodb)=` label already generates the `#reading-mongodb` id.
- Replaces the intro's bullet preview of the page's headings with one
sentence that keeps all three links, and adds a lead-in under "Load data
from other libraries".
- Uses "such as" for examples, second person, and active voice. Recasts
"lets" and "enables", and cuts filler such as "simply".
- Uses the vendor spellings "Hugging Face", "pandas", "Parquet", and
"Arrow".
- Puts quoted column names (`item`, `id`, `data`) in inline code.
- Changes "schema" to "scheme" for URI schemes, which matches the S3,
GCS, and Azure tabs.
- Fixes "underly" to "underlie" and adds lead-ins before code blocks.
- Describes the MongoDB `pipeline` as optional. The page said you need
one, but `read_mongo` declares it `Optional` with a `None` default and
reads the entire collection without one. It has been optional since at
least Ray 2.5. This is a factual correction.

### Other files

- Updates link text that quotes the old headings in
`batch-inference.rst`, `working-with-images.md`, and
`train/user-guides/data-loading-preprocessing.rst`. The matching
`read_api.py` docstring edits are in ray-project#66604.
- Fixes a link in `working-with-images.md` whose text says "Saving data"
but pointed at `loading_data`. It now points at `saving-data`.

## Questions for reviewers

Apart from the BigQuery and MongoDB corrections, this pass kept the
scope of every claim. These points need a Ray Data maintainer:

- **BigQuery:** "project ID, dataset, and query (if applicable)" now
reads "the project ID and either a dataset or a query". This is a
factual correction. The `read_bigquery` docstring says the two are
mutually exclusive, and `BigQueryDatasource` raises `ValueError` when
both are passed. Please confirm.
- **PostgreSQL:** "It's the most popular PostgreSQL database connector"
has no source.
- **Code the pass didn't touch:**
  - The GCS example uses `gcsfs.GCSFileSystem` without `import gcsfs`.
  - The MongoDB write example uses an undefined `MongoDatasource()`.
- The Azure example passes the filesystem to `read_parquet`
positionally.
  - The Zarr tab is a plain `python` block, not `testcode`.
- **Warnings and contractions:** Ray's guide says to avoid contractions
in warnings, but Vale's `Google.Contractions` rule errors on the
expanded forms, so the warnings keep their contractions. The guide and
the rule disagree.
- **Label placement:** `(reading_kafka)=` sits after the first paragraph
of the Kafka section rather than above the heading. I left it where it
is.

## Verification

- Follow-up commits apply fixes from automated review: the missing comma
in the Snowflake example, Hugging Face in the ML-libraries lead-in, and
`{func}` for `from_tf`.
- A meaning-diff review compared every before-and-after pair. It cleared
51 edits as cosmetic and found that 19 of the remaining 21 kept their
meaning. One drift, a permissive "you can" turned into an instruction,
is fixed in a follow-up commit. The BigQuery change is the intended
correction above.
- `vale` with Vale 3.12, run from the repo root: no warning- or
error-level alerts. Two suggestion-level alerts remain, both acronym
definitions ("HDFS" and "JVM") that the style guide requires.
- `codespell`: no hits.
- The pre-commit hooks passed.
- A structural check against the pre-edit file confirmed the code-fence
count, role targets, and URLs are unchanged. The only anchor changes are
the added old-slug labels. None were removed.
- Before adding each label, I grepped `doc/source` for the label name in
both hyphen and underscore forms. None collide.
- A grep for `{ref}` and Markdown links into this page found the link
text updated above and no other stale text.

## AI assistance

I made these edits with AI assistance (Claude Code).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…-project#66614)

## Why are these changes needed?

The Ray Data style pass (ray-project#66413, ray-project#66418, ray-project#66419, ray-project#66420, ray-project#66422, ray-project#66423)
kept the scope of every technical claim. That round flagged statements
that disagree with the current source, or with other statements on the
same page. This PR fixes the ones the source settles. Each edit below
names the source it follows and, where one exists, the PR that caused
the drift.

Ray Data reviewers: please confirm each item. LLM owners: please check
the `working-with-llms.md` edits.

### Performance, monitoring, and configuration

- `performance-tips.md`: The default object store limit is 0.5, not 1/4.
`ResourceManager.DEFAULT_OBJECT_STORE_MEMORY_LIMIT_FRACTION` is 0.5 when
the resource allocator is on, and `op_resource_reservation_enabled`
defaults to `True`. Docs lag since ray-project#43171 (2.10).
- `performance-tips.md`: `select_columns` after `read_parquet` prunes at
read time. `ProjectionPushdown` is in `_LOGICAL_RULESET`, and
`ParquetDatasource.supports_projection_pushdown` returns true. Docs lag
since ray-project#56500 (2.50). The page now recommends the pattern its own example
uses.
- `performance-tips.md`: The "following procedure" lead-in introduced
bullets that don't describe a procedure. It now introduces them as
rules.
- `monitoring-your-workload.md`: Dropped `RAY_DATA_TRACE_SCHEDULING`,
which nothing under `python/` references anymore. It was removed in
ray-project#44399 (2.11).
- `monitoring-your-workload.md`: Dropped the
`ray.data._internal.progress_bar.ProgressBar.MAX_NAME_LENGTH` knob. The
module moved to `_internal/progress/progress_bar.py`, and the tqdm,
logging, and rich progress implementations read a separate copy in
`base_progress.py` (ray-project#59629, 2.54). The documented public setting,
`enable_progress_bar_name_truncation`, stays.
- `monitoring-your-workload.md`: The lead-in no longer says all three
settings reduce output. `use_ray_tqdm = False` changes the
implementation, not the amount of output.
- `execution-configurations.md`: Documents `retried_io_errors` in place
of `write_file_retry_on_errors`. `DataContext.__setattr__` warns that
the old option is deprecated. It was deprecated in ray-project#46685 (2.33). The
substring-then-regex matching comes from the `retried_io_errors`
docstring.
- `execution-configurations.md`: The example set `verbose_progress =
True`, which is already the default (ray-project#43360). It now sets
`preserve_order = True`.
- `how-to-avoid-ooms.md`: "Eliminates kernel OOMs" contradicted the
page's own later statement that kernel OOMs can still happen with
isolation enabled. It now uses the conditional wording of the page's
summary. For "older versions", the object store proportion warning was
removed in ray-project#62387, first released in 2.56. The node-death line no longer
cites a version.

### Shuffle, aggregation, joins, and mixing

- `internals.md`: The range-partitioning sampler takes `num_reducers *
10 / len(blocks)` samples per block (`SortTaskSpec.sample_boundaries`),
not 10. The docs were wrong from the start, ray-project#52987.
- `internals.md`: `random_shuffle` builds on `ShuffleTaskSpec`, with the
push-based scheduler under `SORT_SHUFFLE_PUSH_BASED` and the pull-based
scheduler otherwise (`planner/random_shuffle.py`). It doesn't use the
range-partitioning shuffle. The docs were wrong from the start, ray-project#65372.
- **Note:** ray-project#64875 now plans `sort()` on shuffle v2 by default. This PR
removes the stale "shuffle v2 doesn't support sort" claim from the
sentence it edits. It leaves documenting sort on shuffle v2, including
the "doesn't yet replace the range-partitioning shuffle" sentence, to
the Ray Data docs update for that change.
- `shuffling-data.md`: The push-based shuffle section now uses
`DataContext.shuffle_strategy` and `RAY_DATA_DEFAULT_SHUFFLE_STRATEGY`
instead of the deprecated `use_push_based_shuffle` and
`RAY_DATA_PUSH_BASED_SHUFFLE` (ray-project#50215, 2.43). The section also drops the
2022 log output: the "Using experimental push-based shuffle" line now
logs at debug level.
- `shuffling-data.md` and `joining-data.md`: Key-based repartitioning
and joins no longer link "hash-shuffle" to the legacy `HASH_SHUFFLE`
section. Shuffle v2 is the default for both.
- `shuffling-data.md`: Dropped "in increasing order of resource
consumption and runtime". The page's own benchmark shows `map_batches`
shuffle keeping more throughput than local buffer shuffle.
- `aggregating-data.md`: `AggregateFnV2` has two abstract methods,
`aggregate_block` and `combine`. `finalize` is optional and defaults to
returning the accumulator. The docs were wrong from the start, reworded
in ray-project#59311.
- `joining-data.md`: `_derive_max_shuffle_aggregators` caps the
aggregator count at the CPU count. One partition per aggregator also
needs at least `num_partitions` CPUs.
- `joining-data.md`: The lead-in offered `partition_size_hint` as a
tuning parameter, but the page says Ray Data ignores it.
- `mixing-data.md`: `MixOperator` interleaves whole blocks, but batches
can span blocks, as the page's note says. "Each local batch drawn from a
single dataset" now holds only when block sizes match the batch size.
- `saving-data.md`: `to_pandas()` builds the DataFrame in the calling
process by iterating batches. It doesn't build it on the head node.

### Overview, loading, and modality pages

- `key-concepts.md`: `get_execution_plan` runs the logical optimizer,
then the planner, then the physical optimizer. `FuseOperators` is a
physical rule. The paragraph no longer puts both passes "during this
translation".
- `key-concepts.md`: `Read` plans to `InputDataBuffer` plus a map
operator (`plan_read_op.py`), matching line 74 and `internals.md`. The
example also switches from `read_parquet` to `read_csv`, because
`read_parquet` goes through `ListFiles` and `ReadFiles` when
`use_datasource_v2` is on. That's the default since ray-project#64821 (2.57).
- `custom-datasource-example.md`: "Unstable internal APIs" is now
"developer APIs". `FileBasedDatasource` and `RowBasedFileDatasink` are
`@DeveloperAPI`, and `Datasource` is `@PublicAPI`.
- `loading-data.md`: `read_kafka` also accepts per-partition offsets.
`"earliest"` is valid only as a start offset and `"latest"` only as an
end offset (`kafka_datasource.py` raises otherwise).
- `working-with-llms.md`: Hosted OpenAI-compatible endpoints use
`HttpRequestProcessorConfig`, and `ServeDeploymentProcessorConfig`
addresses Ray Serve deployments. The intro was wrong from the start,
ray-project#59214.
- `working-with-llms.md`: `size` is a whole-input budget. For video,
Qwen3-VL's `smart_resize` compares `t * h * w` against it. The docs were
wrong from the start, ray-project#63593.
- `working-with-tensors.md`: `map_batches` raises `ValueError` for
`batch_size="auto"` when `num_gpus` is set (ray-project#62648).

## Duplicate check

This isn't duplicating an existing PR. I searched open `ray-project/ray`
PRs for Ray Data docs and shuffle docs work, and none edits these
statements. The one related open item is a planned Ray Data docs update
for ray-project#64875. This PR deliberately leaves that change's sort-on-shuffle-v2
content alone.

## Testing

- Ran the changed `testcode` snippets from `execution-configurations.md`
and `shuffling-data.md` against a Ray nightly wheel. `random_shuffle`
under `SORT_SHUFFLE_PUSH_BASED` returned all 1,000 rows, and
`RAY_DATA_DEFAULT_SHUFFLE_STRATEGY=sort_shuffle_push_based` resolves to
that strategy.
- `vale` on the 15 changed files shows no new findings compared to
`master`.
- `pre-commit` hooks passed on commit.
- I didn't run a local Sphinx build. The new cross-references target
existing API entries, and the Read the Docs preview covers the build.

## AI assistance

I used AI assistance (Claude Code) to trace each claim to the source and
draft the edits. I reviewed every changed line.

🤖 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]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
ray-project#66615)

## Why are these changes needed?

The Ray Data style-pass PRs (ray-project#66413, ray-project#66418, ray-project#66419, ray-project#66420, ray-project#66422,
ray-project#66423) left a set of mechanical and structural items open. This PR
clears them. None of the edits changes a technical claim, so it needs a
style review rather than an SME review.

**Markup and links**

- `key-concepts.md`: tags the two logical-plan output blocks as `text`,
and adds alt text to the three diagrams.
- `index.md`, `shuffling-data.md`: removes `$` prompts from shell
blocks.
- `aggregating-data.md`, `iterating-over-data.md`: uses `{meth}` instead
of `{class}` for `Dataset.max`, `min`, `sum`, and `random_shuffle`.
- `aggregating-data.md`: drops the trailing slash from the blog link
fragment `#performance-benchmarks/`.
- `train/getting-started-lightgbm.rst`,
`train/getting-started-xgboost.rst`, and two Lightning example
notebooks: replaces the hard-coded "Ray Data Quickstart" link text with
a bare reference, so the link renders the page title.
- `loading-data.md`: moves the `(reading_kafka)=` label above the Kafka
heading, stacked with `(reading-from-kafka)=`.

**Structure and wording**

- `quickstart.md`: replaces the opening bullet list, which restated the
section headings, with one sentence that keeps the section links.
- `custom-datasource-example.md`: renames the two "Implement the
constructor" headings to "Implement the datasource constructor" and
"Implement the datasink constructor". Nothing links to the old anchors.
- `loading-data.md`: moves the Iceberg tab from the distributed
DataFrame libraries tab set to the "Read files" tab set, since Iceberg
is a data format rather than a DataFrame library. The tab content is
unchanged.
- `loading-data.md`: drops the unsourced "most popular PostgreSQL
database connector" claim.
- `loading-data.md`: the Hugging Face paragraph now leads with the
token, which the example uses, and presents `HfFileSystem()` without a
token as the fallback for public datasets. See the [ray-project#66419 review
thread](ray-project#66419 (comment)).
- `working-with-llms.md`: moves the usage-data note out from under the
NIXL troubleshooting heading into its own closing section.
- `working-with-pytorch.md`: drops the `torchaudio` mention, since the
section has no `torchaudio` example.
- `index.md`: "what Datasets are" becomes "what a `Dataset` is",
matching the class that the linked key-concepts page defines.

**For reviewers**

- Please confirm the diagram alt text in `key-concepts.md`. I wrote it
from what each diagram shows.
- ray-project#66192 adds a REST-catalog example inside the Iceberg tab that this PR
moves. Whichever PR merges second needs a small rebase: the added
content moves with the tab, and its `:::` fences become `::::`.

## Related issue number

None. This isn't a duplicate: the items come from reviewing the merged
style-pass PRs above, and I searched open PRs touching
`doc/source/data/` for overlap. The only overlap is ray-project#66192, noted above.

## Checks

- [x] I've signed off every commit (DCO).
- [x] `pre-commit run --files <changed files>` passes. No hook covers
`doc/source` Markdown or notebooks, so every content hook skipped.
- [x] Checked that both edited notebooks still parse as JSON.
- [ ] Sphinx build: not run locally. Relying on the Read the Docs
preview for directive nesting and cross-reference resolution.

AI assistance (Claude Code) was used to make these edits. I reviewed
every changed line.

🤖 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]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…ptions (ray-project#66604)

## Why are these changes needed?

This PR corrects Ray Data source text that disagrees with the renamed
docs headings or with the code it describes. It touches comments and
docstrings only.

### Link text that repeats renamed headings

The Ray Data style-pass stack renamed several headings to sentence case
and imperative form. Three docstrings in `python/ray/data/` carry
explicit `:ref:` titles that repeat the old heading text. This PR
updates them to match:

- `read_api.py`, `read_sql`: "Reading from SQL Databases" → "Read SQL
databases"
- `read_api.py`, `from_huggingface`: "Loading Hugging Face datasets" →
"Load Hugging Face datasets"
- `dataset.py`, `repartition`: "Advanced: Performance Tips and Tuning" →
"Advanced: Performance tips and tuning", and "Changing the number of
output files" → "Change the number of output files"
- `dataset.py`, `random_shuffle`: "Optimizing shuffles" → "Optimize
shuffles", and lowercases the start of an inline link that sits
mid-sentence

The labels don't change, so every reference resolves before and after
this PR. The only effect is that the rendered link text matches the
target heading.

### Source text that contradicts the code

- `context.py`, `max_hash_shuffle_aggregators`: the comment said the
default is twice the cluster CPU count. The code in `hash_shuffle.py`
uses `min(max(1, ceil(cluster CPUs)), max_hash_shuffle_aggregators or
DEFAULT_MAX_HASH_SHUFFLE_AGGREGATORS)`, and has never doubled since
ray-project#55510 added the comment and the code together. The comment now says the
CPU count, at least 1.
- `execution_options.py`, `ExecutionOptions.verbose_progress`: ray-project#43360
made the option on by default and added "On by default.", but left the
older sentence that described the off state as the default. That
sentence now describes the off state explicitly. This matches
`RAY_DATA_VERBOSE_PROGRESS` defaulting to `"1"`.

After this change the API reference agrees with the
`execution-configurations.md` and `joining-data.md` pages.

The link-text edits used to sit in ray-project#66419, ray-project#66420, and ray-project#66423. They
moved here so the docs-only PRs in the stack need only docs review.

## Related issue number

None. Follow-up to the stack starting at ray-project#66418.

## Checks

- Not a duplicate. No other open PR touches these docstrings or
comments.
- `pre-commit` passed on all four files, including ruff, black,
pydoclint, and the Ray docstyle check.
- The diff changes comment and docstring text only. No code, defaults,
or labels change.
- AI assistance (Claude Code) was used to prepare this PR. I reviewed
every changed line.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 5.5 (1M context) <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…ect#66636)

## Why are these changes needed?

A style pass over the Ray Data guides
([ray-project#66418](ray-project#66418),
[ray-project#66419](ray-project#66419),
[ray-project#66420](ray-project#66420),
[ray-project#66422](ray-project#66422),
[ray-project#66461](ray-project#66461)) turned up code
examples that are broken as written. They raise if you copy them, or
they don't match what the surrounding text says. This PR fixes only
those examples. It doesn't convert untested blocks to tests.

| Page | Problem | Fix |
|---|---|---|
| `loading-data.md` | GCS example uses `gcsfs` without importing it. |
Import it. |
| `loading-data.md` | Azure example passes `filesystem` positionally,
but it's keyword-only in `read_parquet` (`TypeError`). | Pass it by
keyword. |
| `loading-data.md` | BigQuery
`dataset="bigquery-public-data.ml_datasets.iris"`. `BigQueryDatasource`
reads `dataset` as `dataset_id.table_id` under `project_id`, so this
resolves to dataset `bigquery-public-data`, table `ml_datasets`. | Use a
`my_dataset.my_table` placeholder, and say the format in the comment. |
| `loading-data.md` | `write_mongo` example passes an undefined
`MongoDatasource()`, and `write_mongo` has no such parameter. | Remove
it. |
| `saving-data.md` | GCS and Azure examples use `gcsfs` and `adlfs`
without importing them. | Import them. |
| `inspecting-data.md` | Output shows `Image shape:`, but the print has
no colon. | Add the colon to the print. |
| `shuffling-data.md` | Key-based repartition on `id`, but `ds` is a
`read_images` dataset with only `image`. It passed only because nothing
consumed the dataset. Consumed, it raises `KeyError: Field "id" does not
exist`. | Use `ray.data.range(1000)` and materialize. |
| `key-concepts.md` | Streaming example uses undefined UDF names and
`read_parquet(...)`, under a "1K rows" comment. | Define placeholder
UDFs and use `ray.data.range(1000)`. |
| `scaling-collation-functions.md` | Example reassigns `dataset` but
passes `train_dataset` to the trainer. | Use `train_dataset` throughout.
|
| `transforming-data.md` | Polars example: imports `pl` but calls
`polars.` (`NameError`). `from_pyarrow` and `DataFrame.summary` don't
exist in Polars. The block never consumed `ds`, so the UDF never ran. |
`pl.from_arrow`, `describe()`, and materialize. |
| `transforming-data.md` | pandas `map_groups` example calls
`group.drop("target")`, which drops rows by label and raises `KeyError`.
| `group.pop("target")`, which sets the column aside as the code
intends. Materialize. |

## Duplicate check

Searched open PRs for each affected API and page (`polars from_pyarrow`,
`map_groups`, `gcsfs`, `read_bigquery`, `write_mongo`, `repartition`,
collation). Nothing open addresses these examples.
[ray-project#66614](ray-project#66614) and
[ray-project#66615](ray-project#66615) edited some of
the same pages, but not these examples. Both have merged, and this
branch is rebased on them.

## Testing

Ran against the Ray nightly wheel (`3.0.0.dev0`, `674900c91fa`) on macOS
arm64, using the same pytest arguments and Data doctest plugin as the
`doctest_each` targets in `doc/BUILD.bazel`, with `pytest==7.4.4` and
Ray's `pytest-sphinx` fork:

```bash
python -m pytest --doctest-modules --doctest-glob='*.md' --disable-warnings -c NO_PYTEST_CONFIG \
  -p doctest_pytest_plugin doc/source/data/<page>.md
```

- `loading-data.md`, `saving-data.md`, `inspecting-data.md`,
`shuffling-data.md`, and `key-concepts.md` pass, before and after the
change.
- `transforming-data.md` is in `doctest[data-gpu]` and stops at a CUDA
block on a host without a GPU, before and after. So I ran its Iris setup
block and the two changed blocks as a standalone doctest file, and it
passes. Before the fix, those blocks raise `NameError` and `KeyError`
once the dataset is consumed.
- `key-concepts.md` streaming and `scaling-collation-functions.md` are
untested `python` blocks. I ran the streaming block with `num_gpus=1`
removed, and it runs. The collation change is a rename, checked by
reading.
- The `:skipif: True` GCS, Azure, BigQuery, and MongoDB blocks need
credentials, so I checked them against the current signatures in
`read_api.py` and `dataset.py` and `bigquery_datasource.py`.
- `pre-commit run` passes on the changed files.

This change touches only `.md` files, so premerge doesn't run the Data
doc example tests.

## AI assistance

Claude Code helped find the source for each fix, apply the edits, and
run the tests. I reviewed every changed line.

🤖 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]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs An issue or change related to documentation go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants