Repository navigation
[doc][train] Seed the Ray Train Vale term library (warn-first, not yet enforced) - #66885
Merged
Merged
Conversation
This was referenced Oct 9, 2026
dstrodtman
marked this pull request as ready for review
October 9, 2026 13:47
Contributor
There was a problem hiding this comment.
Code Review
This pull request introduces style rules and terminology guidelines for Ray Train documentation. It adds a new 'Writing Ray Train docs' section to the writing style guide, configures Vale to run these checks, and defines specific term swaps and capitalization rules in .vale/styles/Train/. Additionally, it updates various vocabulary accept lists with relevant terms. The review feedback suggests expanding the newly added Vale rules in Terms.yml and Capitalization.yml to include plural and capitalized plural variants of terms like configuration objects and training loops to ensure comprehensive coverage.
ronny-anyscale
approved these changes
Oct 9, 2026
matthewdeng
approved these changes
Oct 9, 2026
dstrodtman
added a commit
that referenced
this pull request
Oct 9, 2026
## Why are these changes needed? This PR applies the Ray writing-style guide and its new "Writing Ray Train docs" terms table (#66885) to the Ray Train user guides. It's one of three style-pass PRs for Ray Train, split by section. **Stacked on #66885.** Retarget it to `master` once that PR and #66883 merge. ## What changed - **Trainer and term casing:** "trainer" is lowercase in prose, with class names in code style. "Fault tolerance", "local mode", and "training worker" follow the terms table. - **Headings:** sentence case, imperatives for task headings ("Save checkpoints during training"), question headings for conceptual sections in elastic training, and "Label: Title" in place of parenthetical prefixes, such as "Deprecated: Set the local staging directory" and "PyTorch: Set the communication backend". - **Voice and wording:** removed first-person plural, passive, "will", "allows/enables", filler, and Latin abbreviations. Benefits lists in fault tolerance, checkpoints, persistent storage, and hyperparameter optimization are now prose. - **Structure:** ordered lists use `1.`, bold "Step N:" and "Option N:" pseudo-headings become headings, lead-ins, or rubrics, and a resource-leak caveat in asynchronous validation moves into a `caution`. - **Unicode punctuation:** curly quotes and em dashes are ASCII now. That includes a `param_space={...}` inline code sample that used curly quotes. - **Old URL fragments keep working.** Each reworded heading with a specific old slug gets a MyST label named after that slug, such as `(saving-checkpoints-during-training)=`. Generic two-word slugs such as `#getting-started` and `#viewing-metrics` don't get labels, because a site-wide label would claim the name. Nothing in the repo links to those. - **Fixes a broken link target:** `python/ray/air/config.py` and `python/ray/tune/tune.py` link to `persistent-storage.html#setting-the-local-staging-directory`. That fragment broke when the heading gained its "(Deprecated)" prefix. A label restores it. - **New `{rubric}` directives** replace two bold option labels inside a Transformers tab in `checkpoints.md`. Please check that they render in the preview. ## Questions for maintainers These are pre-existing claims that the pass kept as written: - `checkpoints.md`: "you can't use a temporary directory that Ray Train might delete before the upload finishes, for example from `tempfile.TemporaryDirectory`". Python deletes a `TemporaryDirectory` when its context exits. Is Ray Train the right actor, or does this mean `delete_local_checkpoint_after_upload`? - `fault-tolerance.md`: does Ray Train V2 still need `RAY_TRAIN_V2_ENABLED=1` "starting in Ray 2.43" on master? - `persistent-storage.md`: "In the preceding example, the training loop saves some artifacts to the worker's current working directory." No preceding example does that. - `hyperparameter-optimization.md`: "The next section on fault tolerance describes this further." That section doesn't mention driver snapshots to `storage_path`. - `local-mode.md`: the prose says to change only `num_workers`, but the diff also adds `use_gpu=True`. Also, "master node" matches torchrun's `MASTER_ADDR`. Keep it or write "head node"? - `elastic-training.md`: "Without a retry limit, the run exits on the first such failure" describes the `max_failures` default. Should it say "without retries"? - `using-accelerators.md`: "Get the associated devices with `get_device`" uses a plural for a function that returns one device. ## Duplicate check No open PR restyles these pages. I searched open `ray-project/ray` PRs that touch `doc/source/train/`. The only hits are #66883 (the slug renames this stack builds on) and #66885 (the Train Vale rules). ## Testing ```bash vale --output=line doc/source/train/<changed files> # from the repo root, with #66885's .vale.ini codespell <changed files> pre-commit run --files <changed files> ``` - Vale leaves only intentional alerts: acronym definitions (Google.Parens, Google.Acronyms), passives with no actor to name, "will be removed in a future release", "currently" on a temporary limitation, and spelling false positives such as "nullable", "autoencoder", and "prefetches". - A per-file check against a pre-edit snapshot confirms that code blocks, `{ref}`/`{py:*}` role targets, and URLs are unchanged. The only added `(label)=` anchors keep old heading fragments working. - `pre-commit` passed, but only the master-branch link check applied. No hook lints Markdown under `doc/source/train/`, so the hook run doesn't validate the prose. - A meaning check compared every edited block with its before text and the Ray source. A follow-up commit restores the few edits that changed a claim, and the review comment on this PR lists them. - Prose-only change: no library tests run. The Read the Docs preview is the build check. AI assistance (Claude Code) drafted these edits and ran the meaning check. 🤖 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]>
…t enforced) Add Train/Terms.yml and Train/Capitalization.yml, a path-scoped [doc/source/train/**] section in .vale.ini, and a "Writing Ray Train docs" section in writing-style.md. Grow the Train and General accept lists from the Train Vale.Spelling baseline, add a WandB -> W&B swap to the shared Ray/Brands.yml, and tighten the RLlib accept entries for PyTorch and TensorFlow, whose bracket-class regexes accepted Pytorch and Tensorflow repo-wide. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
## Why are these changes needed? This PR applies the Ray writing-style guide and its new "Writing Ray Train docs" terms table (#66885) to the Ray Train user guides. It's one of three style-pass PRs for Ray Train, split by section. **Stacked on #66885.** Retarget it to `master` once that PR and #66883 merge. ## What changed - **Trainer and term casing:** "trainer" is lowercase in prose, with class names in code style. "Fault tolerance", "local mode", and "training worker" follow the terms table. - **Headings:** sentence case, imperatives for task headings ("Save checkpoints during training"), question headings for conceptual sections in elastic training, and "Label: Title" in place of parenthetical prefixes, such as "Deprecated: Set the local staging directory" and "PyTorch: Set the communication backend". - **Voice and wording:** removed first-person plural, passive, "will", "allows/enables", filler, and Latin abbreviations. Benefits lists in fault tolerance, checkpoints, persistent storage, and hyperparameter optimization are now prose. - **Structure:** ordered lists use `1.`, bold "Step N:" and "Option N:" pseudo-headings become headings, lead-ins, or rubrics, and a resource-leak caveat in asynchronous validation moves into a `caution`. - **Unicode punctuation:** curly quotes and em dashes are ASCII now. That includes a `param_space={...}` inline code sample that used curly quotes. - **Old URL fragments keep working.** Each reworded heading with a specific old slug gets a MyST label named after that slug, such as `(saving-checkpoints-during-training)=`. Generic two-word slugs such as `#getting-started` and `#viewing-metrics` don't get labels, because a site-wide label would claim the name. Nothing in the repo links to those. - **Fixes a broken link target:** `python/ray/air/config.py` and `python/ray/tune/tune.py` link to `persistent-storage.html#setting-the-local-staging-directory`. That fragment broke when the heading gained its "(Deprecated)" prefix. A label restores it. - **New `{rubric}` directives** replace two bold option labels inside a Transformers tab in `checkpoints.md`. Please check that they render in the preview. ## Questions for maintainers These are pre-existing claims that the pass kept as written: - `checkpoints.md`: "you can't use a temporary directory that Ray Train might delete before the upload finishes, for example from `tempfile.TemporaryDirectory`". Python deletes a `TemporaryDirectory` when its context exits. Is Ray Train the right actor, or does this mean `delete_local_checkpoint_after_upload`? - `fault-tolerance.md`: does Ray Train V2 still need `RAY_TRAIN_V2_ENABLED=1` "starting in Ray 2.43" on master? - `persistent-storage.md`: "In the preceding example, the training loop saves some artifacts to the worker's current working directory." No preceding example does that. - `hyperparameter-optimization.md`: "The next section on fault tolerance describes this further." That section doesn't mention driver snapshots to `storage_path`. - `local-mode.md`: the prose says to change only `num_workers`, but the diff also adds `use_gpu=True`. Also, "master node" matches torchrun's `MASTER_ADDR`. Keep it or write "head node"? - `elastic-training.md`: "Without a retry limit, the run exits on the first such failure" describes the `max_failures` default. Should it say "without retries"? - `using-accelerators.md`: "Get the associated devices with `get_device`" uses a plural for a function that returns one device. ## Duplicate check No open PR restyles these pages. I searched open `ray-project/ray` PRs that touch `doc/source/train/`. The only hits are #66883 (the slug renames this stack builds on) and #66885 (the Train Vale rules). ## Testing ```bash vale --output=line doc/source/train/<changed files> # from the repo root, with #66885's .vale.ini codespell <changed files> pre-commit run --files <changed files> ``` - Vale leaves only intentional alerts: acronym definitions (Google.Parens, Google.Acronyms), passives with no actor to name, "will be removed in a future release", "currently" on a temporary limitation, and spelling false positives such as "nullable", "autoencoder", and "prefetches". - A per-file check against a pre-edit snapshot confirms that code blocks, `{ref}`/`{py:*}` role targets, and URLs are unchanged. The only added `(label)=` anchors keep old heading fragments working. - `pre-commit` passed, but only the master-branch link check applied. No hook lints Markdown under `doc/source/train/`, so the hook run doesn't validate the prose. - A meaning check compared every edited block with its before text and the Ray source. A follow-up commit restores the few edits that changed a claim, and the review comment on this PR lists them. - Prose-only change: no library tests run. The Read the Docs preview is the build check. AI assistance (Claude Code) drafted these edits and ran the meaning check. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman
force-pushed
the
doc-1549-train-vale-style
branch
from
October 9, 2026 19:06
4f9e442 to
942ba25
Compare
dstrodtman
added a commit
that referenced
this pull request
Oct 9, 2026
## Why are these changes needed? This PR applies the Ray writing-style guide and its new "Writing Ray Train docs" terms table (#66885) to the six Ray Train getting-started guides (PyTorch, PyTorch Lightning, Hugging Face Transformers, XGBoost, JAX, LightGBM) and the two shared include fragments under `train/common/`. It's one of three style-pass PRs for Ray Train, split by section. **Stacked on #66885.** Retarget it to `master` once that PR and #66883 merge. ## What changed - **Trainer casing:** "trainer" is lowercase in prose. Class names take code style, including third-party ones: "Lightning `Trainer`" and "Transformers `Trainer`". - **Consistency across the six guides:** one H1 pattern ("Get started with distributed training using X"), comparison tabs titled "X with Ray Train" instead of "X + Ray Train", and "Deprecated `LightningTrainer`" / "Deprecated `TransformersTrainer`" tab titles. Neither class exists in `python/ray` anymore, so "Deprecating" and "New API" were stale. - **Lists:** ordered lists use `1.`, non-sequential lists are bullets, and lead-ins are complete sentences. - **Voice and wording:** removed passive, "will", "allows/enables", filler, and marketing qualifiers such as "enhanced transparency, flexibility, and simplicity". - **Fixes found during the pass:** - `acelerator="auto"` is now `accelerator="auto"` in the Lightning guide. - The XGBoost and LightGBM guides said to add `RayTrainReportCallback` "to your trainer", but the code passes it to `xgboost.train` / `lightgbm.train`. The prose now matches the code. - **Reworded headings keep their old fragments** through labels: `#what-is-jax`, `#jaxtrainer-api`, and the Transformers `#code-comparison-...` heading. The XGBoost and LightGBM "Loading data" headings are now "Load data". The old `#loading-data` fragment is too generic for a site-wide label, and nothing in the repo links to it. ## Questions for maintainers - `getting-started-pytorch-lightning.md`: the note "Note that this is incompatible with AsyncCheckpointIO" didn't name what "this" was. It now says "asynchronous checkpoint uploading", based on the reason given. Does the limitation also apply to asynchronous validation? - `getting-started-pytorch-lightning.md`: the tested versions (`1.6.5`, `2.1.2`) look stale. - `getting-started-jax.md`: "PodSlices" is kept as written. Google's docs usually say "Pod slices" or "TPU slices". ## Duplicate check No open PR restyles these pages. I searched open `ray-project/ray` PRs that touch `doc/source/train/`. The only hits are #66883 (the slug renames this stack builds on) and #66885 (the Train Vale rules). ## Testing ```bash vale --output=line doc/source/train/<changed files> # from the repo root, with #66885's .vale.ini codespell <changed files> pre-commit run --files <changed files> ``` - Vale leaves only intentional alerts: acronym definitions (Google.Parens, Google.Acronyms), passives with no actor to name, "will be removed in a future release", "currently" on a temporary limitation, and spelling false positives such as "nullable", "autoencoder", and "prefetches". - A per-file check against a pre-edit snapshot confirms that code blocks, `{ref}`/`{py:*}` role targets, and URLs are unchanged. The only added `(label)=` anchors keep old heading fragments working. - `pre-commit` passed, but only the master-branch link check applied. No hook lints Markdown under `doc/source/train/`, so the hook run doesn't validate the prose. - A meaning check compared every edited block with its before text and the Ray source. A follow-up commit restores the few edits that changed a claim, and the review comment on this PR lists them. - Prose-only change: no library tests run. The Read the Docs preview is the build check. AI assistance (Claude Code) drafted these edits and ran the meaning check. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman
added a commit
that referenced
this pull request
Oct 9, 2026
…#66888) ## Why are these changes needed? This PR applies the Ray writing-style guide and its new "Writing Ray Train docs" terms table (#66885) to the Ray Train landing page, overview, benchmarks, and the DeepSpeed, Horovod, Hugging Face Accelerate, and TensorFlow and Keras guides. It's one of three style-pass PRs for Ray Train, split by section. The getting-started guides and the user guides follow in their own PRs. **Stacked on #66885.** Retarget it to `master` once that PR and #66883 merge. ## What changed - **Trainer casing:** "trainer" is lowercase in prose for the Ray Train concept, and class names take code style, such as `TorchTrainer` and `TensorflowTrainer`. `overview.md` defines the concept, so it changes to match the terms table. - **Headings and sidebar titles:** sentence case, including the toctree titles on the landing page and "More frameworks". - **Voice and wording:** removed first-person plural, passive constructions, "allows/enables", filler, and marketing qualifiers. Example: the landing page drops "Ray Train is the simplest solution for distributed training", an unmeasured superlative. - **Lists and tables:** non-sequential lists are bullets, the DeepSpeed benefits list is prose, and the DeepSpeed framework table moves the user-guide links into their own column instead of parentheses. - **TensorFlow guide:** the bold "Step 1:" and "Step 2:" labels become H3 headings, and the checkpoint-loading example gets a lead-in. - **One reworded heading keeps its old fragment:** `deepspeed.md#benefits-of-using-ray-train-with-deepspeed` stays valid through a label. ## Questions for maintainers These are pre-existing claims that the pass didn't change: - `benchmarks.md`: the text says PyTorch and Ray Train perform "within 2.5%" of each other, but the 16-worker CPU row shows 430.88 s versus 475.97 s, about 9.5%. The TensorFlow "within 1%" claim is about 4.3% on its 16-worker row. - `huggingface-accelerate.md`: "the plan is to deprecate `AccelerateTrainer` in Ray 2.8" is stale. `AccelerateTrainer` no longer exists in `python/ray`. What should the migration section say? - `distributed-tensorflow-keras.md`: the checkpointing text says Ray Train saves "model weights but not models", but both examples call `model.save(... "model.keras")`. The load example also calls `json.dump` without importing `json`. ## Duplicate check No open PR restyles these pages. I searched open `ray-project/ray` PRs that touch `doc/source/train/`. The only hits are #66883 (the slug renames this stack builds on) and #66885 (the Train Vale rules). ## Testing ```bash vale --output=line doc/source/train/<changed files> # from the repo root, with #66885's .vale.ini codespell <changed files> pre-commit run --files <changed files> ``` - Vale leaves only intentional alerts: acronym definitions (Google.Parens, Google.Acronyms), passives with no actor to name, "will be removed in a future release", "currently" on a temporary limitation, and spelling false positives such as "nullable", "autoencoder", and "prefetches". - A per-file check against a pre-edit snapshot confirms that code blocks, `{ref}`/`{py:*}` role targets, and URLs are unchanged. The only added `(label)=` anchors keep old heading fragments working. - `pre-commit` passed, but only the master-branch link check applied. No hook lints Markdown under `doc/source/train/`, so the hook run doesn't validate the prose. - A meaning check compared every edited block with its before text and the Ray source. A follow-up commit restores the few edits that changed a claim, and the review comment on this PR lists them. - Prose-only change: no library tests run. The Read the Docs preview is the build check. AI assistance (Claude Code) drafted these edits and ran the meaning check. 🤖 Generated with [Claude Code](https://claude.com/claude-code) --------- Signed-off-by: Douglas Strodtman <[email protected]> Co-authored-by: Claude Opus 5.5 <[email protected]>
dstrodtman
added a commit
that referenced
this pull request
Oct 13, 2026
#66894) ## Why are these changes needed? The Ray Train style-pass PRs, #66886, #66887, and #66888, flagged pre-existing problems in the pages they edited and left them as written, because a style pass shouldn't change claims. This PR fixes the ones that don't change a technical claim. Each fix is settled by the page itself, its own code sample, or its own tables. **Stacked on #66886, #66887, and #66888.** Those three PRs are siblings on `doc-1549-train-vale-style`, #66885's branch, so this PR targets that branch and starts from a merge of all three. Until they merge, the diff here includes their changes. Review only the three commits after the merge commit: - `ea20d30` getting-started guides - `af794c9` overview, framework, and example pages - `67b7b59` user guides Once the style PRs land, I'll rebase onto `master` and retarget there. ### Getting-started guides - Eight numbered lists describe components, parameters, or what a function does, not steps. They're now bullets, as the bot review on #66886 suggested: the three-component lists in the PyTorch, JAX, LightGBM, Transformers, and XGBoost guides, the `prepare_model` and `prepare_data_loader` lists, and the LightGBM `ScalingConfig` parameters. The intro lists that run from "Configure..." to "Launch..." are real sequences and stay numbered. - `getting-started-jax.md`: "PodSlices" is "Pod slices", Google's spelling, in the body and the front-matter description. ### Overview, framework, and example pages - `benchmarks.md`: "perform similarly (within 2.5%)" and "(within 1%)" are false as two-sided bounds. The page's own tables show a 9.5% gap in the PyTorch 16-worker CPU row and 4.3% in the TensorFlow one, both with Ray Train faster. The sentences now say what the tables show: Ray Train is at most 2.5% (PyTorch) and 1% (TensorFlow) slower, and faster in the CPU rows named. - `distributed-tensorflow-keras.md`: "saving model weights but not models" contradicts the sample, which calls `model.save(... "model.keras")` and stores the epoch. The load sample calls `json.dump` without importing `json`, which fails when a reader copies the block alone. - `deepspeed.md`: the `:skipif: True` skeleton used `tokenized_datasets`, `collate_fn`, `num_epochs`, `loss`, and `ray` without defining or importing them, while it defined `train_dataset` and never used it. It now passes `train_dataset` and declares the placeholders the same way it already declares `model = ...`. The runnable versions are literal-included from tested files in `python/ray/train/examples/deepspeed/`. - `examples/lightning/lightning-cola-advanced.ipynb`: "this examples uses" typo, flagged on #66883. The matching "with with" typo in the vicuna notebook isn't fixed here, because #66892 deletes that notebook. ### User guides - `persistent-storage.md`: "In the preceding example, the training loop saves some artifacts to the worker's current working directory." No preceding example does that. - `hyperparameter-optimization.md`: "The next section on fault tolerance describes this further." The next section doesn't cover driver snapshots. The link now points to the driver fault tolerance section of the fault tolerance guide, which does. - `local-mode.md`: the prose said to change only `num_workers`, but the sample's diff also sets `use_gpu=True`. "Master node" stays: the section runs `torchrun` without a Ray cluster, so "head node" would mislead. - `using-accelerators.md`: `get_device` returns one device. - `data-loading-preprocessing.md`: "Ray Data splits all datasets" becomes "Ray Train splits", matching the same page's own statement that Ray Train splits all datasets with `Dataset.streaming_split` by default. Two code comments change to match. Corrections that need Ray Train engineering to confirm are in #66895, stacked on this one. ## Related issue number None. Not a duplicate: I searched open PRs touching `doc/source/train/`. The open PRs there are this stack (#66883, #66885, #66886, #66887, #66888) and the example cleanups (#66892, #66893), which don't touch these lines. ## Checks - Docs-only. The code edits are in a `:skipif: True` skeleton, an untested sample block, and code comments. - `vale` on the changed files from the repo root: alerts only removed, none added. - `codespell` on the changed files: clean. - `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check` on the changed files: clean. - The notebook still parses as JSON. - Full `-W` doc build: relying on the Read the Docs preview. AI assistance (Claude Code) was used to research and draft these edits. Draft until the submitter has 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]>
This was referenced Oct 14, 2026
dstrodtman
added a commit
that referenced
this pull request
Oct 23, 2026
…enforced) (#67017) ## Why are these changes needed? This PR adds Vale terminology rules for Ray Tune docs ahead of a style pass over those pages. It follows the pattern from #65239 (KubeRay), #66236 (RLlib), #66640 (Ray Core), and #66885 (Ray Train). Every rule is warn-level and **doesn't run in CI yet**. Registering the config lets contributors run `vale doc/source/tune/` by hand during the style pass. Builds on #67015 (merged), which renamed the Tune tutorials landing and hyphenated page slugs. The style pass PRs stacked on this one edit pages under those final names. ## What's here - **`.vale/styles/Tune/Terms.yml`:** case-sensitive `substitution` swaps at `level: warning`, each safe to apply without judgment, so the file sets `action: replace`. It spells out abbreviations in prose: `search alg`, `config dict`, `trial dir`, and `experiment dir`. The arguments and attributes keep code style. - **`.vale/styles/Tune/Capitalization.yml`:** title-cased generic nouns, such as `Search Algorithm`, `Trial Scheduler`, `Function API`, and `Bayesian Optimization`, plus `Trainable` written as the concept. Applying any of these takes judgment, so this rule has no replace action: - Lowercasing would also drop the capital at the start of a heading or sentence, which has to stay. - A bare "Trainable" in prose is often the class, which needs code style rather than lowercase. The rule's keys carry a preceding word, such as `the Trainable` and `your Trainable`, and leave the decision to a person. - "Bayesian Optimization" sometimes names the `bayesian-optimization` package rather than the technique. - **"Scheduler" is deliberately not a rule.** Ray Core and Kubernetes both have schedulers. The guide asks for "trial scheduler" where a page discusses more than one kind, and the rule flags only the title-cased `Trial Scheduler`. - **Accept lists:** - New `Tune` vocabulary: `trainable(s)`, `syncer(s)`, the search libraries `Hyperopt`, `Optuna`, `Nevergrad`, `BayesOpt`, `ZOOpt`, `HEBO`, and `Ax`, and the algorithm names `Hyperband`, `ASHA`, `BOHB`, `PBT`, `PB2`, and `TPE`. - `General` gains cross-library words: `docstring(s)`, `traceback(s)`, `runtimes`, `errored`, and `underperforming`. - Casing-only fixes such as `HyperOpt` and `HyperBand` come from the accept list driving `Vale.Terms` rather than from a swap, so no token alerts twice. - **`.vale.ini`:** registers `Tune` on the `Vocab` line and adds a `[doc/source/tune/**/*.{md,rst}]` section with `Vale, Google, Ray, Tune`, which mirrors the Train block. - **`writing-style.md`:** a "Writing Ray Tune docs" section with a terms table. Both Tune rules link to it through the `ray-tune-docs-style` label. The section also separates "trial" from "experiment," which the current prose uses loosely. An experiment is one `Tuner.fit()` call, and a trial is one run of the trainable with one hyperparameter configuration. No prose under `doc/source/tune/` changes here. The style pass that fixes the alerts follows in separate PRs stacked on this one. ## Duplicate check No open PR adds Ray Tune Vale rules. I searched open `ray-project/ray` PRs for `vale tune`, `writing-style.md`, and Tune docs titles. The hits are #66809, my own CI change with no Vale or style-guide edits, #65707, a KubeRay docs change, #64137, a Ray Core NIXL guide, and #67015, the rename this work builds on (now merged). ## Testing Commands, run from the repo root: ```bash vale --output=JSON doc/source/tune/ vale --output=line doc/source/ # on the base branch and on this branch, diffed pre-commit run --files <changed files> ``` Results with Vale 3.12.0: - **`doc/source/tune/`:** total alerts go from 1,239 to 1,437. Most of the increase is the shared `Ray` style now applying to Tune. `Tune.Capitalization` raises 118 alerts and `Tune.Terms` raises 1, all in title-cased concept nouns or spelled-out abbreviations. `Vale.Spelling` drops from 88 to 50. No position alerts twice across `Vale.Terms`, `Vale.Spelling`, and `Tune.*`. - **Two alert sources the style pass should handle rather than suppress:** - Library names in `api/suggestion.rst` headings, such as `Optuna (tune.search.optuna.OptunaSearch)`, now alert under `Vale.Terms` on the lowercase module segment. The module path belongs in code style. - `tutorials/tune-lifecycle.md` alerts on `ERRORED`, which it lists as a trial status. The source defines the status as `ERROR` (`Trial.ERROR` in `python/ray/tune/experiment/trial.py`), so that's a doc correction. - **Rule check against the new guide table:** linting the table rows fires `Vale.Terms` on `HyperBand`, `HyperOpt`, `hyperopt`, and `AX` in the "Not" column, as intended, the same as the Train table. - **Other scopes:** compared alert by alert across all of `doc/source` outside `tune/`, the only change is 17 removed alerts. They're false positives on `runtimes`, `errored`, `docstring`, `traceback`, and `Hyperopt` in Core, KubeRay, Serve, Train, observability, and contributor pages, plus one `Google.Parens` alert in `kuberay/user-guides/configuring-ippr.md:281` that the accept list now shadows. No new alerts. - **pre-commit:** passed on the changed files. - **Not run locally:** the Sphinx build. The only `doc/source` change is one new section and label in `writing-style.md`. The RtD preview covers it. Prepared with AI assistance (Claude Code). Draft until the submitter has 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]>
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.
Why are these changes needed?
This PR adds Vale terminology rules for Ray Train docs ahead of a style pass over those pages. It follows the pattern from #65239 (KubeRay), #66236 (RLlib), and #66640 (Ray Core). Every rule is warn-level and doesn't run in CI yet. Registering the config lets contributors run
vale doc/source/train/by hand during the style pass.Stacked on #66883, which renames the Train landing page and hyphenates page slugs. The path-scoped section targets the final paths, so this PR targets that branch. Retarget it to
masteronce #66883 merges.What's here
.vale/styles/Train/Terms.yml: case-sensitivesubstitutionswaps atlevel: warning, each safe to apply without judgment, so the file setsaction: replace. The forms follow the four conceptstrain/overview.mddefines:train functionbecomestraining function.scaling config,run config, andcheckpoint configare spelled out in prose. The classes keep code style.finetuneand its forms becomefine-tune.Train v2becomesTrain V2..vale/styles/Train/Capitalization.yml: title-cased generic nouns, such asFault Tolerance,Local Mode, andWorker Group, plusTrainerwritten as the Ray Train concept. Applying any of these takes judgment, so this rule has no replace action:Trainer. Those need code style, not lowercase. The rule's keys carry a preceding word, such asthe Trainerandyour Trainer, and leave the decision to a person.overview.mdcapitalizes it today, so the style pass changes that page.TraingainsJAX,Flax,Optax,Orbax,TensorBoard,torchrun,allreduce, andresharding.Generalgains cross-library words and vendor names:Trainium,Backblaze,Filestore,preemption(s),bottleneck(ed|ing),iterable(s),serializable, andcolocated.JaxandTensorboardcome from the accept list drivingVale.Termsrather than from a swap, so no token alerts twice.[Pp]y[Tt]orchand[Tt]ensor[Ff]lowbecomePyTorchandTensorFlow. Vocabularies register globally, so those bracket classes acceptedPytorchandTensorflowin every library and silently overrode the Train vocabulary's casing. The change adds no alerts underdoc/source/rllib. It surfaces 15 miscased brand names in prose elsewhere, across Serve, Tune, KubeRay, cluster, getting-started, and Train pages. It also flags the "Not" column of the new guide table, as intended, and one:link:false positive, described under Testing.Ray/Brands.yml: addsWandB→W&B. It's case-sensitive, so the lowercase package namewandbdoesn't match..vale.ini: a[doc/source/train/**/*.{md,rst}]section withVale, Google, Ray, Train, which mirrors the Core block.writing-style.md: a "Writing Ray Train docs" section with a terms table. Both Train rules link to it through theray-train-docs-stylelabel. The section also places a Train worker relative to a Ray Core worker process.No prose under
doc/source/train/changes here. The style pass that fixes the alerts follows in separate PRs stacked on this one.Duplicate check
No open PR adds Ray Train Vale rules. I searched open
ray-project/rayPRs forvale trainand forwriting-style.md. The only hits are #66809, my own CI change with no Vale or style-guide edits, and #65707, a KubeRay docs change.Testing
Commands, run from the repo root:
Results with Vale 3.12.0:
doc/source/train/: total alerts go from 839 to 802.Train.Termsraises 5 alerts, all true positives.Train.Capitalizationraises 29:Trainerconcept uses, title-casedFault ToleranceandLocal Mode, and the Lightning and TransformersTrainermentions that the style pass should put in code style.Vale.Spellingdrops from 77 to 43. The rest is mostly unbackticked code and identifiers for the prose pass. No position alerts twice acrossVale.Terms,Vale.Spelling,Train.*,Ray.Terms, andRay.Brands.Trainer, which the rule deliberately doesn't match.doc/source/rllib,doc/source/core, anddoc/source/kuberay, the accept-list entries remove 4 false positives (serializable,colocated,JAX, and oneGoogle.Parens). The only new alerts are 5 true-positiveWandBhits in RLlib, from the sharedRay/Brands.yml. Across all ofdoc/source, the RLlib accept-list fix is the only other source of new alerts.:link:option as prose.train/more-frameworks.md:43(:link: distributed-tensorflow-keras) alerted onkerasbefore this PR and now also alerts ontensorflow. A section-scopedTokenIgnores = (:link: \S+)didn't suppress it, so it's left as a follow-up. Five:link:lines exist acrossdoc/source.doc/sourcechange is one new section and label inwriting-style.md. The RtD preview covers it.Prepared with AI assistance (Claude Code). Draft until the submitter has reviewed every changed line.
🤖 Generated with Claude Code