Skip to content

[doc] Style pass on Ray Data performance and internals pages - #66423

Merged
dstrodtman merged 6 commits into
masterfrom
doc-1524-data-style-perf
Sep 30, 2026
Merged

dstrodtman merged 6 commits into
masterfrom
doc-1524-data-style-perf

Conversation

@dstrodtman

@dstrodtman dstrodtman commented Sep 23, 2026 •

Copy link
Copy Markdown
Contributor

Description

Style and grammar pass on six Ray Data performance and internals pages against Ray's writing-style guide: performance-tips.md, how-to-avoid-ooms.md, execution-configurations.md, concurrent-dataset-execution.md, monitoring-your-workload.md, and internals.md. Prose only: no code, testcode, literalinclude blocks, code comments, log samples, or URLs changed.

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

All six pages

  • Rewords task headings as imperatives, such as "Optimize reads" and "Configure the progress bar", and conceptual headings as questions, such as "How does Ray Data schedule tasks?". Each reworded heading keeps its old URL fragment through an explicit label named after the old slug, unless the heading already had a matching label.
  • Doesn't keep old fragments whose slug is a generic word, such as #configuration, #blocks, #datasets, and #best-practices. Sphinx labels are global, so a label with a generic name would claim it for the whole site and break the build of any later page that defines it. One more old fragment, internals#datasets-and-blocks, can't be kept because key-concepts.md already defines that label name. Nothing in the repo links to any of these fragments.
  • Uses second person, active voice, present tense, and "such as" for examples. Recasts "lets", "allows", and "enables", and firms up soft recommendations while keeping factual hedges.
  • Removes em dashes, parentheticals, semicolons, first-person plural, and filler.
  • Adds one-sentence lead-ins under headings that went straight into a subheading, fixes list lead-ins and punctuation, and uses 1. for ordered lists.

Page-specific changes

  • performance-tips.md: Adds a page opening and lead-ins under five H2s.
  • how-to-avoid-ooms.md: Rewrites the three dashboard chart alt texts from the charts themselves. The node-count chart's alt text had been copied from another chart.
  • execution-configurations.md: Labels the real old fragments for the two headings that contain a role. MyST builds those headings' slugs without the role text.
  • concurrent-dataset-execution.md: Recasts eight em dashes and replaces "Ray Data Datasets" with "Datasets".
  • monitoring-your-workload.md: Makes each metric table's cell punctuation consistent and replaces slashes in prose.
  • internals.md: Lowercases "Ray tasks" and "Ray actors", and keeps the signal that shuffle v2 doesn't yet replace the range-partitioning shuffle. Names the operator classes as the source does: Read, not ReadOp, and FuseOperators, which replaced OperatorFusionRule.

Other files

Questions for reviewers

These points need a Ray Data maintainer. Each one predates this PR unless noted.

  • Column pruning (performance-tips.md): the prose says passing columns to read_parquet is more efficient than calling select_columns, but the example under it uses select_columns, and Ray Data has projection-pushdown optimizer rules.
  • Output blocks (performance-tips.md): a lead-in says Ray Data selects the number of output blocks "according to the following procedure", but the bullets after it don't describe a procedure.
  • Read operator (internals.md): this page says the planner translates the Read operator into InputDataBuffer plus TaskPoolMapOperator. key-concepts.md says the same in one place and says it becomes only a TaskPoolMapOperator in another.
  • Resource isolation (how-to-avoid-ooms.md): "Resource isolation ... eliminates kernel OOMs and node deaths" is absolute, while the tuning section says "you shouldn't see OOMs or node deaths". The page also refers to "older versions" of Ray without a version.
  • block_transform_time_s (monitoring-your-workload.md): the Task metrics table says only map operators report block_transform_time_s, but the Operator stats item says read, write, and map operators all report it. The Output block build item also cites data_block_serialization_time_s, which none of the page's metric tables list.
  • write_file_retry_on_errors (execution-configurations.md): the page lists it among the most important options, but context.py deprecates it in favor of retried_io_errors and warns when you set it.
  • Object store limit (performance-tips.md): the page says Ray Data limits object store use to 1/4 of the object store by default. resource_manager.py uses 0.25 only when OpResourceAllocator is off, and RAY_DATA_OBJECT_STORE_MEMORY_LIMIT_FRACTION, which defaults to 0.5, when it's on.
  • Sort sampling (internals.md): the range-partitioning shuffle section says Ray Data samples 10 rows per block. sort_task_spec.py computes num_reducers * 10 / len(blocks) samples per block.
  • random_shuffle backend (internals.md): the page says Dataset.random_shuffle uses the range-partitioning shuffle, but random_shuffle.py builds on ShuffleTaskSpec, not the range-partitioning SortTaskSpec.
  • RAY_DATA_TRACE_SCHEDULING (monitoring-your-workload.md): nothing under python/ references this environment variable, so the setting may be stale.

