Repository navigation
[doc] Style pass on Ray Data modality guides - #66422
Conversation
There was a problem hiding this comment.
Code Review
This pull request performs comprehensive copyediting and formatting updates across several Ray Data documentation guides to improve clarity, style, and structure. The review feedback points out a few technical inaccuracies and opportunities for clarification in the updated text: removing an inaccurate mention of 'limitations' in the tensors guide, updating the PyTorch DataLoader mapping table to note that iter_torch_batches now supports a pin_memory argument, correcting a logical explanation about the sequence of repartition and map_batches in the collation guide, and clarifying the terminology for max_concurrent_batches in the LLM guide.
dstrodtman
left a comment
There was a problem hiding this comment.
Meaning-diff review of this style pass: a check of whether any edit changed what the text asserts, not just how it reads.
- 37 of 244 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 of the rest kept their meaning. Reviewers checked each against the pre-edit text and, where a claim touched behavior, the Ray source. They confirmed the TP*PP gloss (
placement.py,vllm_engine_stage.py), that onlyCPUandGPUbundle keys default to 0 (BundleConfig), that the Hugging Face processor does the resizing, and that Ray Data sizes the prefetch thread pool fromprefetch_batches. - 2 drifted and are fixed in 39ba92a. A new lead-in implied that Ray Data LLM handles row, actor, and pipeline failures automatically, but row-level tolerance is opt-in (
should_continue_on_errordefaults toFalse). The Office Hours item had also lost "new".
The inline comment is a question about a caveat that was missing before this PR. The other pre-existing questions are in the PR description.
This review was made with AI assistance (Claude Code).
| ``` | ||
|
|
||
| You can use `batch_size="auto"` to let Ray Data automatically pick an appropriate batch size based on the size of your data. | ||
| Set `batch_size="auto"` to have Ray Data pick a batch size based on the size of your data. |
There was a problem hiding this comment.
Question (predates this PR): this recommends batch_size="auto", but the map_batches docstring in python/ray/data/dataset.py says "When num_gpus is set, batch_size must be an explicit integer value, not "auto" or None." Should this sentence carry that caveat, since GPU tensor workloads are a common reason to read this page?
39ba92a to
31743b4
Compare
31743b4 to
7546338
Compare
7546338 to
be922d4
Compare
be922d4 to
f4a42e7
Compare
f4a42e7 to
2e30930
Compare
62b0be3 to
58bfc97
Compare
58bfc97 to
69dc6db
Compare
…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]>
69dc6db to
8770d99
Compare
Apply Ray's writing-style guide to the Ray Data images, text, tensors, PyTorch, LLM, and collate-function pages: use imperative task headings and question headings for concepts, with a label for each old heading slug so existing URL fragments keep resolving; use second person, active voice, and "such as"; remove em dashes, parentheticals, and filler; spell "Hugging Face" consistently; turn bold pseudo-headings and captions into prose, lead-ins, or list-table titles; and choose admonition levels by the guide. Update link text in the Train data loading guide that quotes the old headings, and fix its "Pytorch" casing. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
The new lead-in under the LLM failure-handling section implied that Ray Data LLM handles row, actor, and pipeline failures automatically, but row-level tolerance is opt-in and checkpoint recovery is a later run. Describe what the sections cover instead. Put back "new" in the Office Hours item, which says what the sessions are for. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Sphinx labels are global, so old-slug labels with single-word names such as "embeddings", "classification", and "multimodality" reserve those names for the whole site and would break the build of any later page that defines them. Each heading keeps its existing specific label, and nothing in the repo links to the old fragments. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Describe what the tensors page covers instead of limitations it doesn't list, scope the collate batch-alignment note to output blocks, refer to the value of max_concurrent_batches rather than a batch size, and mention the alpha pin_memory argument of iter_torch_batches. Import transforms in the PyTorch migration example so the block runs on its own. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
…d the pin_memory condition - The vLLM compatibility table covers nightly and 2.50 through 2.58, not every release, so the lead-in now says recent Ray releases. - max_tasks_in_flight_per_actor defaults to None, which resolves to DataContext.max_tasks_in_flight_per_actor or 2 * max_concurrent_batches. #63214 replaced the fixed default of 16. - The iter_torch_batches docstring applies pin_memory only when the collate output is a TensorBatchType. Co-Authored-By: Claude Opus 5.5 (1M context) <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
8770d99 to
da6fd20
Compare
## 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 #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 #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]>
) ## 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]>
#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]>
## 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]>
…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]>
## Description Style and grammar pass on six Ray Data modality guides against Ray's [writing-style guide](https://docs.ray.io/en/master/ray-contribute/writing-style.html): `working-with-images.md`, `working-with-text.md`, `working-with-tensors.md`, `working-with-pytorch.md`, `working-with-llms.md`, and `scaling-collation-functions.md`. Prose only, apart from one code fix: the PyTorch migration example now imports `transforms`, which it uses. No other code, testcode, literalinclude blocks, code comments, or URLs changed. Stacked on ray-project#66420. Review and merge that stack first. This branch targets `doc-1524-data-style-ops`. It's the fourth 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 "Read images" and "Scale to multiple GPUs", and conceptual headings as questions, such as "How does the processor pipeline work?". Each reworded heading keeps its old URL fragment through an explicit label named after the old slug. Headings that already had a matching label need no new one. One old fragment can't be kept: `working-with-llms#cross-node-parallelism`, because `serve/llm/user-guides/cross-node-parallelism.md` already defines that label name. Nothing in the repo links to it. Three more old fragments are dropped on purpose because their names are single words: `#embeddings`, `#classification`, and `#multimodality`. 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. Those headings keep their existing specific labels, such as `embedding_models`. - Uses second person, active voice, present tense, and "such as" for examples. Recasts "lets", "allows", and "enables". - Removes em dashes, parentheticals, first-person plural, "will", and filler. - Fixes list lead-ins and punctuation, and uses `1.` for ordered lists. Opening lists of section links stay, because they're the pages' only links to their sections. - Keeps `{ref}` link text that quotes another page's title in that title's words, such as "Saving Data API". ### Page-specific changes - `working-with-llms.md`: Spells "Hugging Face" consistently in prose, defines "VLM" once, and turns five bold paragraph labels into lead-in sentences. Gives the real default for `max_tasks_in_flight_per_actor`: it resolves to `DataContext.max_tasks_in_flight_per_actor` or `2 * max_concurrent_batches`, which ray-project#63214 introduced in place of the fixed 16. Scopes the vLLM table's lead-in to recent releases, since the table doesn't cover every one. The "Known issue" admonition keeps its title and gains the `warning` class, because the issue raises an `ImportError`. It also moves a bold "Usage data collection" label into a `note`. - `working-with-pytorch.md`: Replaces the legacy "Ray Datasets" product name, recasts the migration section into imperatives, says `pin_memory` applies only when the collate function returns tensors, as its docstring does, and puts the `map` and `map_batches` tab titles in inline code. - `scaling-collation-functions.md`: Fixes the "improving better" typo, and turns the two bold table captions into `list-table` titles. Every number and instance type is unchanged. - `working-with-images.md` and `working-with-text.md`: Put the default column names `image` and `text` in inline code. - `working-with-tensors.md`: Changes the H1 from "Working with Tensors / NumPy" to "Working with tensors and NumPy". ### Other files - Updates link text in `train/user-guides/data-loading-preprocessing.rst` that quotes the old headings, and fixes its "Pytorch" casing. ## Questions for reviewers Apart from the `max_tasks_in_flight_per_actor` default, this pass kept the scope of every claim. These points need a Ray Data maintainer. Each one predates this PR. - **Example variable (`scaling-collation-functions.md`):** the "after" example reassigns `dataset` but passes `train_dataset` to the trainer. - **`torchaudio` (`working-with-pytorch.md`):** the transforms section names `torchaudio`, but it has no `torchaudio` example. - **Custom tokenizers (`working-with-llms.md`):** are `mistral`, `deepseek_v32`, and `grok2` `tokenizer_mode` values? If so, the sentence can name them that way instead of in parentheses. The page says "DeepSeek-V3", but the example file's docstring says "DeepSeek-V3.2". - **`batch_size="auto"` (`working-with-tensors.md`):** the page recommends `batch_size="auto"` but doesn't say that `map_batches` requires an explicit integer `batch_size` when `num_gpus` is set (`dataset.py`). - **Note placement (`working-with-llms.md`):** the usage-data note sits under the NIXL troubleshooting heading. ## Verification - A follow-up commit applies source-verified fixes from automated review. It scopes the collate batch-alignment note to output blocks, because the example repartitions only after `map_batches`. It mentions the alpha `pin_memory` argument of `iter_torch_batches`, imports `transforms` in the PyTorch migration example, and describes what the tensors page covers instead of limitations it doesn't list. It also refers to the value of `max_concurrent_batches` rather than a batch size. - A meaning-diff review compared every before-and-after pair. A conservative filter cleared 37 blocks as cosmetic, and reviewers checked the remaining blocks against the pre-edit text and the Ray source. Two drifted and are fixed in a follow-up commit: a new lead-in implied that Ray Data LLM handles row, actor, and pipeline failures automatically, and the Office Hours item had lost "new". The reviewers confirmed the TP*PP gloss against `placement.py` and `vllm_engine_stage.py`, and that the Hugging Face processor, not Ray, resizes image inputs. - `vale` with Vale 3.12, run from the repo root: no warning- or error-level alerts on the six pages. - `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. The only collision is the `cross-node-parallelism` case above. ## 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]>
…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]>
…-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]>
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]>
…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]>
Description
Style and grammar pass on six Ray Data modality guides against Ray's writing-style guide:
working-with-images.md,working-with-text.md,working-with-tensors.md,working-with-pytorch.md,working-with-llms.md, andscaling-collation-functions.md. Prose only, apart from one code fix: the PyTorch migration example now importstransforms, which it uses. No other code, testcode, literalinclude blocks, code comments, or URLs changed.Stacked on #66420. Review and merge that stack first. This branch targets
doc-1524-data-style-ops. It's the fourth of five PRs that apply the same pass to the top-level Ray Data pages.All six pages
working-with-llms#cross-node-parallelism, becauseserve/llm/user-guides/cross-node-parallelism.mdalready defines that label name. Nothing in the repo links to it. Three more old fragments are dropped on purpose because their names are single words:#embeddings,#classification, and#multimodality. 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. Those headings keep their existing specific labels, such asembedding_models.1.for ordered lists. Opening lists of section links stay, because they're the pages' only links to their sections.{ref}link text that quotes another page's title in that title's words, such as "Saving Data API".Page-specific changes
working-with-llms.md: Spells "Hugging Face" consistently in prose, defines "VLM" once, and turns five bold paragraph labels into lead-in sentences. Gives the real default formax_tasks_in_flight_per_actor: it resolves toDataContext.max_tasks_in_flight_per_actoror2 * max_concurrent_batches, which [data][llm] Promotemax_tasks_in_flight_per_actorto a first-class config field and adjust defaults #63214 introduced in place of the fixed 16. Scopes the vLLM table's lead-in to recent releases, since the table doesn't cover every one. The "Known issue" admonition keeps its title and gains thewarningclass, because the issue raises anImportError. It also moves a bold "Usage data collection" label into anote.working-with-pytorch.md: Replaces the legacy "Ray Datasets" product name, recasts the migration section into imperatives, sayspin_memoryapplies only when the collate function returns tensors, as its docstring does, and puts themapandmap_batchestab titles in inline code.scaling-collation-functions.md: Fixes the "improving better" typo, and turns the two bold table captions intolist-tabletitles. Every number and instance type is unchanged.working-with-images.mdandworking-with-text.md: Put the default column namesimageandtextin inline code.working-with-tensors.md: Changes the H1 from "Working with Tensors / NumPy" to "Working with tensors and NumPy".Other files
train/user-guides/data-loading-preprocessing.rstthat quotes the old headings, and fixes its "Pytorch" casing.Questions for reviewers
Apart from the
max_tasks_in_flight_per_actordefault, this pass kept the scope of every claim. These points need a Ray Data maintainer. Each one predates this PR.scaling-collation-functions.md): the "after" example reassignsdatasetbut passestrain_datasetto the trainer.torchaudio(working-with-pytorch.md): the transforms section namestorchaudio, but it has notorchaudioexample.working-with-llms.md): aremistral,deepseek_v32, andgrok2tokenizer_modevalues? If so, the sentence can name them that way instead of in parentheses. The page says "DeepSeek-V3", but the example file's docstring says "DeepSeek-V3.2".batch_size="auto"(working-with-tensors.md): the page recommendsbatch_size="auto"but doesn't say thatmap_batchesrequires an explicit integerbatch_sizewhennum_gpusis set (dataset.py).working-with-llms.md): the usage-data note sits under the NIXL troubleshooting heading.Verification
map_batches. It mentions the alphapin_memoryargument ofiter_torch_batches, importstransformsin the PyTorch migration example, and describes what the tensors page covers instead of limitations it doesn't list. It also refers to the value ofmax_concurrent_batchesrather than a batch size.placement.pyandvllm_engine_stage.py, and that the Hugging Face processor, not Ray, resizes image inputs.valewith Vale 3.12, run from the repo root: no warning- or error-level alerts on the six pages.codespell: no hits.doc/sourcefor the label name in hyphen and underscore forms. The only collision is thecross-node-parallelismcase above.AI assistance
I made these edits with AI assistance (Claude Code).
🤖 Generated with Claude Code