Repository navigation
[Data] Style and grammar pass on the Ray Data shuffle pages - #65374
Merged
dstrodtman merged 9 commits intoAug 27, 2026
Merged
dstrodtman merged 9 commits into
dstrodtman merged 9 commits into
Conversation
Align doc/source/data/data-internals.rst with the Ray documentation style guide
(doc/source/ray-contribute/writing-style.md). Prose and formatting only. No
technical claim changes meaning.
- Sentence-case the three title-case headings: "Ray Data Internals", "Shuffle
Algorithms", and "Memory Model". Underline lengths are unchanged.
- Normalize curly apostrophes and quotation marks to straight ones, so the file
stops mixing two conventions, and drop the em dashes from the meta
description. The style guide avoids dashes in prose.
- Cut filler and parentheticals in the shuffle sections, including "(used in
hash-tables and pretty much everywhere)" and "(10) rows".
- Prefer active voice where the actor is nameable, and apply the guide's word
choices: "like" to "such as", "in conjunction with" to "with", "allows you
to" to "you can", and "Below is a summary" to "The following list
summarizes".
- Fix a typo: "These operator process" becomes "These operators process".
- Strip trailing whitespace from eight lines.
Local Vale alerts on this file drop from 17 to 5. The five that remain are
pre-existing and left alone on purpose: one false positive ("is advanced"), two
defensible passives inside the shuffle phase lists, "backpressured" as
established Ray terminology, and one more passive with no clear actor. Measured
with Vale 3.12.0 locally, while CI pins 3.4.1 in
ci/lint/check-documentation-style.sh, so exact counts may differ there.
Leaves the two shuffle-strategy notes untouched, because ray-project#65372 rewrites one and
deletes the other. That keeps the overlap between the two changes to a minimum.
Signed-off-by: Douglas Strodtman <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request makes copy-editing and formatting improvements to the Ray Data Internals documentation, such as correcting punctuation, fixing typos, and improving sentence structure. The feedback suggests changing "APIs like" to "APIs such as" to align with the style guide's preference for introducing examples.
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com> Signed-off-by: Douglas Strodtman <[email protected]>
Gemini caught "APIs like" at line 57 and the suggestion is applied. The same construction appears once more, at line 158, introducing two API examples. Fixing it too, so accepting the first suggestion doesn't leave the file inconsistent. Line 249's "Each step works like this" is a genuine comparison rather than an example lead-in, so it stays as written. Signed-off-by: Douglas Strodtman <[email protected]>
ronny-anyscale
approved these changes
Aug 14, 2026
…ernals-style-pass
…ct#65372 Lowercase the alpha stage name per the style guide, drop the time-relative 'currently', correct 100 KB and 8 KB to KiB against the actual 100 * 1024 and 8192 values, turn the two bold-as-heading settings into definition-list form, name the environment variable in the lead-in and export it so the snippet matches what the prose promises, and align 'group-bys' and 'knobs' with the wording used elsewhere on the page. Signed-off-by: Douglas Strodtman <[email protected]>
Fix the three join-type lists in joining-data.rst, which were missing the blank line RST needs before a bullet list and so rendered as run-together paragraphs with literal hyphens. Lowercase the alpha stage name and drop the time-relative 'currently' where shuffle v2 is introduced, replace 'knobs' with 'settings', and convert headings to sentence case. Also clear the accumulated debt on joining-data.rst: Unicode quotes and apostrophes, comma splices, missing terminal periods, single backticks where the surrounding text uses double, and a stale 'this is a new feature' note for a release that is no longer new. Leaves the 'defaults to 64' aggregator claim untouched. The cap is actually 128, bounded further by the cluster CPU count, so correcting it belongs with the other factual fixes rather than in a wording pass. Signed-off-by: Douglas Strodtman <[email protected]>
Sentence case applies to the heading, but a leading label like 'Example:' or 'Advanced:' is a prefix rather than the start of the sentence, so the term after the colon keeps its capital. Restores 'Advanced: Optimizing shuffles', which the sentence-case sweep in the previous commit incorrectly lowercased. Signed-off-by: Douglas Strodtman <[email protected]>
The style guide asks for imperatives in task headings, so 'Example: Create a custom mean aggregator' rather than 'Creating'. Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman
added a commit
that referenced
this pull request
Aug 17, 2026
## Summary Three claims on the Ray Data join and save pages don't match the code. This PR corrects only those claims, deliberately leaving the surrounding prose alone so the diff is small enough to review as a technical question rather than a wording one. Each correction is cited below. I don't own Ray Data, so please check the reasoning rather than the phrasing. ## 1. `saving-data.rst` sets the shuffle strategy on the class, not the context ```python DataContext.shuffle_strategy=ShuffleStrategy.SHUFFLE_V2 # before DataContext.get_current().shuffle_strategy = ShuffleStrategy.SHUFFLE_V2 # after ``` `shuffle_strategy` is a `property` with a setter (`python/ray/data/context.py`, the `@property` at ~L1246 and `@shuffle_strategy.setter` at ~L1258). Assigning to it on the class object rebinds the class attribute over the descriptor instead of invoking the setter. Two consequences: the example never actually selects the strategy it says it's selecting, and `shuffle_strategy` stops working for every `DataContext` instance in that process. This is a `testcode` block, so it runs in CI. Note that because the assignment never took effect, the block has so far only ever exercised the default `HASH_SHUFFLE`. With the fix it genuinely runs `SHUFFLE_V2` for the first time. I don't have a Ray build locally, so **please confirm that job passes** rather than taking my word for it. If `SHUFFLE_V2` isn't ready to be load-bearing in a doctest, setting `HASH_SHUFFLE` on `get_current()` would fix the descriptor bug without that exposure. @gemini-code-assist flagged this on two separate passes (#65372); the value got updated to `SHUFFLE_V2` but the receiver didn't. ## 2. `partition_size_hint` is documented as a live tuning parameter The page described it as `(optional)`, gave it a default of `DataContext.target_max_block_size`, and offered two bullets on how to size it for skew. But `Dataset.join` documents it as "**Deprecated** and ignored ... This parameter has no effect and will be removed in a future release" (`python/ray/data/dataset.py` ~L3601), and passing a value emits a `DeprecationWarning` (~L3712). So the guidance told readers how to tune something inert. I removed the sizing advice rather than rewriting it, since there's nothing to tune. The page also said "Expect this parameter to be deprecated in 2.58." That deprecation has already landed, so the sentence was predicting the past. ## 3. The aggregator pool doesn't default to 64 The page said "Defaults to 64 or `num_partitions` (in cases when there are less than 64 partitions)." From `_derive_max_shuffle_aggregators` and its caller in `python/ray/data/_internal/execution/operators/hash_shuffle.py` (~L485 and ~L591): ``` num_aggregators = min(target_num_partitions, max_shuffle_aggregators) max_shuffle_aggregators = min(ceil(total_cluster_cpu), max_hash_shuffle_aggregators or DEFAULT_MAX_HASH_SHUFFLE_AGGREGATORS) ``` `DEFAULT_MAX_HASH_SHUFFLE_AGGREGATORS` is 128 (`context.py` ~L128). So the cap is 128 rather than 64, and there's a cluster-CPU bound the page never mentioned. **One thing worth a maintainer's eye:** the comment on the `max_hash_shuffle_aggregators` field (`context.py` ~L886) says the unset default is the smaller of "Total # of CPUs available in the cluster * 2" and 128. The code has no `* 2`. I documented the code, not the comment, but one of the two is stale and I can't tell which is intended. ## Out of scope These pages have wider style and prose issues, plus a genuine RST rendering bug in the join-type lists. Those are handled separately in #65374 so this PR stays reviewable as a technical correction. #65374 touches the same region of `joining-data.rst`, so whichever merges second needs a trivial rebase. Signed-off-by: Douglas Strodtman <[email protected]>
400Ping
pushed a commit
to 400Ping/ray
that referenced
this pull request
Aug 18, 2026
…ject#65525) ## Summary Three claims on the Ray Data join and save pages don't match the code. This PR corrects only those claims, deliberately leaving the surrounding prose alone so the diff is small enough to review as a technical question rather than a wording one. Each correction is cited below. I don't own Ray Data, so please check the reasoning rather than the phrasing. ## 1. `saving-data.rst` sets the shuffle strategy on the class, not the context ```python DataContext.shuffle_strategy=ShuffleStrategy.SHUFFLE_V2 # before DataContext.get_current().shuffle_strategy = ShuffleStrategy.SHUFFLE_V2 # after ``` `shuffle_strategy` is a `property` with a setter (`python/ray/data/context.py`, the `@property` at ~L1246 and `@shuffle_strategy.setter` at ~L1258). Assigning to it on the class object rebinds the class attribute over the descriptor instead of invoking the setter. Two consequences: the example never actually selects the strategy it says it's selecting, and `shuffle_strategy` stops working for every `DataContext` instance in that process. This is a `testcode` block, so it runs in CI. Note that because the assignment never took effect, the block has so far only ever exercised the default `HASH_SHUFFLE`. With the fix it genuinely runs `SHUFFLE_V2` for the first time. I don't have a Ray build locally, so **please confirm that job passes** rather than taking my word for it. If `SHUFFLE_V2` isn't ready to be load-bearing in a doctest, setting `HASH_SHUFFLE` on `get_current()` would fix the descriptor bug without that exposure. @gemini-code-assist flagged this on two separate passes (ray-project#65372); the value got updated to `SHUFFLE_V2` but the receiver didn't. ## 2. `partition_size_hint` is documented as a live tuning parameter The page described it as `(optional)`, gave it a default of `DataContext.target_max_block_size`, and offered two bullets on how to size it for skew. But `Dataset.join` documents it as "**Deprecated** and ignored ... This parameter has no effect and will be removed in a future release" (`python/ray/data/dataset.py` ~L3601), and passing a value emits a `DeprecationWarning` (~L3712). So the guidance told readers how to tune something inert. I removed the sizing advice rather than rewriting it, since there's nothing to tune. The page also said "Expect this parameter to be deprecated in 2.58." That deprecation has already landed, so the sentence was predicting the past. ## 3. The aggregator pool doesn't default to 64 The page said "Defaults to 64 or `num_partitions` (in cases when there are less than 64 partitions)." From `_derive_max_shuffle_aggregators` and its caller in `python/ray/data/_internal/execution/operators/hash_shuffle.py` (~L485 and ~L591): ``` num_aggregators = min(target_num_partitions, max_shuffle_aggregators) max_shuffle_aggregators = min(ceil(total_cluster_cpu), max_hash_shuffle_aggregators or DEFAULT_MAX_HASH_SHUFFLE_AGGREGATORS) ``` `DEFAULT_MAX_HASH_SHUFFLE_AGGREGATORS` is 128 (`context.py` ~L128). So the cap is 128 rather than 64, and there's a cluster-CPU bound the page never mentioned. **One thing worth a maintainer's eye:** the comment on the `max_hash_shuffle_aggregators` field (`context.py` ~L886) says the unset default is the smaller of "Total # of CPUs available in the cluster * 2" and 128. The code has no `* 2`. I documented the code, not the comment, but one of the two is stale and I can't tell which is intended. ## Out of scope These pages have wider style and prose issues, plus a genuine RST rendering bug in the join-type lists. Those are handled separately in ray-project#65374 so this PR stays reviewable as a technical correction. ray-project#65374 touches the same region of `joining-data.rst`, so whichever merges second needs a trivial rebase. Signed-off-by: Douglas Strodtman <[email protected]> Signed-off-by: 400Ping <[email protected]>
Resolves the one conflict in doc/source/data/joining-data.rst. The factual-fix PR ray-project#65525 rewrote the aggregator-count bullet list in the same region this style pass reworded. Resolution keeps the corrected default-count claim from master and the style rewording of the remaining two bullets, and applies this pass's double-backtick and terminal-period conventions to the incoming bullet so the list matches the note and numbered list that follow it. Signed-off-by: Douglas Strodtman <[email protected]>
owenowenisme
pushed a commit
that referenced
this pull request
Aug 20, 2026
## Summary Three claims on the Ray Data join and save pages don't match the code. This PR corrects only those claims, deliberately leaving the surrounding prose alone so the diff is small enough to review as a technical question rather than a wording one. Each correction is cited below. I don't own Ray Data, so please check the reasoning rather than the phrasing. ## 1. `saving-data.rst` sets the shuffle strategy on the class, not the context ```python DataContext.shuffle_strategy=ShuffleStrategy.SHUFFLE_V2 # before DataContext.get_current().shuffle_strategy = ShuffleStrategy.SHUFFLE_V2 # after ``` `shuffle_strategy` is a `property` with a setter (`python/ray/data/context.py`, the `@property` at ~L1246 and `@shuffle_strategy.setter` at ~L1258). Assigning to it on the class object rebinds the class attribute over the descriptor instead of invoking the setter. Two consequences: the example never actually selects the strategy it says it's selecting, and `shuffle_strategy` stops working for every `DataContext` instance in that process. This is a `testcode` block, so it runs in CI. Note that because the assignment never took effect, the block has so far only ever exercised the default `HASH_SHUFFLE`. With the fix it genuinely runs `SHUFFLE_V2` for the first time. I don't have a Ray build locally, so **please confirm that job passes** rather than taking my word for it. If `SHUFFLE_V2` isn't ready to be load-bearing in a doctest, setting `HASH_SHUFFLE` on `get_current()` would fix the descriptor bug without that exposure. @gemini-code-assist flagged this on two separate passes (#65372); the value got updated to `SHUFFLE_V2` but the receiver didn't. ## 2. `partition_size_hint` is documented as a live tuning parameter The page described it as `(optional)`, gave it a default of `DataContext.target_max_block_size`, and offered two bullets on how to size it for skew. But `Dataset.join` documents it as "**Deprecated** and ignored ... This parameter has no effect and will be removed in a future release" (`python/ray/data/dataset.py` ~L3601), and passing a value emits a `DeprecationWarning` (~L3712). So the guidance told readers how to tune something inert. I removed the sizing advice rather than rewriting it, since there's nothing to tune. The page also said "Expect this parameter to be deprecated in 2.58." That deprecation has already landed, so the sentence was predicting the past. ## 3. The aggregator pool doesn't default to 64 The page said "Defaults to 64 or `num_partitions` (in cases when there are less than 64 partitions)." From `_derive_max_shuffle_aggregators` and its caller in `python/ray/data/_internal/execution/operators/hash_shuffle.py` (~L485 and ~L591): ``` num_aggregators = min(target_num_partitions, max_shuffle_aggregators) max_shuffle_aggregators = min(ceil(total_cluster_cpu), max_hash_shuffle_aggregators or DEFAULT_MAX_HASH_SHUFFLE_AGGREGATORS) ``` `DEFAULT_MAX_HASH_SHUFFLE_AGGREGATORS` is 128 (`context.py` ~L128). So the cap is 128 rather than 64, and there's a cluster-CPU bound the page never mentioned. **One thing worth a maintainer's eye:** the comment on the `max_hash_shuffle_aggregators` field (`context.py` ~L886) says the unset default is the smaller of "Total # of CPUs available in the cluster * 2" and 128. The code has no `* 2`. I documented the code, not the comment, but one of the two is stale and I can't tell which is intended. ## Out of scope These pages have wider style and prose issues, plus a genuine RST rendering bug in the join-type lists. Those are handled separately in #65374 so this PR stays reviewable as a technical correction. #65374 touches the same region of `joining-data.rst`, so whichever merges second needs a trivial rebase. Signed-off-by: Douglas Strodtman <[email protected]> (cherry picked from commit a74234c) Signed-off-by: You-Cheng Lin <[email protected]>
dstrodtman
added a commit
that referenced
this pull request
Sep 2, 2026
…5526) ## Summary Adds one rule to the writing style guide: when a heading opens with a short label and a colon, capitalize the first term after the colon. Fixes the six headings under `doc/source` that don't follow it. ``` Use: Example: Creating a custom mean aggregator Not: Example: creating a custom mean aggregator Not: Example: Creating a Custom Mean Aggregator ``` The label before the colon is a prefix, not the start of the sentence, so the title that follows begins like a title. Sentence case still governs the rest of the heading, so this isn't a return to title case. ## This codifies existing practice I audited every heading under `doc/source` before writing the rule, rather than asserting a preference: | Colon-prefixed headings | Capitalized after the colon | Not capitalized | |---|---|---| | 708 | 664 | 6 | (The raw scan reported 44 non-conforming, but 38 were `kubectl describe` output inside literal blocks that my heuristic mistook for RST headings. The six below are the real ones.) So the convention is already what Ray docs overwhelmingly do. This writes it down and cleans up the stragglers. ## Headings fixed - `train/user-guides/asynchronous-validation.rst` — "Example: validation with Ray Train TorchTrainer" and "Example: validation with Ray Data map_batches" - `ray-core/internals/rpc-fault-tolerance.rst` — "Hidden problem: long-polling RPCs" - `ray-core/runtime_env_auth.md` — "Running on VMs: the netrc File" (also lowercases the stray "File") - `serve/production-guide/fault-tolerance.md` — "Guide: end-to-end fault tolerance for your Serve app" - `cluster/configure-manage-dashboard.md` — "Dashboard message: either Prometheus or Grafana server is not detected" ## The identifier carve-out The rule explicitly exempts code identifiers. `## Pod configuration: headGroupSpec and workerGroupSpecs` in `cluster/kubernetes/user-guides/config.md` is correct as written and is deliberately not touched here, because `headGroupSpec` is a real API field name. Without the carve-out this rule invites someone to "fix" it into `HeadGroupSpec`, which would be wrong. ## No anchor churn Every change here is capitalization only, and both MyST and Sphinx lowercase heading text when generating anchor slugs. `#guide-end-to-end-fault-tolerance-for-your-serve-app` is the slug before and after. No inbound deep link breaks, and the one heading carrying an explicit label (`(serve-e2e-ft-guide)=`) keeps it. ## Why it's worth a rule A naive sentence-case pass actively breaks these headings — it lowercases through the colon and makes the page read worse. That happened in #65374 and had to be reverted. Since `Google.Headings` is disabled repo-wide, heading case is a human check with no tool behind it, so the guide is the only place this can live. --------- Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman
added a commit
that referenced
this pull request
Sep 2, 2026
…tyle guide (#65869) ## Summary Documents two facts about Ray's Sphinx configuration in the documentation style guide. Neither was written down anywhere contributors or agents would find them, and both were rediscovered from `conf.py` during recent Ray Data style passes (#65374, #65525). - Ray doesn't enable `autosectionlabel`, so a heading's text isn't a `{ref}` target on its own and every linked section needs an explicit label. Added to the cross-references section, which already showed the `(my-label)=` pattern but never said why it's required. - Ray sets `default_role = "code"`, so a bare single-backtick in reStructuredText renders as inline code, not italics or a broken role. Added as a note in the bold-and-italics section. This one nearly produced ~50 false "single backticks are a rendering bug" findings in a prior review pass. ## Why this isn't a duplicate Searched open PRs with `gh pr list --search` for `writing-style`, `autosectionlabel`, `default_role`, and `anchor`. No open PR documents these. ## Test plan Prose-only change under `doc/`. A change to only `.md` files under `doc/` runs no library test steps; the Read the Docs render gate validates the build. Both claims were verified directly against `doc/source/conf.py` (`autosectionlabel` absent from `extensions`; `default_role = "code"`). ## AI assistance Drafted with AI assistance (Claude Code). Facts verified against `doc/source/conf.py`. The submitter reviews every changed line before requesting review. Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…ject#65525) ## Summary Three claims on the Ray Data join and save pages don't match the code. This PR corrects only those claims, deliberately leaving the surrounding prose alone so the diff is small enough to review as a technical question rather than a wording one. Each correction is cited below. I don't own Ray Data, so please check the reasoning rather than the phrasing. ## 1. `saving-data.rst` sets the shuffle strategy on the class, not the context ```python DataContext.shuffle_strategy=ShuffleStrategy.SHUFFLE_V2 # before DataContext.get_current().shuffle_strategy = ShuffleStrategy.SHUFFLE_V2 # after ``` `shuffle_strategy` is a `property` with a setter (`python/ray/data/context.py`, the `@property` at ~L1246 and `@shuffle_strategy.setter` at ~L1258). Assigning to it on the class object rebinds the class attribute over the descriptor instead of invoking the setter. Two consequences: the example never actually selects the strategy it says it's selecting, and `shuffle_strategy` stops working for every `DataContext` instance in that process. This is a `testcode` block, so it runs in CI. Note that because the assignment never took effect, the block has so far only ever exercised the default `HASH_SHUFFLE`. With the fix it genuinely runs `SHUFFLE_V2` for the first time. I don't have a Ray build locally, so **please confirm that job passes** rather than taking my word for it. If `SHUFFLE_V2` isn't ready to be load-bearing in a doctest, setting `HASH_SHUFFLE` on `get_current()` would fix the descriptor bug without that exposure. @gemini-code-assist flagged this on two separate passes (ray-project#65372); the value got updated to `SHUFFLE_V2` but the receiver didn't. ## 2. `partition_size_hint` is documented as a live tuning parameter The page described it as `(optional)`, gave it a default of `DataContext.target_max_block_size`, and offered two bullets on how to size it for skew. But `Dataset.join` documents it as "**Deprecated** and ignored ... This parameter has no effect and will be removed in a future release" (`python/ray/data/dataset.py` ~L3601), and passing a value emits a `DeprecationWarning` (~L3712). So the guidance told readers how to tune something inert. I removed the sizing advice rather than rewriting it, since there's nothing to tune. The page also said "Expect this parameter to be deprecated in 2.58." That deprecation has already landed, so the sentence was predicting the past. ## 3. The aggregator pool doesn't default to 64 The page said "Defaults to 64 or `num_partitions` (in cases when there are less than 64 partitions)." From `_derive_max_shuffle_aggregators` and its caller in `python/ray/data/_internal/execution/operators/hash_shuffle.py` (~L485 and ~L591): ``` num_aggregators = min(target_num_partitions, max_shuffle_aggregators) max_shuffle_aggregators = min(ceil(total_cluster_cpu), max_hash_shuffle_aggregators or DEFAULT_MAX_HASH_SHUFFLE_AGGREGATORS) ``` `DEFAULT_MAX_HASH_SHUFFLE_AGGREGATORS` is 128 (`context.py` ~L128). So the cap is 128 rather than 64, and there's a cluster-CPU bound the page never mentioned. **One thing worth a maintainer's eye:** the comment on the `max_hash_shuffle_aggregators` field (`context.py` ~L886) says the unset default is the smaller of "Total # of CPUs available in the cluster * 2" and 128. The code has no `* 2`. I documented the code, not the comment, but one of the two is stale and I can't tell which is intended. ## Out of scope These pages have wider style and prose issues, plus a genuine RST rendering bug in the join-type lists. Those are handled separately in ray-project#65374 so this PR stays reviewable as a technical correction. ray-project#65374 touches the same region of `joining-data.rst`, so whichever merges second needs a trivial rebase. Signed-off-by: Douglas Strodtman <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…ect#65374) ## Summary Style and grammar pass across the Ray Data shuffle pages, measured against `doc/source/ray-contribute/writing-style.md`. Originally scoped to `data-internals.rst`; extended after ray-project#65372 merged so the shuffle v2 content it introduced gets the same treatment as the rest of the page, along with the sibling pages that reference it. No behavior claims are changed. Where a wording fix would have restated a technical claim I couldn't verify, I left the original text alone. ## Rendering fix `joining-data.rst` had three join-type lists written as: ```rst **Semi Joins:** - Left Semi, Right Semi (returns all rows ... ``` RST needs a blank line before a bullet list, so all three rendered as run-together paragraphs with literal `-` characters rather than lists. Confirmed with docutils before and after. ## Style fixes - **Sentence-case headings** throughout. Nothing catches these: `Google.Headings` is disabled repo-wide. - **Feature-stage casing.** "currently in Alpha" to "in alpha", per the guide's rule that Ray-owned stages are lowercase. - **Time-relative words.** Dropped "currently"; replaced the "this is a new feature released in Ray 2.46" note, since 2.46 is no longer new. - **Units.** "100 KB" to 100 KiB and "8 KB" to 8 KiB in `data-internals.rst`, matching the actual `100 * 1024` and `8192` values. The same section already said 1 GiB correctly. - **Bold-as-heading** to definition-list form for the two shuffle v2 tuning settings. - **`export`** added to the `RAY_DATA_DEFAULT_SHUFFLE_STRATEGY` snippet, and the variable named in the lead-in, so the snippet does what the prose describes. - **Wording.** "knobs" to "settings", "only applies" to "applies only", "group-bys" to "group-by operations", one spelling of "trade-off". - **Mechanical.** Unicode quotes and apostrophes, trailing whitespace, comma splices, missing terminal periods, and single backticks where surrounding text uses double. ## Note for reviewers Sentence-casing headings changes their generated HTML anchors, so any external deep link to, for example, `#basic-aggregations` still resolves but `#Custom-Aggregations`-style links to the old casing would not. `autosectionlabel` isn't enabled and every `:ref:` on these pages uses an explicit label, so no in-tree cross-reference breaks. Happy to revert the heading changes if the anchor churn isn't worth it. ## Follow-up status The factual corrections these pages needed shipped separately in ray-project#65525, which is merged. That covered the `DataContext.shuffle_strategy` assignment in `saving-data.rst`, the `partition_size_hint` deprecation, and the aggregator-count default in `joining-data.rst`. This branch is merged up with master and carries those corrections, with the `partition_size_hint` bullet's inline literals normalized to double backticks to match the rest of the page. Nothing factual is outstanding. --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…y-project#65526) ## Summary Adds one rule to the writing style guide: when a heading opens with a short label and a colon, capitalize the first term after the colon. Fixes the six headings under `doc/source` that don't follow it. ``` Use: Example: Creating a custom mean aggregator Not: Example: creating a custom mean aggregator Not: Example: Creating a Custom Mean Aggregator ``` The label before the colon is a prefix, not the start of the sentence, so the title that follows begins like a title. Sentence case still governs the rest of the heading, so this isn't a return to title case. ## This codifies existing practice I audited every heading under `doc/source` before writing the rule, rather than asserting a preference: | Colon-prefixed headings | Capitalized after the colon | Not capitalized | |---|---|---| | 708 | 664 | 6 | (The raw scan reported 44 non-conforming, but 38 were `kubectl describe` output inside literal blocks that my heuristic mistook for RST headings. The six below are the real ones.) So the convention is already what Ray docs overwhelmingly do. This writes it down and cleans up the stragglers. ## Headings fixed - `train/user-guides/asynchronous-validation.rst` — "Example: validation with Ray Train TorchTrainer" and "Example: validation with Ray Data map_batches" - `ray-core/internals/rpc-fault-tolerance.rst` — "Hidden problem: long-polling RPCs" - `ray-core/runtime_env_auth.md` — "Running on VMs: the netrc File" (also lowercases the stray "File") - `serve/production-guide/fault-tolerance.md` — "Guide: end-to-end fault tolerance for your Serve app" - `cluster/configure-manage-dashboard.md` — "Dashboard message: either Prometheus or Grafana server is not detected" ## The identifier carve-out The rule explicitly exempts code identifiers. `## Pod configuration: headGroupSpec and workerGroupSpecs` in `cluster/kubernetes/user-guides/config.md` is correct as written and is deliberately not touched here, because `headGroupSpec` is a real API field name. Without the carve-out this rule invites someone to "fix" it into `HeadGroupSpec`, which would be wrong. ## No anchor churn Every change here is capitalization only, and both MyST and Sphinx lowercase heading text when generating anchor slugs. `#guide-end-to-end-fault-tolerance-for-your-serve-app` is the slug before and after. No inbound deep link breaks, and the one heading carrying an explicit label (`(serve-e2e-ft-guide)=`) keeps it. ## Why it's worth a rule A naive sentence-case pass actively breaks these headings — it lowercases through the colon and makes the page read worse. That happened in ray-project#65374 and had to be reverted. Since `Google.Headings` is disabled repo-wide, heading case is a human check with no tool behind it, so the guide is the only place this can live. --------- Signed-off-by: Douglas Strodtman <[email protected]>
nadongjun
pushed a commit
to nadongjun/ray
that referenced
this pull request
Oct 6, 2026
…tyle guide (ray-project#65869) ## Summary Documents two facts about Ray's Sphinx configuration in the documentation style guide. Neither was written down anywhere contributors or agents would find them, and both were rediscovered from `conf.py` during recent Ray Data style passes (ray-project#65374, ray-project#65525). - Ray doesn't enable `autosectionlabel`, so a heading's text isn't a `{ref}` target on its own and every linked section needs an explicit label. Added to the cross-references section, which already showed the `(my-label)=` pattern but never said why it's required. - Ray sets `default_role = "code"`, so a bare single-backtick in reStructuredText renders as inline code, not italics or a broken role. Added as a note in the bold-and-italics section. This one nearly produced ~50 false "single backticks are a rendering bug" findings in a prior review pass. ## Why this isn't a duplicate Searched open PRs with `gh pr list --search` for `writing-style`, `autosectionlabel`, `default_role`, and `anchor`. No open PR documents these. ## Test plan Prose-only change under `doc/`. A change to only `.md` files under `doc/` runs no library test steps; the Read the Docs render gate validates the build. Both claims were verified directly against `doc/source/conf.py` (`autosectionlabel` absent from `extensions`; `default_role = "code"`). ## AI assistance Drafted with AI assistance (Claude Code). Facts verified against `doc/source/conf.py`. The submitter reviews every changed line before requesting review. Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 4.8 <[email protected]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Style and grammar pass across the Ray Data shuffle pages, measured against
doc/source/ray-contribute/writing-style.md. Originally scoped todata-internals.rst; extended after #65372 merged so the shuffle v2 content it introduced gets the same treatment as the rest of the page, along with the sibling pages that reference it.No behavior claims are changed. Where a wording fix would have restated a technical claim I couldn't verify, I left the original text alone.
Rendering fix
joining-data.rsthad three join-type lists written as:**Semi Joins:** - Left Semi, Right Semi (returns all rows ...RST needs a blank line before a bullet list, so all three rendered as run-together paragraphs with literal
-characters rather than lists. Confirmed with docutils before and after.Style fixes
Google.Headingsis disabled repo-wide.data-internals.rst, matching the actual100 * 1024and8192values. The same section already said 1 GiB correctly.exportadded to theRAY_DATA_DEFAULT_SHUFFLE_STRATEGYsnippet, and the variable named in the lead-in, so the snippet does what the prose describes.Note for reviewers
Sentence-casing headings changes their generated HTML anchors, so any external deep link to, for example,
#basic-aggregationsstill resolves but#Custom-Aggregations-style links to the old casing would not.autosectionlabelisn't enabled and every:ref:on these pages uses an explicit label, so no in-tree cross-reference breaks. Happy to revert the heading changes if the anchor churn isn't worth it.Follow-up status
The factual corrections these pages needed shipped separately in #65525, which is merged. That covered the
DataContext.shuffle_strategyassignment insaving-data.rst, thepartition_size_hintdeprecation, and the aggregator-count default injoining-data.rst. This branch is merged up with master and carries those corrections, with thepartition_size_hintbullet's inline literals normalized to double backticks to match the rest of the page. Nothing factual is outstanding.