Verification

  • A follow-up commit applies source-verified fixes from automated review:
    • verbose_progress is on by default (RAY_DATA_VERBOSE_PROGRESS defaults to 1), so the sentence now describes the off state as the off state.
    • max_errored_blocks tolerates no blocks with errors by default.
    • The Prometheus URL uses port 9090, as in the cluster metrics guide.
    • Custom rules go through get_logical_ruleset and get_physical_ruleset.
    • Hash-shuffling is available starting in Ray 2.46, where HASH_SHUFFLE first appears.
    • "Configure resources" drops "locality", which the section doesn't cover.
    • Multitenancy is on a shared Ray cluster instead of an Anyscale workspace.
  • A meaning-diff review compared every before-and-after pair. A conservative filter cleared 43 blocks as cosmetic, and reviewers checked the remaining blocks against the pre-edit text and the Ray source. Eight drifted and are fixed in a follow-up commit. Most were soft recommendations, such as "consider" and "you might want to", that had become instructions. The others were a host-dependent buffer size stated as a fixed minimum, DataConfig described as the only place to set selectors, a dropped "advanced users" audience, and a planning lead-in that left out one subsection. The same commit lists the monitoring page's execution states as examples, because DatasetState also has PENDING and UNKNOWN.
  • A second scan of the full diff found five more soft recommendations that had become instructions: tuning block counts, the ranked spilling strategy, limiting resource usage, trying isolate_read_workers, and optimizing the iteration loop. A follow-up commit restores them.
  • vale with Vale 3.12, run from the repo root: no warning- or error-level alerts on any doc/source/data/*.md page in the stack.
  • codespell: no hits.
  • The pre-commit hooks passed.
  • A structural check against each 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 hyphen and underscore forms.

AI assistance

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

🤖 Generated with Claude Code

@dstrodtman
dstrodtman requested review from a team as code owners September 23, 2026 15:42
@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 performs a comprehensive copyediting and restructuring of the Ray Data documentation to improve readability, formatting, and technical accuracy. The feedback from the review is highly constructive, pointing out several documentation errors and areas for improvement. Specifically, the feedback recommends correcting the default behavior of verbose_progress to 'Off by default', clarifying that max_errored_blocks limits tolerated errored blocks rather than task retries, correcting the default Prometheus port to 9090, removing vendor-specific branding, aligning the optimization rules prose with the actual API, and clarifying feature versioning terminology.

Comment thread doc/source/data/performance-tips.md Resolved
Comment thread doc/source/data/internals.md Resolved
Comment thread doc/source/data/internals.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. It checks whether any edit changed what the text asserts, not just how it reads.

  • 43 of 283 changed blocks are cosmetic, such as casing, punctuation, list markers, old-slug labels, and "such as" for "like". A deliberately conservative filter kept every rewording for review.
  • Nearly all the rest kept their meaning. Reviewers checked each block against the pre-edit text and, where a claim touched behavior, against the Ray source. They confirmed the new actors, such as Ray Data's ResourceManager setting the default limits and the dashboard grouping panels by dataset and operator, the max_errored_blocks and write_file_retry_on_errors defaults, and that shuffle v2 doesn't yet cover sort.
  • 8 drifted and are fixed in 53fca29. Most were soft recommendations, such as "consider" and "you might want to", that the pass turned into instructions. The others were a host-dependent buffer stated as a fixed minimum, DataConfig described as the only place to set selectors, a dropped "advanced users" audience, and a lead-in that left out one subsection.

The inline comments are questions about claims that predate this PR. The source doesn't back them as written. The PR description has the rest.

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

1. **Sampling phase:** every input block is randomly sampled for 10 rows. Samples are combined into a single dataset, which is then sorted and split into the target number of partitions defining approximate *range boundaries*.
2. **Partition phase:** every block is sorted and split into partitions based on the *range boundaries* derived in the previous step.
3. **Reduce phase:** individual partitions within the same range are then recombined to produce the resulting block.
1. **Sampling phase:** Ray Data randomly samples 10 rows from every input block and combines the samples into a single dataset. It then sorts that dataset and splits it into the target number of partitions, which define approximate *range boundaries*.

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): this says Ray Data samples 10 rows from every input block. python/ray/data/_internal/planner/exchange/sort_task_spec.py computes n_samples = int(num_reducers * 10 / len(blocks)), so the per-block count depends on the reducer and block counts. It's about 10 samples per reducer in total. Should this sentence describe that?

During execution, Ray Data periodically logs updates to `ray-data.log`.

Every five seconds, Ray Data logs the execution progress of every operator in the dataset. For more frequent updates, set `RAY_DATA_TRACE_SCHEDULING=1` so that the progress is logged after each task is dispatched.
Every five seconds, Ray Data logs the execution progress of every operator in the dataset. For more frequent updates, set `RAY_DATA_TRACE_SCHEDULING=1` so that Ray Data logs the progress after it dispatches each task.

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): this mentions RAY_DATA_TRACE_SCHEDULING, but a search of python/ at this commit finds no reference to it. Is the environment variable still supported, or should the sentence drop it?

@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.

stylish

dstrodtman added a commit that referenced this pull request Sep 28, 2026
…ervability pages to MyST (#66461)

## Why are these changes needed?

Converts the last non-API-reference RST pages under `ray-core/`,
`data/`, and `rllib/` to MyST Markdown, plus the `train/` and
`ray-observability/` pages that `doc/BUILD.bazel` names by path. The API
reference trees (`*/api/`, `rllib/package_ref/`, and
`ray-core/compiled-graph/compiled-graph-api`) stay RST for now.

Each page gets its own commit, so you can review one file at a time.
Every commit renames the page's literal `.rst` paths in
`doc/BUILD.bazel` to `.md`. These paths are in `exclude` lists and in
the explicit `files` lists of `doctest[data-gpu]` and
`doctest[train-gpu]`, and they don't glob. Without the edit, an excluded
page would silently join its target once it's `.md`, and an included
page would silently drop out of it.

Conversions are format-only: labels, headings, and prose are unchanged.
A final whitespace-only commit soft-wraps the prose. `ray-soft-wrap`'s
`verify.py` confirms non-whitespace bytes, rendered HTML, and
idempotence for all 11 files.

### `rllib/getting-started`: doctest target removed

The first commit deletes `doctest[rllib2]`, the only target over
`rllib/getting-started.rst`, before the page converts. The target is
tagged `manual` with a hang TODO, so no premerge or postmerge step has
run it, and nothing else references it (`git grep rllib2` is empty). Its
15 `testcode` blocks had no `testoutput`, so they asserted nothing. The
12 visible blocks become display-only `python` code blocks. The three
`:hide:` blocks held `.stop()` cleanups that never rendered, so they're
deleted. `doctest[rllib]` still excludes the page. If these examples
should be validated later, a `doc_code/` script is the better route than
reviving the hanging target. cc @elliot-barn, who owns the TODO.

This commit isn't buildable on its own. It turns a `.. testcode::` that
had no blank line before its body into a `.. code-block:: python`, still
with no blank line, and docutils reads the body as extra arguments to
the directive. The later conversion commit fixes it in the `.md`, and a
squash merge never puts the intermediate commit on master.

### Doctest coverage

Docs-only PRs don't run doctests premerge. This PR edits
`doc/BUILD.bazel`, so every library's docs example step runs, but
premerge can't show the conversion kept the same blocks. For that, I
parsed each `.md` and the `.rst` it replaced with Ray's `pytest-sphinx`
fork, the same parser the doctest macro runs, and asserted identical
sections (directive, body, `:options:`, `:skipif:`) and examples.

| Page | BUILD role | Examples before → after |
| --- | --- | --- |
| `ray-core/handling-dependencies` | `doctest[core]` exclude | 17 → 17 |
| `ray-core/tasks/nested-tasks` | `doctest[core]` exclude | 0 → 0
(`literalinclude` of a tested `doc_code/` file) |
| `data/batch-inference` | `doctest_each` exclude, `doctest[data-gpu]`
files | 7 → 7 |
| `data/transforming-data` | `doctest_each` exclude, `doctest[data-gpu]`
files | 24 → 24 |
| `data/contributing/contributing` | `doctest_each` glob | 0 → 0
(toctree only) |
| `rllib/getting-started` | `doctest[rllib]` exclude, `doctest[rllib2]`
removed | 15 → 0, by the removal commit |
| `ray-observability/user-guides/cli-sdk` | top-level exclude | 16 → 16
|
| `ray-observability/user-guides/ray-tracing` | top-level exclude | 3 →
3 |
| `train/horovod` | `doctest[train]` exclude | 2 → 2 |
| `train/user-guides/data-loading-preprocessing` | `doctest[train]`
exclude, `doctest[train-gpu]` files | 6 → 6 |
| `train/user-guides/using-accelerators` | `doctest[train]` exclude,
`doctest[train-gpu]` files | 10 → 10 |

To show the check would catch a broken conversion, I mutated each page
with examples three ways: dropping a `testcode` block, altering a line
in one, and turning one into a four-backtick fence. The last renders
fine but is never collected. The check failed on all 24 mutations.

### Rendering changes

I ran `render_diff.py` on all 11 pages against `/en/master`. Six render
identically: `nested-tasks`, `data/contributing/contributing`,
`cli-sdk`, `ray-tracing`, `horovod`, and `using-accelerators`. Every
difference on the other five is listed here.

- `rllib/getting-started`: on master, one `.. testcode::` line had no
blank line after it. docutils read the block's first six lines, the
`best_result = results.get_best_result(...)` call, as the directive's
argument and dropped them. So master shows code that uses `best_result`
without showing where it comes from. The converted page renders all six
lines. This is the one place the conversion deliberately doesn't
reproduce master.
- `rllib/getting-started`: the "Farama gymnasium" link now has
`https://`. On master it's a relative link to `gymnasium.farama.org`
that 404s.
- `ray-core/handling-dependencies`: MyST drops the apostrophe when it
slugifies the "can't import the packages" heading, so the section id
changes. That heading had no label, so the page adds a target carrying
the old docutils slug, and existing `#...-can-t-import-...` links still
resolve. An auto-numbered span id, which nothing links to, also changes
from `id4` to `id2`.
- `data/batch-inference` and
`train/user-guides/data-loading-preprocessing`: each renders an RST
comment as an HTML comment, which readers never see.
- `data/transforming-data`: the "When using" definition list's `<dl>`
gains the unstyled `myst` class.

