Repository navigation
[Doc] Style pass on the TPU docs added in #66991 - #67194
Merged
Merged
Conversation
Apply Ray writing-style guide fixes to the prose that #66991 added across the TPU pages: split long multi-clause sentences, define acronyms on first use, fix list and code-block lead-ins, and use second person and present tense. No technical claims, code blocks, anchors, or link targets change. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
ronny-anyscale
approved these changes
Oct 20, 2026
Contributor
There was a problem hiding this comment.
Code Review
This pull request makes various documentation improvements and clarifications across several files related to scheduling, configuring, and using Google Cloud TPUs with Ray, KubeRay, Ray Train, and Ray Serve. The changes primarily focus on improving readability, correcting phrasing, and clarifying TPU-specific configurations. One review comment was kept, which identifies a typo in a model name (google/gemma-4-31B-it) within the TPU serving guide and suggests correcting it to a valid model version such as google/gemma-2-27b-it.
andrewsykim
approved these changes
Oct 20, 2026
dstrodtman
added a commit
that referenced
this pull request
Oct 21, 2026
## Why are these changes needed? A rolling batch of small, independent docs fixes. Ray's `AGENTS.md` permits mechanical cleanups when they're bundled rather than opened one per PR, so they collect here. Each fix is its own commit, so a reviewer can drop any one without disturbing the rest. This stays a draft while it collects fixes. ### Fixes - **Show the never-run TorchTPU example as a plain code block** (`train/user-guides/using-accelerators.md`). #66991 added the TorchTPU example as a `testcode` block with `:skipif: True`. Since #66974, `writing-code-snippets.md` says not to do that, because the block never runs but reads as tested code. It's now a plain `python` block, like the JAX TPU example above it. It was the last `:skipif: True` block under `doc/source/`. - **Fix the broken PyTorch Neuron setup link** (`serve/tutorials/aws-neuron-core-inference-stable-diffusion.md`). AWS moved the Neuron setup page, so `frameworks/torch/torch-setup.html` returns 404 and the scheduled docs link check flags it. The link now points at `setup/torch-neuronx.html`, which the sibling `aws-neuron-core-inference.md` tutorial already uses. - **Link the GIL to the Python glossary** (`core/actors/async-api.md`). The Python wiki dropped its `/moin/` paths, so `wiki.python.org/moin/GlobalInterpreterLock` returns 404. The link now goes to the glossary entry in the official Python docs, `docs.python.org/3/glossary.html#term-global-interpreter-lock`. ## Related issue number None. ## Duplicate check Not a duplicate. `gh pr list --repo ray-project/ray --state open --search "using-accelerators skipif"` returns nothing, and #67194, which restyled the same TPU pages, left this block as it was. ## Testing - Both new link targets return 200, and the glossary page contains the `term-global-interpreter-lock` anchor. The two old URLs return 404. - `python doc/test_prose_doctest_targets.py` passes: "74 listed pages; every runnable page is accounted for." The page still has other runnable blocks, so it stays in `doctest[train-gpu]`. - `git grep -n skipif -- doc/source` now finds only the guide's instruction not to use it. - Extracting the page's examples is unaffected for runnable blocks: pytest-sphinx drops a `:skipif: True` block before it builds an example, so this block was never collected. - `pre-commit` passes on the changed file. AI assistance (Claude Code) was used to find and make these fixes. 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]>
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.
Description
A style and grammar pass on the prose that #66991 added to the TPU docs, against Ray's writing-style guide. #66991 merged before the docs team could review it, so these edits land as a follow-up instead of review suggestions. The edits are scoped to the lines #66991 added. Other text on these pages is unchanged.
The changes fall into these categories:
No technical claim, value, flag, code block, label, or link target changes.
How meaning was checked
Every changed sentence was compared with its original for semantic drift. The check verified each claim against the Ray source and the doc examples at this commit. It found two edits that had changed a claim, and both are fixed in this PR:
RAY_TPU_RESOURCE_PER_CHIP=2instruction. The instruction now says "on TPU7x" explicitly.Two edits add or reword descriptions of example code. Both were checked against the code:
optimizer.step()call withnum_workers=16andresources_per_worker={"TPU": 1}.google/gemma-4-31B-it" now names the vLLM-TPU example. That tab is the only one that uses that model.Questions for maintainers
These are pre-existing issues the check surfaced. This PR doesn't change any of them:
system-metrics.md: The sentence "Exported on Google Cloud TPU nodes when the GKE TPU device plugin metric server is active" appears only on theray_tpu_tensorcore_utilizationrow. Inreporter_agent.py, all fiveray_tpu_*gauges come from the same device-plugin scrape, and none are emitted whenTPU_DEVICE_PLUGIN_ADDRis unset. Should the condition move to a lead-in that covers all five rows? Separately, a source comment says some TPU types don't report runtime metrics. On those types,duty_cycle,memory_used, andmemory_totalread 0. Is that worth documenting?serve/llm/user-guides/tpu.md: The instruction "Setmodel_sourceto a local or mounted model path, or another path that all TPU hosts can read" sits between the descriptions of the two examples. The vLLM-TorchTPU example uses the Hugging Face IDQwen/Qwen3-8B. Does the shared-path requirement apply only to vLLM-TPU, or to both engines?Additional information
This PR was prepared with AI assistance (Claude Code) and reviewed by a human, who stands behind every change.
🤖 Generated with Claude Code