The first preview diff also caught three regressions that the green
build didn't. MyST's `replacements` extension turned two `(c)` list
markers into `©` and an `etc..` into `etc…`. The anchor above had
changed too. A follow-up commit fixes all three. A sweep of the 11 pages
found no other text that extension rewrites.

### Dead `doc/BUILD.bazel` excludes

A final commit drops four `exclude` entries that name files that have
moved: two in `doctest[serve]` and two in the serve `doc_code` test. A
glob exclude naming a missing file excludes nothing, so these had
silently stopped applying. This doesn't change what any target runs.
#66462 carries the same commit, along with a lint check that fails on
this class of stale path, so the two PRs merge cleanly in either order.

### Open PRs that edit these files

Each of these open PRs edits one of the converted `.rst` files, so each
will need to move its change to the `.md`: #66279, #66191, #65956,
#65933, and #65830 (`handling-dependencies`), #65693 (`cli-sdk`), and
#66419, #66420, #66422, and #66423 (`data/batch-inference`,
`train/user-guides/data-loading-preprocessing`). #66096, #64053, and
#63881 also edit `doc/BUILD.bazel`, and only #66096 edits nearby lines.

## Related issue number

None. No open PR converts these pages. I checked `gh pr list` for open
PRs touching each file.

## Checks

- [x] I've signed off every commit (`git commit -s`).
- [x] Pre-commit hooks passed on every commit.
- Doctest parity: `python3 doctest_parity.py <the 11 .md files>` with
`pytest==7.4.4` and `pytest-sphinx @
git+https://github.com/ray-project/pytest-sphinx`. All OK, run again
after the soft-wrap commit.
- Static checks on every `.md`: fences balance, no leftover RST roles or
directives, every label from the `.rst` is present, and directive counts
match.
- Read the Docs preview builds green under `fail_on_warning`, and the
render diff against `/en/master` is in Rendering changes. The first
build hit the known autosummary-import segfault and passed on rebuild.
- Local doctest run: not done. The GPU targets need hardware, and the
CPU targets run in this PR's premerge because of the `BUILD.bazel`
change.

AI assistance (Claude Code) was used for the conversion and the
verification scripts.

🤖 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
dstrodtman force-pushed the doc-1524-data-style-perf branch from 59efc27 to fd865ea Compare September 30, 2026 14:39
Base automatically changed from doc-1524-data-style-modalities to master September 30, 2026 15:17
dstrodtman and others added 2 commits September 30, 2026 11:18
Apply Ray's writing-style guide to the Ray Data performance tips, OOM,
execution configuration, concurrent execution, monitoring, and internals
pages: use imperative task headings and question headings for concepts,
with a label for each specific old heading slug so existing URL fragments
keep resolving; use second person, active voice, and "such as"; recast em
dashes, parentheticals, semicolons, and filler; add lead-ins under stacked
headings; and describe the OOM dashboard charts in their alt text.

Update link text on other pages and in a dataset.py docstring that quotes
the old headings.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
A meaning review found eight edits that changed what the text asserts,
mostly soft recommendations turned into instructions:

- performance-tips: restore "consider repartitioning" and two "you might
  want to" hedges on the resource-limit scenarios.
- how-to-avoid-ooms: keep the 1 GiB buffer host-dependent and hedged.
- concurrent-dataset-execution: describe DataConfig as the more convenient
  entry point again, not the only place to set selectors.
- monitoring-your-workload: restore the "might be more useful" hedge and
  the "advanced users" audience, and list execution states as examples,
  since DatasetState also has PENDING and UNKNOWN.
- internals: name all five subsections in the planning lead-in.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman and others added 4 commits September 30, 2026 11:18
Fix the verbose_progress and max_errored_blocks defaults, the default Prometheus port (9090, as in the cluster metrics guide), and the custom-rule instructions, which now match get_logical_ruleset. Say hash-shuffling is available starting in Ray 2.46, drop "locality" from a heading whose section doesn't cover it, and describe multitenancy on a shared Ray cluster instead of an Anyscale workspace.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
Renaming the heading to "Optimize reads" changed its generated anchor, so the
performance-tips.md#optimizing-reads link no longer resolved and failed the
docs build. Reference the explicit label, which doesn't change with the heading.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
…y Data perf pages

The style pass turned five suggestions into instructions: tuning block counts,
the ranked spilling strategy, limiting resource usage, trying
isolate_read_workers, and optimizing the iteration loop. Restore the original
strength, as the earlier meaning-drift fixes on this branch did for the others.

The logical read operator is Read and the fusion rule is FuseOperators. No
ReadOp class exists, and OperatorFusionRule was renamed.

Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
The docstring link-text updates need Ray Data code-owner review. They
move to their own PR at the top of this stack so the docs-only pages
can land on docs review alone.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman force-pushed the doc-1524-data-style-perf branch from fd865ea to efdf2c8 Compare September 30, 2026 15:18
@dstrodtman
dstrodtman merged commit 6b72e6b into master Sep 30, 2026
6 checks passed
@dstrodtman
dstrodtman deleted the doc-1524-data-style-perf branch September 30, 2026 15:32
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]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…ervability pages to MyST (ray-project#66461)

## Why are these changes needed?

Converts the last non-API-reference RST pages under `ray-core/`,
`data/`, and `rllib/` to MyST Markdown, plus the `train/` and
`ray-observability/` pages that `doc/BUILD.bazel` names by path. The API
reference trees (`*/api/`, `rllib/package_ref/`, and
`ray-core/compiled-graph/compiled-graph-api`) stay RST for now.

Each page gets its own commit, so you can review one file at a time.
Every commit renames the page's literal `.rst` paths in
`doc/BUILD.bazel` to `.md`. These paths are in `exclude` lists and in
the explicit `files` lists of `doctest[data-gpu]` and
`doctest[train-gpu]`, and they don't glob. Without the edit, an excluded
page would silently join its target once it's `.md`, and an included
page would silently drop out of it.

Conversions are format-only: labels, headings, and prose are unchanged.
A final whitespace-only commit soft-wraps the prose. `ray-soft-wrap`'s
`verify.py` confirms non-whitespace bytes, rendered HTML, and
idempotence for all 11 files.

### `rllib/getting-started`: doctest target removed

The first commit deletes `doctest[rllib2]`, the only target over
`rllib/getting-started.rst`, before the page converts. The target is
tagged `manual` with a hang TODO, so no premerge or postmerge step has
run it, and nothing else references it (`git grep rllib2` is empty). Its
15 `testcode` blocks had no `testoutput`, so they asserted nothing. The
12 visible blocks become display-only `python` code blocks. The three
`:hide:` blocks held `.stop()` cleanups that never rendered, so they're
deleted. `doctest[rllib]` still excludes the page. If these examples
should be validated later, a `doc_code/` script is the better route than
reviving the hanging target. cc @elliot-barn, who owns the TODO.

This commit isn't buildable on its own. It turns a `.. testcode::` that
had no blank line before its body into a `.. code-block:: python`, still
with no blank line, and docutils reads the body as extra arguments to
the directive. The later conversion commit fixes it in the `.md`, and a
squash merge never puts the intermediate commit on master.

### Doctest coverage

Docs-only PRs don't run doctests premerge. This PR edits
`doc/BUILD.bazel`, so every library's docs example step runs, but
premerge can't show the conversion kept the same blocks. For that, I
parsed each `.md` and the `.rst` it replaced with Ray's `pytest-sphinx`
fork, the same parser the doctest macro runs, and asserted identical
sections (directive, body, `:options:`, `:skipif:`) and examples.

| Page | BUILD role | Examples before → after |
| --- | --- | --- |
| `ray-core/handling-dependencies` | `doctest[core]` exclude | 17 → 17 |
| `ray-core/tasks/nested-tasks` | `doctest[core]` exclude | 0 → 0
(`literalinclude` of a tested `doc_code/` file) |
| `data/batch-inference` | `doctest_each` exclude, `doctest[data-gpu]`
files | 7 → 7 |
| `data/transforming-data` | `doctest_each` exclude, `doctest[data-gpu]`
files | 24 → 24 |
| `data/contributing/contributing` | `doctest_each` glob | 0 → 0
(toctree only) |
| `rllib/getting-started` | `doctest[rllib]` exclude, `doctest[rllib2]`
removed | 15 → 0, by the removal commit |
| `ray-observability/user-guides/cli-sdk` | top-level exclude | 16 → 16
|
| `ray-observability/user-guides/ray-tracing` | top-level exclude | 3 →
3 |
| `train/horovod` | `doctest[train]` exclude | 2 → 2 |
| `train/user-guides/data-loading-preprocessing` | `doctest[train]`
exclude, `doctest[train-gpu]` files | 6 → 6 |
| `train/user-guides/using-accelerators` | `doctest[train]` exclude,
`doctest[train-gpu]` files | 10 → 10 |

To show the check would catch a broken conversion, I mutated each page
with examples three ways: dropping a `testcode` block, altering a line
in one, and turning one into a four-backtick fence. The last renders
fine but is never collected. The check failed on all 24 mutations.

### Rendering changes

I ran `render_diff.py` on all 11 pages against `/en/master`. Six render
identically: `nested-tasks`, `data/contributing/contributing`,
`cli-sdk`, `ray-tracing`, `horovod`, and `using-accelerators`. Every
difference on the other five is listed here.

- `rllib/getting-started`: on master, one `.. testcode::` line had no
blank line after it. docutils read the block's first six lines, the
`best_result = results.get_best_result(...)` call, as the directive's
argument and dropped them. So master shows code that uses `best_result`
without showing where it comes from. The converted page renders all six
lines. This is the one place the conversion deliberately doesn't
reproduce master.
- `rllib/getting-started`: the "Farama gymnasium" link now has
`https://`. On master it's a relative link to `gymnasium.farama.org`
that 404s.
- `ray-core/handling-dependencies`: MyST drops the apostrophe when it
slugifies the "can't import the packages" heading, so the section id
changes. That heading had no label, so the page adds a target carrying
the old docutils slug, and existing `#...-can-t-import-...` links still
resolve. An auto-numbered span id, which nothing links to, also changes
from `id4` to `id2`.
- `data/batch-inference` and
`train/user-guides/data-loading-preprocessing`: each renders an RST
comment as an HTML comment, which readers never see.
- `data/transforming-data`: the "When using" definition list's `<dl>`
gains the unstyled `myst` class.

The first preview diff also caught three regressions that the green
build didn't. MyST's `replacements` extension turned two `(c)` list
markers into `©` and an `etc..` into `etc…`. The anchor above had
changed too. A follow-up commit fixes all three. A sweep of the 11 pages
found no other text that extension rewrites.

### Dead `doc/BUILD.bazel` excludes

A final commit drops four `exclude` entries that name files that have
moved: two in `doctest[serve]` and two in the serve `doc_code` test. A
glob exclude naming a missing file excludes nothing, so these had
silently stopped applying. This doesn't change what any target runs.
ray-project#66462 carries the same commit, along with a lint check that fails on
this class of stale path, so the two PRs merge cleanly in either order.

### Open PRs that edit these files

Each of these open PRs edits one of the converted `.rst` files, so each
will need to move its change to the `.md`: ray-project#66279, ray-project#66191, ray-project#65956,
ray-project#65933, and ray-project#65830 (`handling-dependencies`), ray-project#65693 (`cli-sdk`), and
ray-project#66419, ray-project#66420, ray-project#66422, and ray-project#66423 (`data/batch-inference`,
`train/user-guides/data-loading-preprocessing`). ray-project#66096, ray-project#64053, and
ray-project#63881 also edit `doc/BUILD.bazel`, and only ray-project#66096 edits nearby lines.

## Related issue number

None. No open PR converts these pages. I checked `gh pr list` for open
PRs touching each file.

## Checks

- [x] I've signed off every commit (`git commit -s`).
- [x] Pre-commit hooks passed on every commit.
- Doctest parity: `python3 doctest_parity.py <the 11 .md files>` with
`pytest==7.4.4` and `pytest-sphinx @
git+https://github.com/ray-project/pytest-sphinx`. All OK, run again
after the soft-wrap commit.
- Static checks on every `.md`: fences balance, no leftover RST roles or
directives, every label from the `.rst` is present, and directive counts
match.
- Read the Docs preview builds green under `fail_on_warning`, and the
render diff against `/en/master` is in Rendering changes. The first
build hit the known autosummary-import segfault and passed on rebuild.
- Local doctest run: not done. The GPU targets need hardware, and the
CPU targets run in this PR's premerge because of the `BUILD.bazel`
change.

AI assistance (Claude Code) was used for the conversion and the
verification scripts.

🤖 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
…ject#66423)

## Description

Style and grammar pass on six Ray Data performance and internals pages
against Ray's [writing-style
guide](https://docs.ray.io/en/master/ray-contribute/writing-style.html):
`performance-tips.md`, `how-to-avoid-ooms.md`,
`execution-configurations.md`, `concurrent-dataset-execution.md`,
`monitoring-your-workload.md`, and `internals.md`. Prose only: no code,
testcode, literalinclude blocks, code comments, log samples, or URLs
changed.

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

### All six pages

- Rewords task headings as imperatives, such as "Optimize reads" and
"Configure the progress bar", and conceptual headings as questions, such
as "How does Ray Data schedule tasks?". Each reworded heading keeps its
old URL fragment through an explicit label named after the old slug,
unless the heading already had a matching label.
- Doesn't keep old fragments whose slug is a generic word, such as
`#configuration`, `#blocks`, `#datasets`, and `#best-practices`. Sphinx
labels are global, so a label with a generic name would claim it for the
whole site and break the build of any later page that defines it. One
more old fragment, `internals#datasets-and-blocks`, can't be kept
because `key-concepts.md` already defines that label name. Nothing in
the repo links to any of these fragments.
- Uses second person, active voice, present tense, and "such as" for
examples. Recasts "lets", "allows", and "enables", and firms up soft
recommendations while keeping factual hedges.
- Removes em dashes, parentheticals, semicolons, first-person plural,
and filler.
- Adds one-sentence lead-ins under headings that went straight into a
subheading, fixes list lead-ins and punctuation, and uses `1.` for
ordered lists.

### Page-specific changes

- `performance-tips.md`: Adds a page opening and lead-ins under five
H2s.
- `how-to-avoid-ooms.md`: Rewrites the three dashboard chart alt texts
from the charts themselves. The node-count chart's alt text had been
copied from another chart.
- `execution-configurations.md`: Labels the real old fragments for the
two headings that contain a role. MyST builds those headings' slugs
without the role text.
- `concurrent-dataset-execution.md`: Recasts eight em dashes and
replaces "Ray Data Datasets" with "Datasets".
- `monitoring-your-workload.md`: Makes each metric table's cell
punctuation consistent and replaces slashes in prose.
- `internals.md`: Lowercases "Ray tasks" and "Ray actors", and keeps the
signal that shuffle v2 doesn't yet replace the range-partitioning
shuffle. Names the operator classes as the source does: `Read`, not
`ReadOp`, and `FuseOperators`, which replaced `OperatorFusionRule`.

### Other files

- Updates link text that quotes the old headings in `loading-data.md`,
`joining-data.md`, `shuffling-data.md`, and `batch-inference.rst`. The
matching `dataset.py` docstring edit is in ray-project#66604.

## Questions for reviewers

These points need a Ray Data maintainer. Each one predates this PR
unless noted.

- **Column pruning (`performance-tips.md`):** the prose says passing
columns to `read_parquet` is more efficient than calling
`select_columns`, but the example under it uses `select_columns`, and
Ray Data has projection-pushdown optimizer rules.
- **Output blocks (`performance-tips.md`):** a lead-in says Ray Data
selects the number of output blocks "according to the following
procedure", but the bullets after it don't describe a procedure.
- **Read operator (`internals.md`):** this page says the planner
translates the `Read` operator into `InputDataBuffer` plus
`TaskPoolMapOperator`. `key-concepts.md` says the same in one place and
says it becomes only a `TaskPoolMapOperator` in another.
- **Resource isolation (`how-to-avoid-ooms.md`):** "Resource isolation
... eliminates kernel OOMs and node deaths" is absolute, while the
tuning section says "you shouldn't see OOMs or node deaths". The page
also refers to "older versions" of Ray without a version.
- **`block_transform_time_s` (`monitoring-your-workload.md`):** the Task
metrics table says only map operators report `block_transform_time_s`,
but the Operator stats item says read, write, and map operators all
report it. The Output block build item also cites
`data_block_serialization_time_s`, which none of the page's metric
tables list.
- **`write_file_retry_on_errors` (`execution-configurations.md`):** the
page lists it among the most important options, but `context.py`
deprecates it in favor of `retried_io_errors` and warns when you set it.
- **Object store limit (`performance-tips.md`):** the page says Ray Data
limits object store use to 1/4 of the object store by default.
`resource_manager.py` uses 0.25 only when `OpResourceAllocator` is off,
and `RAY_DATA_OBJECT_STORE_MEMORY_LIMIT_FRACTION`, which defaults to
0.5, when it's on.
- **Sort sampling (`internals.md`):** the range-partitioning shuffle
section says Ray Data samples 10 rows per block. `sort_task_spec.py`
computes `num_reducers * 10 / len(blocks)` samples per block.
- **`random_shuffle` backend (`internals.md`):** the page says
`Dataset.random_shuffle` uses the range-partitioning shuffle, but
`random_shuffle.py` builds on `ShuffleTaskSpec`, not the
range-partitioning `SortTaskSpec`.
- **`RAY_DATA_TRACE_SCHEDULING` (`monitoring-your-workload.md`):**
nothing under `python/` references this environment variable, so the
setting may be stale.

## Verification

- A follow-up commit applies source-verified fixes from automated
review:
- `verbose_progress` is on by default (`RAY_DATA_VERBOSE_PROGRESS`
defaults to `1`), so the sentence now describes the off state as the off
state.
  - `max_errored_blocks` tolerates no blocks with errors by default.
  - The Prometheus URL uses port 9090, as in the cluster metrics guide.
- Custom rules go through `get_logical_ruleset` and
`get_physical_ruleset`.
- Hash-shuffling is available starting in Ray 2.46, where `HASH_SHUFFLE`
first appears.
- "Configure resources" drops "locality", which the section doesn't
cover.
- Multitenancy is on a shared Ray cluster instead of an Anyscale
workspace.
- A meaning-diff review compared every before-and-after pair. A
conservative filter cleared 43 blocks as cosmetic, and reviewers checked
the remaining blocks against the pre-edit text and the Ray source. Eight
drifted and are fixed in a follow-up commit. Most were soft
recommendations, such as "consider" and "you might want to", that had
become instructions. The others were a host-dependent buffer size stated
as a fixed minimum, `DataConfig` described as the only place to set
selectors, a dropped "advanced users" audience, and a planning lead-in
that left out one subsection. The same commit lists the monitoring
page's execution states as examples, because `DatasetState` also has
`PENDING` and `UNKNOWN`.
- A second scan of the full diff found five more soft recommendations
that had become instructions: tuning block counts, the ranked spilling
strategy, limiting resource usage, trying `isolate_read_workers`, and
optimizing the iteration loop. A follow-up commit restores them.
- `vale` with Vale 3.12, run from the repo root: no warning- or
error-level alerts on any `doc/source/data/*.md` page in the stack.
- `codespell`: no hits.
- The pre-commit hooks passed.
- A structural check against each 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
hyphen and underscore forms.

## 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]>
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