Skip to content

[doc] Style pass on the JAX TPU profiling user guide - #65287

Merged
dstrodtman merged 3 commits into
ray-project:masterfrom
dstrodtman:djs-260807-jax-tpu-profiling-style
Aug 12, 2026
Merged

dstrodtman merged 3 commits into
ray-project:masterfrom
dstrodtman:djs-260807-jax-tpu-profiling-style

Conversation

@dstrodtman

@dstrodtman dstrodtman commented Aug 7, 2026 •

Copy link
Copy Markdown
Contributor

Description

A documentation style and grammar pass over the JAX TPU profiling user guide added in #64735, plus the TPU profiling section that PR added to profiling.md.

#64735 merged before a docs-team review landed (@rueian had asked for one on the thread). This follow-up applies the Ray documentation style guide to the new page.

The first commit is style and grammar only. The second commit carries two factual corrections that came out of review on this PR, both verified against the source and described below.

Corrections (commit 2)

  • Port discovery. The page implied that passing a custom port to init_jax_profiler() means you must also pass port= to the dashboard endpoint. init_jax_profiler() registers whatever port it binds to under jax_profiler_port:<node_id_hex>:<pid> in the GCS internal KV store (python/ray/util/tpu.py), and the /worker/jax_profile handler reads that key only when the request omits port=, returning a 400 when the lookup is empty (python/ray/dashboard/modules/reporter/reporter_head.py). So port= bypasses the lookup rather than being required for custom ports. The rewrite also documents JAX_PROFILER_PORT, which the same function reads and which the page didn't mention.
  • Profile plugin name. tensorboard-plugin-profile publishes on PyPI as the XProf Profiler Plugin (openxla/xprof), covering TPU, GPU, and CPU. Dropped the inaccurate "Google TPU" qualifier.

Style changes (commit 1)

  • Added the required myst.html_meta description front matter. The guide asks for one on every page; the new page had none.
  • Tagged the untagged fence. The expected ls output block had no language; it's now text.
  • Active voice where there's a nameable actor. "tensorflow is required by the Ray Dashboard ReporterAgent" becomes the agent using it. "The JAX trace file was captured and saved" becomes the profiler capturing and saving it.
  • Cut filler and hedging. Dropped "Note that." ensure X is set to "1" becomes set X to "1". "Ensure you have TensorBoard installed" becomes "Install TensorBoard."
  • Ray 2.57+ spelled out as Ray 2.57 or later, per the rule against symbols standing in for words in prose.
  • Consistent product naming. "the dashboard head," "the dashboard profiling endpoints," and "the head node dashboard port" now all say Ray Dashboard.
  • Split one long multi-clause sentence in the profiler-initialization section, which carried a mid-sentence "which defaults to port 9999" clause.
  • Added the missing blank line between each H3 and its lead-in prose. The H2s in the file already had them.
  • profiling.md: rewrote the new TPU profiling paragraph, which used the "Ray provides integration for" framing the guide steers away from.

Four H3 headings changed wording slightly, so their generated anchors change. The page is a day old and nothing links to those anchors yet.

Left alone on purpose

The <UPPER_CASE> placeholders. The style guide's example uses lowercase-hyphenated names inside angle brackets, but a survey of doc/source shows uppercase-in-brackets is the established convention across Ray docs. Not worth churning this page against the rest.

Questions for the author and reviewers

Two technical points I noticed but didn't touch, since they're outside a style reviewer's scope:

  1. The ls command and its expected output don't line up. The guide runs:

    kubectl exec -it <TPU_WORKER_POD> -c ray-worker -- ls -la /tmp/ray/session_latest/logs/profiles

    and shows the output as:

    -rw-r--r-- 1 ray users 79526813 Jun  2 15:26 /tmp/ray/session_latest/logs/profiles/plugins/profile/2026_06_02_15_26_15/localhost_9999.xplane.pb
    

    A plain ls -la on that directory would list its immediate children (plugins), not a nested file with its full path. Was the sample output captured with ls -laR, a find, or an ls against the full nested path? Happy to send the fix once you confirm which.

  2. -it on that exec looks unnecessary for a non-interactive ls. It also fails in contexts without a TTY, such as a CI script. Worth dropping to just kubectl exec <TPU_WORKER_POD> -c ray-worker -- ls ...?

Not a duplicate

No open PR or issue targets doc/source/ray-observability/user-guides/jax-tpu-profiling.md. Checked with gh pr list --repo ray-project/ray --state open --search "jax-tpu-profiling in:title,body" and gh search prs --repo ray-project/ray --state open "jax tpu profiling"; both empty. All of the review feedback on #64735 (the hardcoded personal paths and registry names from the Gemini review, @andrewsykim's questions on the custom image, the sample RayJob, and pod scoping) was addressed by the author before merge, so nothing here reopens a settled thread.

Verification

  • vale --config=.vale.ini --output=line doc/source/ray-observability/user-guides/jax-tpu-profiling.md — clean apart from Google.Acronyms on "JAX" and the two Google.Passive hits this PR fixes. Advisory only: per .vale.ini, Vale is scoped to the Ray Data docs and the example gallery, so it doesn't gate ray-observability.
  • pre-commit run --files <changed files> — no hook covers Markdown under doc/source/, so every check reports "no files to check."
  • The two corrections in commit 2 were read out of python/ray/util/tpu.py and python/ray/dashboard/modules/reporter/reporter_head.py, and the plugin's identity from the PyPI metadata for tensorboard-plugin-profile. No behavior claim here comes from the page's own prose.
  • No code changed, so no unit tests apply. The Sphinx build is the real gate. Relying on the Read the Docs preview build on this PR to confirm the new front matter parses and the {ref} targets still resolve.

AI assistance (Claude Code) was used to draft this change. I reviewed every changed line and I stand behind it.

Apply the Ray documentation style guide to the JAX TPU profiling guide added
in ray-project#64735, and to the TPU profiling section it added to profiling.md.

- Add the required myst.html_meta description front matter.
- Tag the untagged expected-output fence as text.
- Replace passive constructions that have a nameable actor.
- Drop "note that" and other filler; make hedged instructions imperative.
- Spell out "Ray 2.57+" as "Ray 2.57 or later" per the no-symbols-in-prose rule.
- Use "Ray Dashboard" consistently instead of alternating with "dashboard".
- Split a long multi-clause sentence in the profiler-initialization section.
- Add the missing blank line between each H3 and its lead-in prose.

No technical content changes.

Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman requested review from a team as code owners August 7, 2026 16:02
@dstrodtman

Copy link
Copy Markdown
Contributor Author

@richabanker GitHub won't let me add you as a reviewer, so flagging you here since this is a follow-up on your #64735. It's style and grammar only, no technical changes, but there are two questions in the description about the ls -la sample output and the -it flag that only you can answer.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request refines the documentation for JAX TPU profiling on Ray on Kubernetes, improving clarity, formatting, and metadata. The review comments suggest two documentation corrections: clarifying that GCS auto-discovery works with custom ports (meaning the port parameter is only needed to bypass discovery), and correcting the reference to tensorboard-plugin-profile as the 'TensorBoard profile plugin' rather than the 'Google TPU profile plugin'.

```

You can also pass `ip=<WORKER_IP>` instead of `node_id=<NODE_ID_HEX>`. If you specified a custom port when initializing the profiler, you can also pass `port=<PORT>` to override GCS auto-discovery.
You can pass `ip=<WORKER_IP>` instead of `node_id=<NODE_ID_HEX>`. If you specified a custom port when initializing the profiler, pass `port=<PORT>` to override GCS auto-discovery.

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

GCS auto-discovery works perfectly fine with custom ports because init_jax_profiler() registers whatever port is passed to it into the GCS internal KV store. Therefore, passing port=<PORT> is only needed if you want to bypass or override GCS auto-discovery entirely, rather than being a requirement for using a custom port.\n\nConsider updating this sentence to clarify:\nmarkdown\nYou can pass `ip=<WORKER_IP>` instead of `node_id=<NODE_ID_HEX>`. You can also pass `port=<PORT>` to bypass GCS auto-discovery if needed.\n

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Confirmed against the source, and applied in bb1609f. The original sentence was misleading and I'd carried it through unchanged.

init_jax_profiler() registers whatever port it binds to, custom or not, under jax_profiler_port:<node_id_hex>:<pid> in the GCS internal KV store (python/ray/util/tpu.py). The /worker/jax_profile handler only reads that key when the request omits port=, and returns a 400 saying port is required when the lookup comes back empty (python/ray/dashboard/modules/reporter/reporter_head.py). So port= is a bypass for the lookup, not something a custom port requires.

I went a bit further than the suggested text, since the same function also reads JAX_PROFILER_PORT and that wasn't documented anywhere on the page:

The Ray Dashboard discovers the profiler port from the GCS registry, including a custom port that you passed to init_jax_profiler() or set through the JAX_PROFILER_PORT environment variable. Pass port=<PORT> only to bypass that lookup, or when the endpoint reports that it couldn't discover the port.

@richabanker, this is the one change in the PR that isn't purely stylistic, so worth your eye.

Ensure you have TensorBoard and the official Google TPU profile plugin installed in your local Python environment:
### Install TensorBoard and the profile plugin

Install TensorBoard and the Google TPU profile plugin in your local Python environment:

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

medium

The package tensorboard-plugin-profile is the general TensorBoard Profile Plugin (which supports TPU, GPU, etc.) rather than being specifically named the 'Google TPU profile plugin'. Referring to it as the 'TensorBoard profile plugin' is more accurate and aligns better with its official name.

Suggested change
Install TensorBoard and the Google TPU profile plugin in your local Python environment:
Install TensorBoard and the TensorBoard profile plugin in your local Python environment:

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Right on the substance, applied in bb1609f. Checked PyPI: tensorboard-plugin-profile publishes as the XProf Profiler Plugin from openxla/xprof, and XProf covers TPU, GPU, and CPU. "Google TPU profile plugin" was wrong on both the scope and the name.

I dropped the qualifier rather than substituting "TensorBoard profile plugin", to avoid the doubled "TensorBoard and the TensorBoard...". The section heading already says "Install TensorBoard and the profile plugin", and the pip install line directly below names the package, so the reader has no ambiguity:

Install TensorBoard and the profile plugin in your local Python environment:

Two corrections from review feedback on the JAX TPU profiling guide.

The guide implied that passing a custom port to init_jax_profiler() requires
also passing port= to the dashboard endpoint. It doesn't. init_jax_profiler()
registers whatever port it binds to under jax_profiler_port:<node_id>:<pid> in
the GCS internal KV store (python/ray/util/tpu.py), and the /worker/jax_profile
handler only reads that key when the request omits port=
(python/ray/dashboard/modules/reporter/reporter_head.py). So port= is a bypass
for the lookup, not a requirement for custom ports. Also document
JAX_PROFILER_PORT, which the same function reads.

tensorboard-plugin-profile isn't TPU-specific. PyPI publishes it as the XProf
Profiler Plugin (openxla/xprof), which covers TPU, GPU, and CPU, so drop the
'Google TPU' qualifier.

Signed-off-by: Douglas Strodtman <[email protected]>
@andrewsykim

Copy link
Copy Markdown
Member

cc @richabanker

@dstrodtman dstrodtman added go add ONLY when ready to merge, run all tests docs-go RtD-only checks for docs-only changes. Doesn't run full library doc-test suites. labels Aug 7, 2026
@ray-gardener ray-gardener Bot added docs An issue or change related to documentation core Issues that should be addressed in Ray Core labels Aug 7, 2026
ray-project#65115 curated a description for this page while this branch was open.
Keeping master's, which fits the 130-150 character house rule that pass
established; this branch's was 209 characters.

Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman merged commit 1d73f34 into ray-project:master Aug 12, 2026
6 checks passed
dstrodtman added a commit that referenced this pull request Aug 14, 2026
## Why this change

Ray on Kubernetes docs use "Ray Pod" 89 times, and this PR removes the
term. It's the concrete counterpart to the discussion in #65239, where a
reviewer asked whether the Kubernetes casing rule should capitalize Pod
in "Ray pod". Investigating that question produced a better answer than
either casing.

**A Pod isn't a Ray node, it's a host that contains one.** Kubernetes
defines a Pod as an "application-specific logical host" holding one or
more containers. KubeRay indexes exactly one Ray container per Pod
through `utils.RayContainerIndex`, and routinely places non-Ray
containers alongside it: the autoscaler sidecar, the history-server
collector, the RayJob submitter in `SidecarMode`, and the Fluent Bit
sidecars that `persist-kuberay-custom-resource-logs.md` documents. The
Pod is a strict superset of the Ray node, so naming it after Ray
overstates what it is. It's the same category error as "head node pod",
one level up.

**"Pod" is already taken in these docs, by something that isn't a
Kubernetes object.** A TPU Pod is a group of interconnected TPU chips.
`user-guides/tpu.md` writes "The name of the TPU Pod or slice" and "The
TPU pod type" three lines apart, and
`ray.util.tpu.get_current_pod_name()` is a public API whose docstring
reads "Return the name of the TPU pod that the worker is a part of".
Standardizing on a capitalized `Ray Pod` would put it beside a
capitalized `TPU Pod` on the same pages, distinguished only by the
preceding word.

**The mapping is already documented.** `user-guides/k8s-autoscaler.md`
says "each Ray node is run as a Kubernetes Pod", so two defined terms
already cover what the compound names.

**There was no convention to preserve.** Across the 55 prose lines using
the term, casing split four ways:

| Form | Occurrences |
|---|---|
| Ray Pods | 20 |
| Ray pods | 16 |
| Ray pod | 16 |
| Ray Pod | 15 |

Meanwhile "head Pod" and "worker Pod" already outnumber it 284 to 86
under `doc/source/cluster/kubernetes/`, so the replacement vocabulary is
the one these docs mostly use.

## What changed

83 lines across 31 files. The term becomes "Pod" where context is
unambiguous, which is most of them. Where a bare "Pod" would lose
meaning I used an explicit form instead:

- Headings, which have no surrounding context: "Check logs of the head
and worker Pods", "Verify the Ray cluster's Pods and PodGroup",
"Configuring Kubernetes Pods for TPU usage".
- Pages where other kinds of Pod are in scope: "the Ray cluster's Pods"
in `network-policy.md`, `prometheus-grafana.md`, `k8s-events.md`, and
`scheduler-plugins.md`.
- `rayservice-high-availability.md` listed "Ray Pod: This Pod sends
requests to the RayService". That Pod is a client that isn't part of the
RayCluster, and it's named `ray-pod` in the sample manifest, so it's now
listed by its actual object name.

## What replaces it on the orientation pages

Removing the compound takes away the handle a Ray-first reader was using
for the node-and-Pod relationship, so the relationship now gets stated
where readers form their mental model. It was only in
`user-guides/k8s-autoscaler.md`, whose title begins "(Advanced)", and
absent from `index.md`, `getting-started.md`, and
`user-guides/config.md`.

One sentence each on the two orientation pages:

- `index.md`: "KubeRay runs each Ray node as a Kubernetes Pod, so each
Ray cluster consists of a head Pod and a collection of worker Pods."
- `getting-started.md`: "It runs each Ray node as a Kubernetes Pod, so a
Ray cluster's head node is its head Pod and its worker nodes are its
worker Pods."

`getting-started/raycluster-quick-start.md` is the natural third
location, since line 53 is where the two vocabularies genuinely first
meet for a reader following the quickstart. It's left alone
deliberately: that paragraph writes "pods" lowercase throughout, and
adding a capitalized sentence into it would either read inconsistently
or drag the casing sweep into this PR. It belongs to whoever runs that
pass.

The rules behind both changes are in #65239, which now carries a "State
the node-to-Pod mapping once, early" section and a "Keep Pods out of
Ray-general pages" section. The second one is why this PR touches
`ray-core/scheduling/placement-group.rst` and
`serve/production-guide/fault-tolerance.md`.

## What this deliberately doesn't touch

- **`Ray head Pod` and `Ray worker Pod` stay.** Those qualify by role,
which is the form these docs already prefer and the one Google's Ray on
GKE docs use. Only the unqualified compound goes.
- **No casing sweep.** Lowercase "head pod" occurrences are left alone.
That's the Vale rule in #65239, not this PR.
- **`python/` code comments and docstrings keep the term.** About 10
occurrences under `python/ray/autoscaler`, `python/ray/dashboard`, and
the KubeRay tests identify which Pods the operator manages, which is
reasonable for a code comment. This PR is scoped to documentation prose.
- **The `kuberay` repo is out of scope.** Its authored prose has a
handful of uses and its `docs/reference/api.md` is generated from Go doc
comments. That's a maintainer call for that repo, and I'll raise it
there separately rather than assume the same decision carries.

## Two fixes on lines this change already rewrites

- `k8s-autoscaler.md` linked to `.../horizontal-Pod-autoscale/`, which
returns **404**. The correct URL is all-lowercase and returns 200. An
earlier Pod-casing sweep appears to have capitalized inside the URL.
- `index.md` described a Ray cluster as "a head node pod and a
collection of worker node pods", stacking both vocabularies in one
phrase. Now "a head Pod and a collection of worker Pods".
- `index.md` also wrote "heterogenous compute nodes" on that same line.
Now "heterogeneous".

## One casing fix folded in

`k8s-ecosystem/kai-scheduler.md` wrote "KAI scheduler deployment" in one
place and "KAI Scheduler" everywhere else. The KubeRay Vale vocabulary
proposed in #65239 surfaced it, and @win5923 confirmed the two-word
title-case form on that PR. Folded in here rather than opened as a
one-line PR, per the guidance in `AGENTS.md` about standalone trivial
changes.

The other hyphenated spellings in that file stay as they are. They sit
inside links to `NVIDIA/KAI-Scheduler`, the Helm release name, and the
`<KAI_SCHEDULER_VERSION>` placeholder, so none of them are prose.

## Testing

```
pre-commit run --files $(git diff --name-only)
```

Every hook reports "no files to check". Stating that plainly rather than
implying coverage it doesn't give: no pre-commit hook applies to
Markdown or reStructuredText under `doc/source/`, and the `vale` hook is
scoped to `^doc/source/data/.*`, so none of these files are linted in CI
today.

What I verified by hand instead:

- **No residual term.** `grep -rIniE '\bray [*_`]* ?pods?\b' .` over the
whole repo returns only the `python/` code comments listed above as
intentionally out of scope. This includes a markup-split case, "Ray
\*\*Pod quantities\*\*", that a naive search misses.
- **reStructuredText heading integrity.** `gpu.rst` has a section whose
title shortened, so its underline was resized to match. Title and
underline are both 30 characters.
- **No broken anchors.** Four headings changed text. Searched for
inbound references to their generated anchors and found none, and none
carries an explicit MyST anchor.
- **The URL fix.** `curl` returns 404 for the old casing and 200 for the
new one.
- **Config comments included.** `configs/static-ray-cluster.tls.yaml`
carried the term in two YAML comments mirroring `config.md` prose, so
the removal is complete rather than Markdown-only.

Rendering is verified by the Read the Docs preview build on this PR.

No code, no API, no behavior change.

## Not a duplicate

```
gh pr list --repo ray-project/ray --state open --search "Ray Pod"
gh pr list --repo ray-project/ray --state open --search "pod terminology"
```

No open PR proposes this change. #65239 is the style-guide PR where the
question came up and is the discussion surface for the rule; this PR is
the cleanup and stands on its own against master. Two of my open PRs
touch nearby files: #65287 rewrites lines in `jax-tpu-profiling.md`,
which this PR doesn't touch, and #65263 is a draft adding
`scheduling.md`, which introduces one new use of the term that I'll fix
there rather than here.

Per `AGENTS.md`, mechanical cleanups need maintainer coordination.
That's the thread on #65239 with @win5923, who reviewed and approved the
style-guide change and raised the question this PR answers.

## AI assistance

Written with AI assistance (Claude). I've reviewed every changed line,
generated and inspected the counts myself, and can defend the change end
to end.




---

### Update: four casing defects folded in (f9fc8ea)

Extending the KubeRay Vale vocabulary in #65239 turned four latent
casing errors into alerts. They belong with the rest of the terminology
cleanup rather than in a PR of their own.

- `configuring-ippr.md`, two uses: "Kubelet" to "kubelet". Kubernetes
writes the component lowercase in prose.
- `rayservice-incremental-upgrade.md`: "Install istio" to "Install
Istio" in a step label, where the word names the project. The lowercase
`istio` elsewhere on that page is correct and stays, since it's a
GatewayClass `metadata.name` and a `controllerName` value rather than
the project name.
- `resource-isolation-with-writable-cgroups.md`: the H1 read "Resource
Isolation with Writable Cgroups on Google Kubernetes Engine (GKE)".
Lowercasing only "Cgroups" would leave a title-case heading with one
lowercase word, so the whole heading moves to sentence case, which the
style guide requires anyway.

**One coupling worth flagging for review.** The explicit MyST label
above that H1 is unchanged, so every `{ref}` to the page still resolves,
and the bare `{ref}` in `cluster/kubernetes/user-guides.md` picks up the
new title automatically. But
`ray-core/resource-isolation-with-cgroupv2.rst` passes custom link text
that mirrored the old title case, so that text moves to sentence case
too. That's the one file this PR touches outside
`doc/source/cluster/kubernetes/`, and it's a one-line consistency fix
caused directly by the heading change.

Verified against the #65239 ruleset by diffing the alert set for these
files before and after the change: the four alerts clear and no new
alert appears. AI assistance was used for this commit and for that
verification.


### Update: a bad replacement in this PR, plus three defects in the same
files (89b0e49)

**This PR had a bug.** The term replacement turned "KubeRay pods" into
"KubePods" in `tpu.md`: the pattern matched "Ray pods" inside "KubeRay
pods" and left the "Kube" prefix glued to the replacement. `git log -S`
traces it to the retirement commit, so it isn't pre-existing. It's now
"Pods", which is what the rule asks for when the qualifier only names
the framework.

I swept every added line in this PR for the same signature, a lowercase
letter glued to "Pod" or "Pods", and this was the only instance. The
other repo-wide matches are Kubernetes event reasons such as
`CreatedHeadPod`, correct as literal strings.

Three more defects, in files this PR already edits:

- `tpu.md`: "GKE nodepool" to "GKE node pool" in prose. The `az aks
nodepool` spelling elsewhere in the docs is a CLI subcommand and stays.
- `prometheus-grafana.md`: "spawned by replicaset controller" to
"spawned by a ReplicaSet controller", fixing the API object casing and a
missing article.
- `rayservice-incremental-upgrade.md`: "utilizing" to "using", "like" to
"such as" for an example, and "(e.g. `istio`)" to "for example `istio`",
plus the imperative in place of "You will need to".

Verified against the #65239 ruleset with a column-independent diff of
the alert set for these files: five alerts clear, no new finding. The
two passive-voice alerts that change column position are pre-existing
and unchanged in substance.

**Deliberately not in this PR.** These sit in files this PR doesn't
otherwise touch, so folding them in would widen its file scope for
unrelated reasons: "Deepseek" for DeepSeek in
`examples/rayserve-deepseek-example.md` (an H1) and
`serve/llm/architecture/overview.md`; `gsutil` in
`examples/distributed-checkpointing-with-gcsfuse.md`, where `gcloud
storage` supersedes it and swapping a documented command needs someone
who can verify the equivalent invocation; and "nodepool" in the prose of
`user-guides/azure-aks-gpu-cluster.md`.

AI assistance was used for this commit and for the verification above.


### Update: adopt the RayCluster possessive the style guide settled on
(68041df)

#65239 merged after this PR was written, and the rule it landed is more
specific than the form used here. It says to use the resource name in
the possessive: the operator creates these Pods, sets their
`ownerReferences` to the RayCluster, and labels them `ray.io/cluster`,
so ownership, selection, and lifecycle are facts about the resource
rather than about the Ray cluster it produces. Its worked example is the
exact sentence this PR introduced in six places: "List the RayCluster's
Pods" above `kubectl get pods -l=ray.io/is-ray-node=yes`.

All 16 possessives become "the RayCluster's Pods". Each turns on one of
the three:

- **Selection**, nine uses. Six step comments above label-filtered
`kubectl` commands in `rayservice.md`, `rayservice-quick-start.md`,
`configuring-autoscaling.md`, `label-based-scheduling.md`, and
`rayservice-no-ray-serve-replica.md` (twice); the PodMonitor and the
`kubectl wait -l ray.io/cluster=` in `prometheus-grafana.md`; and the
`podSelector` in `network-policy.md`.
- **Ownership**, four uses. The Pods the RayCluster owns and places in
one PodGroup in `scheduler-plugins.md` (three), and the Pods KubeRay
injects environment variables into in `k8s-events.md`.
- **Membership**, three uses. Which Pods carry the proxy in
`kuberay-serve-high-throughput.md`, and which Pods to `exec` into in
`serve/production-guide/fault-tolerance.md` (twice).

Non-possessive uses of "Ray cluster" are unchanged, since they name the
running thing. Two of them the style guide now carries verbatim as its
own `Use:` examples: "Each Ray cluster consists of a head Pod and a
collection of worker Pods" on the landing page, and "a Ray cluster's
head node is its head Pod" on the getting-started page. That's a check
on the earlier commits rather than a change to them.

One thing left alone. `config.md` reads "manages Pods in order to match
the `RayCluster`'s spec", with the resource name in backticks. The
backticks predate this PR and code-formatting the resource name is a
separate question from the possessive, so it stays as it is.

---------

Signed-off-by: Douglas Strodtman <[email protected]>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
## Description

A documentation style and grammar pass over the JAX TPU profiling user
guide added in ray-project#64735, plus the TPU profiling section that PR added to
`profiling.md`.

ray-project#64735 merged before a docs-team review landed (@rueian had asked for
one on the thread). This follow-up applies [the Ray documentation style
guide](https://docs.ray.io/en/master/ray-contribute/writing-style.html)
to the new page.

The first commit is style and grammar only. The second commit carries
two factual corrections that came out of review on this PR, both
verified against the source and described below.

### Corrections (commit 2)

- **Port discovery.** The page implied that passing a custom port to
`init_jax_profiler()` means you must also pass `port=` to the dashboard
endpoint. `init_jax_profiler()` registers whatever port it binds to
under `jax_profiler_port:<node_id_hex>:<pid>` in the GCS internal KV
store (`python/ray/util/tpu.py`), and the `/worker/jax_profile` handler
reads that key only when the request omits `port=`, returning a 400 when
the lookup is empty
(`python/ray/dashboard/modules/reporter/reporter_head.py`). So `port=`
bypasses the lookup rather than being required for custom ports. The
rewrite also documents `JAX_PROFILER_PORT`, which the same function
reads and which the page didn't mention.
- **Profile plugin name.** `tensorboard-plugin-profile` publishes on
PyPI as the XProf Profiler Plugin
([openxla/xprof](https://github.com/openxla/xprof)), covering TPU, GPU,
and CPU. Dropped the inaccurate "Google TPU" qualifier.

### Style changes (commit 1)

- **Added the required `myst.html_meta` `description` front matter.**
The guide asks for one on every page; the new page had none.
- **Tagged the untagged fence.** The expected `ls` output block had no
language; it's now `text`.
- **Active voice where there's a nameable actor.** "`tensorflow` is
required by the Ray Dashboard `ReporterAgent`" becomes the agent using
it. "The JAX trace file was captured and saved" becomes the profiler
capturing and saving it.
- **Cut filler and hedging.** Dropped "Note that." `ensure X is set to
"1"` becomes `set X to "1"`. "Ensure you have TensorBoard installed"
becomes "Install TensorBoard."
- **`Ray 2.57+` spelled out as `Ray 2.57 or later`**, per the rule
against symbols standing in for words in prose.
- **Consistent product naming.** "the dashboard head," "the dashboard
profiling endpoints," and "the head node dashboard port" now all say
**Ray Dashboard**.
- **Split one long multi-clause sentence** in the
profiler-initialization section, which carried a mid-sentence "which
defaults to port 9999" clause.
- **Added the missing blank line between each H3 and its lead-in
prose.** The H2s in the file already had them.
- **`profiling.md`:** rewrote the new TPU profiling paragraph, which
used the "Ray provides integration for" framing the guide steers away
from.

Four H3 headings changed wording slightly, so their generated anchors
change. The page is a day old and nothing links to those anchors yet.

### Left alone on purpose

The `<UPPER_CASE>` placeholders. The style guide's example uses
lowercase-hyphenated names inside angle brackets, but a survey of
`doc/source` shows uppercase-in-brackets is the established convention
across Ray docs. Not worth churning this page against the rest.

## Questions for the author and reviewers

Two technical points I noticed but didn't touch, since they're outside a
style reviewer's scope:

1. **The `ls` command and its expected output don't line up.** The guide
runs:

   ```bash
kubectl exec -it <TPU_WORKER_POD> -c ray-worker -- ls -la
/tmp/ray/session_latest/logs/profiles
   ```

   and shows the output as:

   ```text
-rw-r--r-- 1 ray users 79526813 Jun 2 15:26
/tmp/ray/session_latest/logs/profiles/plugins/profile/2026_06_02_15_26_15/localhost_9999.xplane.pb
   ```

A plain `ls -la` on that directory would list its immediate children
(`plugins`), not a nested file with its full path. Was the sample output
captured with `ls -laR`, a `find`, or an `ls` against the full nested
path? Happy to send the fix once you confirm which.

2. **`-it` on that `exec` looks unnecessary** for a non-interactive
`ls`. It also fails in contexts without a TTY, such as a CI script.
Worth dropping to just `kubectl exec <TPU_WORKER_POD> -c ray-worker --
ls ...`?

## Not a duplicate

No open PR or issue targets
`doc/source/ray-observability/user-guides/jax-tpu-profiling.md`. Checked
with `gh pr list --repo ray-project/ray --state open --search
"jax-tpu-profiling in:title,body"` and `gh search prs --repo
ray-project/ray --state open "jax tpu profiling"`; both empty. All of
the review feedback on ray-project#64735 (the hardcoded personal paths and registry
names from the Gemini review, @andrewsykim's questions on the custom
image, the sample RayJob, and pod scoping) was addressed by the author
before merge, so nothing here reopens a settled thread.

## Verification

- `vale --config=.vale.ini --output=line
doc/source/ray-observability/user-guides/jax-tpu-profiling.md` — clean
apart from `Google.Acronyms` on "JAX" and the two `Google.Passive` hits
this PR fixes. Advisory only: per `.vale.ini`, Vale is scoped to the Ray
Data docs and the example gallery, so it doesn't gate
`ray-observability`.
- `pre-commit run --files <changed files>` — no hook covers Markdown
under `doc/source/`, so every check reports "no files to check."
- The two corrections in commit 2 were read out of
`python/ray/util/tpu.py` and
`python/ray/dashboard/modules/reporter/reporter_head.py`, and the
plugin's identity from the PyPI metadata for
`tensorboard-plugin-profile`. No behavior claim here comes from the
page's own prose.
- No code changed, so no unit tests apply. The Sphinx build is the real
gate. Relying on the Read the Docs preview build on this PR to confirm
the new front matter parses and the `{ref}` targets still resolve.

AI assistance (Claude Code) was used to draft this change. I reviewed
every changed line and I stand behind it.

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Signed-off-by: 400Ping <[email protected]>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…t#65423)

## Why this change

Ray on Kubernetes docs use "Ray Pod" 89 times, and this PR removes the
term. It's the concrete counterpart to the discussion in ray-project#65239, where a
reviewer asked whether the Kubernetes casing rule should capitalize Pod
in "Ray pod". Investigating that question produced a better answer than
either casing.

**A Pod isn't a Ray node, it's a host that contains one.** Kubernetes
defines a Pod as an "application-specific logical host" holding one or
more containers. KubeRay indexes exactly one Ray container per Pod
through `utils.RayContainerIndex`, and routinely places non-Ray
containers alongside it: the autoscaler sidecar, the history-server
collector, the RayJob submitter in `SidecarMode`, and the Fluent Bit
sidecars that `persist-kuberay-custom-resource-logs.md` documents. The
Pod is a strict superset of the Ray node, so naming it after Ray
overstates what it is. It's the same category error as "head node pod",
one level up.

**"Pod" is already taken in these docs, by something that isn't a
Kubernetes object.** A TPU Pod is a group of interconnected TPU chips.
`user-guides/tpu.md` writes "The name of the TPU Pod or slice" and "The
TPU pod type" three lines apart, and
`ray.util.tpu.get_current_pod_name()` is a public API whose docstring
reads "Return the name of the TPU pod that the worker is a part of".
Standardizing on a capitalized `Ray Pod` would put it beside a
capitalized `TPU Pod` on the same pages, distinguished only by the
preceding word.

**The mapping is already documented.** `user-guides/k8s-autoscaler.md`
says "each Ray node is run as a Kubernetes Pod", so two defined terms
already cover what the compound names.

**There was no convention to preserve.** Across the 55 prose lines using
the term, casing split four ways:

| Form | Occurrences |
|---|---|
| Ray Pods | 20 |
| Ray pods | 16 |
| Ray pod | 16 |
| Ray Pod | 15 |

Meanwhile "head Pod" and "worker Pod" already outnumber it 284 to 86
under `doc/source/cluster/kubernetes/`, so the replacement vocabulary is
the one these docs mostly use.

## What changed

83 lines across 31 files. The term becomes "Pod" where context is
unambiguous, which is most of them. Where a bare "Pod" would lose
meaning I used an explicit form instead:

- Headings, which have no surrounding context: "Check logs of the head
and worker Pods", "Verify the Ray cluster's Pods and PodGroup",
"Configuring Kubernetes Pods for TPU usage".
- Pages where other kinds of Pod are in scope: "the Ray cluster's Pods"
in `network-policy.md`, `prometheus-grafana.md`, `k8s-events.md`, and
`scheduler-plugins.md`.
- `rayservice-high-availability.md` listed "Ray Pod: This Pod sends
requests to the RayService". That Pod is a client that isn't part of the
RayCluster, and it's named `ray-pod` in the sample manifest, so it's now
listed by its actual object name.

## What replaces it on the orientation pages

Removing the compound takes away the handle a Ray-first reader was using
for the node-and-Pod relationship, so the relationship now gets stated
where readers form their mental model. It was only in
`user-guides/k8s-autoscaler.md`, whose title begins "(Advanced)", and
absent from `index.md`, `getting-started.md`, and
`user-guides/config.md`.

One sentence each on the two orientation pages:

- `index.md`: "KubeRay runs each Ray node as a Kubernetes Pod, so each
Ray cluster consists of a head Pod and a collection of worker Pods."
- `getting-started.md`: "It runs each Ray node as a Kubernetes Pod, so a
Ray cluster's head node is its head Pod and its worker nodes are its
worker Pods."

`getting-started/raycluster-quick-start.md` is the natural third
location, since line 53 is where the two vocabularies genuinely first
meet for a reader following the quickstart. It's left alone
deliberately: that paragraph writes "pods" lowercase throughout, and
adding a capitalized sentence into it would either read inconsistently
or drag the casing sweep into this PR. It belongs to whoever runs that
pass.

The rules behind both changes are in ray-project#65239, which now carries a "State
the node-to-Pod mapping once, early" section and a "Keep Pods out of
Ray-general pages" section. The second one is why this PR touches
`ray-core/scheduling/placement-group.rst` and
`serve/production-guide/fault-tolerance.md`.

## What this deliberately doesn't touch

- **`Ray head Pod` and `Ray worker Pod` stay.** Those qualify by role,
which is the form these docs already prefer and the one Google's Ray on
GKE docs use. Only the unqualified compound goes.
- **No casing sweep.** Lowercase "head pod" occurrences are left alone.
That's the Vale rule in ray-project#65239, not this PR.
- **`python/` code comments and docstrings keep the term.** About 10
occurrences under `python/ray/autoscaler`, `python/ray/dashboard`, and
the KubeRay tests identify which Pods the operator manages, which is
reasonable for a code comment. This PR is scoped to documentation prose.
- **The `kuberay` repo is out of scope.** Its authored prose has a
handful of uses and its `docs/reference/api.md` is generated from Go doc
comments. That's a maintainer call for that repo, and I'll raise it
there separately rather than assume the same decision carries.

## Two fixes on lines this change already rewrites

- `k8s-autoscaler.md` linked to `.../horizontal-Pod-autoscale/`, which
returns **404**. The correct URL is all-lowercase and returns 200. An
earlier Pod-casing sweep appears to have capitalized inside the URL.
- `index.md` described a Ray cluster as "a head node pod and a
collection of worker node pods", stacking both vocabularies in one
phrase. Now "a head Pod and a collection of worker Pods".
- `index.md` also wrote "heterogenous compute nodes" on that same line.
Now "heterogeneous".

## One casing fix folded in

`k8s-ecosystem/kai-scheduler.md` wrote "KAI scheduler deployment" in one
place and "KAI Scheduler" everywhere else. The KubeRay Vale vocabulary
proposed in ray-project#65239 surfaced it, and @win5923 confirmed the two-word
title-case form on that PR. Folded in here rather than opened as a
one-line PR, per the guidance in `AGENTS.md` about standalone trivial
changes.

The other hyphenated spellings in that file stay as they are. They sit
inside links to `NVIDIA/KAI-Scheduler`, the Helm release name, and the
`<KAI_SCHEDULER_VERSION>` placeholder, so none of them are prose.

## Testing

```
pre-commit run --files $(git diff --name-only)
```

Every hook reports "no files to check". Stating that plainly rather than
implying coverage it doesn't give: no pre-commit hook applies to
Markdown or reStructuredText under `doc/source/`, and the `vale` hook is
scoped to `^doc/source/data/.*`, so none of these files are linted in CI
today.

What I verified by hand instead:

- **No residual term.** `grep -rIniE '\bray [*_`]* ?pods?\b' .` over the
whole repo returns only the `python/` code comments listed above as
intentionally out of scope. This includes a markup-split case, "Ray
\*\*Pod quantities\*\*", that a naive search misses.
- **reStructuredText heading integrity.** `gpu.rst` has a section whose
title shortened, so its underline was resized to match. Title and
underline are both 30 characters.
- **No broken anchors.** Four headings changed text. Searched for
inbound references to their generated anchors and found none, and none
carries an explicit MyST anchor.
- **The URL fix.** `curl` returns 404 for the old casing and 200 for the
new one.
- **Config comments included.** `configs/static-ray-cluster.tls.yaml`
carried the term in two YAML comments mirroring `config.md` prose, so
the removal is complete rather than Markdown-only.

Rendering is verified by the Read the Docs preview build on this PR.

No code, no API, no behavior change.

## Not a duplicate

```
gh pr list --repo ray-project/ray --state open --search "Ray Pod"
gh pr list --repo ray-project/ray --state open --search "pod terminology"
```

No open PR proposes this change. ray-project#65239 is the style-guide PR where the
question came up and is the discussion surface for the rule; this PR is
the cleanup and stands on its own against master. Two of my open PRs
touch nearby files: ray-project#65287 rewrites lines in `jax-tpu-profiling.md`,
which this PR doesn't touch, and ray-project#65263 is a draft adding
`scheduling.md`, which introduces one new use of the term that I'll fix
there rather than here.

Per `AGENTS.md`, mechanical cleanups need maintainer coordination.
That's the thread on ray-project#65239 with @win5923, who reviewed and approved the
style-guide change and raised the question this PR answers.

## AI assistance

Written with AI assistance (Claude). I've reviewed every changed line,
generated and inspected the counts myself, and can defend the change end
to end.

---

### Update: four casing defects folded in (f9fc8ea)

Extending the KubeRay Vale vocabulary in ray-project#65239 turned four latent
casing errors into alerts. They belong with the rest of the terminology
cleanup rather than in a PR of their own.

- `configuring-ippr.md`, two uses: "Kubelet" to "kubelet". Kubernetes
writes the component lowercase in prose.
- `rayservice-incremental-upgrade.md`: "Install istio" to "Install
Istio" in a step label, where the word names the project. The lowercase
`istio` elsewhere on that page is correct and stays, since it's a
GatewayClass `metadata.name` and a `controllerName` value rather than
the project name.
- `resource-isolation-with-writable-cgroups.md`: the H1 read "Resource
Isolation with Writable Cgroups on Google Kubernetes Engine (GKE)".
Lowercasing only "Cgroups" would leave a title-case heading with one
lowercase word, so the whole heading moves to sentence case, which the
style guide requires anyway.

**One coupling worth flagging for review.** The explicit MyST label
above that H1 is unchanged, so every `{ref}` to the page still resolves,
and the bare `{ref}` in `cluster/kubernetes/user-guides.md` picks up the
new title automatically. But
`ray-core/resource-isolation-with-cgroupv2.rst` passes custom link text
that mirrored the old title case, so that text moves to sentence case
too. That's the one file this PR touches outside
`doc/source/cluster/kubernetes/`, and it's a one-line consistency fix
caused directly by the heading change.

Verified against the ray-project#65239 ruleset by diffing the alert set for these
files before and after the change: the four alerts clear and no new
alert appears. AI assistance was used for this commit and for that
verification.

### Update: a bad replacement in this PR, plus three defects in the same
files (89b0e49)

**This PR had a bug.** The term replacement turned "KubeRay pods" into
"KubePods" in `tpu.md`: the pattern matched "Ray pods" inside "KubeRay
pods" and left the "Kube" prefix glued to the replacement. `git log -S`
traces it to the retirement commit, so it isn't pre-existing. It's now
"Pods", which is what the rule asks for when the qualifier only names
the framework.

I swept every added line in this PR for the same signature, a lowercase
letter glued to "Pod" or "Pods", and this was the only instance. The
other repo-wide matches are Kubernetes event reasons such as
`CreatedHeadPod`, correct as literal strings.

Three more defects, in files this PR already edits:

- `tpu.md`: "GKE nodepool" to "GKE node pool" in prose. The `az aks
nodepool` spelling elsewhere in the docs is a CLI subcommand and stays.
- `prometheus-grafana.md`: "spawned by replicaset controller" to
"spawned by a ReplicaSet controller", fixing the API object casing and a
missing article.
- `rayservice-incremental-upgrade.md`: "utilizing" to "using", "like" to
"such as" for an example, and "(e.g. `istio`)" to "for example `istio`",
plus the imperative in place of "You will need to".

Verified against the ray-project#65239 ruleset with a column-independent diff of
the alert set for these files: five alerts clear, no new finding. The
two passive-voice alerts that change column position are pre-existing
and unchanged in substance.

**Deliberately not in this PR.** These sit in files this PR doesn't
otherwise touch, so folding them in would widen its file scope for
unrelated reasons: "Deepseek" for DeepSeek in
`examples/rayserve-deepseek-example.md` (an H1) and
`serve/llm/architecture/overview.md`; `gsutil` in
`examples/distributed-checkpointing-with-gcsfuse.md`, where `gcloud
storage` supersedes it and swapping a documented command needs someone
who can verify the equivalent invocation; and "nodepool" in the prose of
`user-guides/azure-aks-gpu-cluster.md`.

AI assistance was used for this commit and for the verification above.

### Update: adopt the RayCluster possessive the style guide settled on
(68041df)

ray-project#65239 merged after this PR was written, and the rule it landed is more
specific than the form used here. It says to use the resource name in
the possessive: the operator creates these Pods, sets their
`ownerReferences` to the RayCluster, and labels them `ray.io/cluster`,
so ownership, selection, and lifecycle are facts about the resource
rather than about the Ray cluster it produces. Its worked example is the
exact sentence this PR introduced in six places: "List the RayCluster's
Pods" above `kubectl get pods -l=ray.io/is-ray-node=yes`.

All 16 possessives become "the RayCluster's Pods". Each turns on one of
the three:

- **Selection**, nine uses. Six step comments above label-filtered
`kubectl` commands in `rayservice.md`, `rayservice-quick-start.md`,
`configuring-autoscaling.md`, `label-based-scheduling.md`, and
`rayservice-no-ray-serve-replica.md` (twice); the PodMonitor and the
`kubectl wait -l ray.io/cluster=` in `prometheus-grafana.md`; and the
`podSelector` in `network-policy.md`.
- **Ownership**, four uses. The Pods the RayCluster owns and places in
one PodGroup in `scheduler-plugins.md` (three), and the Pods KubeRay
injects environment variables into in `k8s-events.md`.
- **Membership**, three uses. Which Pods carry the proxy in
`kuberay-serve-high-throughput.md`, and which Pods to `exec` into in
`serve/production-guide/fault-tolerance.md` (twice).

Non-possessive uses of "Ray cluster" are unchanged, since they name the
running thing. Two of them the style guide now carries verbatim as its
own `Use:` examples: "Each Ray cluster consists of a head Pod and a
collection of worker Pods" on the landing page, and "a Ray cluster's
head node is its head Pod" on the getting-started page. That's a check
on the earlier commits rather than a change to them.

One thing left alone. `config.md` reads "manages Pods in order to match
the `RayCluster`'s spec", with the resource name in backticks. The
backticks predate this PR and code-formatting the resource name is a
separate question from the possessive, so it stays as it is.

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Signed-off-by: 400Ping <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
## Description

A documentation style and grammar pass over the JAX TPU profiling user
guide added in ray-project#64735, plus the TPU profiling section that PR added to
`profiling.md`.

ray-project#64735 merged before a docs-team review landed (@rueian had asked for
one on the thread). This follow-up applies [the Ray documentation style
guide](https://docs.ray.io/en/master/ray-contribute/writing-style.html)
to the new page.

The first commit is style and grammar only. The second commit carries
two factual corrections that came out of review on this PR, both
verified against the source and described below.

### Corrections (commit 2)

- **Port discovery.** The page implied that passing a custom port to
`init_jax_profiler()` means you must also pass `port=` to the dashboard
endpoint. `init_jax_profiler()` registers whatever port it binds to
under `jax_profiler_port:<node_id_hex>:<pid>` in the GCS internal KV
store (`python/ray/util/tpu.py`), and the `/worker/jax_profile` handler
reads that key only when the request omits `port=`, returning a 400 when
the lookup is empty
(`python/ray/dashboard/modules/reporter/reporter_head.py`). So `port=`
bypasses the lookup rather than being required for custom ports. The
rewrite also documents `JAX_PROFILER_PORT`, which the same function
reads and which the page didn't mention.
- **Profile plugin name.** `tensorboard-plugin-profile` publishes on
PyPI as the XProf Profiler Plugin
([openxla/xprof](https://github.com/openxla/xprof)), covering TPU, GPU,
and CPU. Dropped the inaccurate "Google TPU" qualifier.

### Style changes (commit 1)

- **Added the required `myst.html_meta` `description` front matter.**
The guide asks for one on every page; the new page had none.
- **Tagged the untagged fence.** The expected `ls` output block had no
language; it's now `text`.
- **Active voice where there's a nameable actor.** "`tensorflow` is
required by the Ray Dashboard `ReporterAgent`" becomes the agent using
it. "The JAX trace file was captured and saved" becomes the profiler
capturing and saving it.
- **Cut filler and hedging.** Dropped "Note that." `ensure X is set to
"1"` becomes `set X to "1"`. "Ensure you have TensorBoard installed"
becomes "Install TensorBoard."
- **`Ray 2.57+` spelled out as `Ray 2.57 or later`**, per the rule
against symbols standing in for words in prose.
- **Consistent product naming.** "the dashboard head," "the dashboard
profiling endpoints," and "the head node dashboard port" now all say
**Ray Dashboard**.
- **Split one long multi-clause sentence** in the
profiler-initialization section, which carried a mid-sentence "which
defaults to port 9999" clause.
- **Added the missing blank line between each H3 and its lead-in
prose.** The H2s in the file already had them.
- **`profiling.md`:** rewrote the new TPU profiling paragraph, which
used the "Ray provides integration for" framing the guide steers away
from.

Four H3 headings changed wording slightly, so their generated anchors
change. The page is a day old and nothing links to those anchors yet.

### Left alone on purpose

The `<UPPER_CASE>` placeholders. The style guide's example uses
lowercase-hyphenated names inside angle brackets, but a survey of
`doc/source` shows uppercase-in-brackets is the established convention
across Ray docs. Not worth churning this page against the rest.

## Questions for the author and reviewers

Two technical points I noticed but didn't touch, since they're outside a
style reviewer's scope:

1. **The `ls` command and its expected output don't line up.** The guide
runs:

   ```bash
kubectl exec -it <TPU_WORKER_POD> -c ray-worker -- ls -la
/tmp/ray/session_latest/logs/profiles
   ```

   and shows the output as:

   ```text
-rw-r--r-- 1 ray users 79526813 Jun 2 15:26
/tmp/ray/session_latest/logs/profiles/plugins/profile/2026_06_02_15_26_15/localhost_9999.xplane.pb
   ```

A plain `ls -la` on that directory would list its immediate children
(`plugins`), not a nested file with its full path. Was the sample output
captured with `ls -laR`, a `find`, or an `ls` against the full nested
path? Happy to send the fix once you confirm which.

2. **`-it` on that `exec` looks unnecessary** for a non-interactive
`ls`. It also fails in contexts without a TTY, such as a CI script.
Worth dropping to just `kubectl exec <TPU_WORKER_POD> -c ray-worker --
ls ...`?

## Not a duplicate

No open PR or issue targets
`doc/source/ray-observability/user-guides/jax-tpu-profiling.md`. Checked
with `gh pr list --repo ray-project/ray --state open --search
"jax-tpu-profiling in:title,body"` and `gh search prs --repo
ray-project/ray --state open "jax tpu profiling"`; both empty. All of
the review feedback on ray-project#64735 (the hardcoded personal paths and registry
names from the Gemini review, @andrewsykim's questions on the custom
image, the sample RayJob, and pod scoping) was addressed by the author
before merge, so nothing here reopens a settled thread.

## Verification

- `vale --config=.vale.ini --output=line
doc/source/ray-observability/user-guides/jax-tpu-profiling.md` — clean
apart from `Google.Acronyms` on "JAX" and the two `Google.Passive` hits
this PR fixes. Advisory only: per `.vale.ini`, Vale is scoped to the Ray
Data docs and the example gallery, so it doesn't gate
`ray-observability`.
- `pre-commit run --files <changed files>` — no hook covers Markdown
under `doc/source/`, so every check reports "no files to check."
- The two corrections in commit 2 were read out of
`python/ray/util/tpu.py` and
`python/ray/dashboard/modules/reporter/reporter_head.py`, and the
plugin's identity from the PyPI metadata for
`tensorboard-plugin-profile`. No behavior claim here comes from the
page's own prose.
- No code changed, so no unit tests apply. The Sphinx build is the real
gate. Relying on the Read the Docs preview build on this PR to confirm
the new front matter parses and the `{ref}` targets still resolve.

AI assistance (Claude Code) was used to draft this change. I reviewed
every changed line and I stand behind it.

---------

Signed-off-by: Douglas Strodtman <[email protected]>
nadongjun pushed a commit to nadongjun/ray that referenced this pull request Oct 6, 2026
…t#65423)

## Why this change

Ray on Kubernetes docs use "Ray Pod" 89 times, and this PR removes the
term. It's the concrete counterpart to the discussion in ray-project#65239, where a
reviewer asked whether the Kubernetes casing rule should capitalize Pod
in "Ray pod". Investigating that question produced a better answer than
either casing.

**A Pod isn't a Ray node, it's a host that contains one.** Kubernetes
defines a Pod as an "application-specific logical host" holding one or
more containers. KubeRay indexes exactly one Ray container per Pod
through `utils.RayContainerIndex`, and routinely places non-Ray
containers alongside it: the autoscaler sidecar, the history-server
collector, the RayJob submitter in `SidecarMode`, and the Fluent Bit
sidecars that `persist-kuberay-custom-resource-logs.md` documents. The
Pod is a strict superset of the Ray node, so naming it after Ray
overstates what it is. It's the same category error as "head node pod",
one level up.

**"Pod" is already taken in these docs, by something that isn't a
Kubernetes object.** A TPU Pod is a group of interconnected TPU chips.
`user-guides/tpu.md` writes "The name of the TPU Pod or slice" and "The
TPU pod type" three lines apart, and
`ray.util.tpu.get_current_pod_name()` is a public API whose docstring
reads "Return the name of the TPU pod that the worker is a part of".
Standardizing on a capitalized `Ray Pod` would put it beside a
capitalized `TPU Pod` on the same pages, distinguished only by the
preceding word.

**The mapping is already documented.** `user-guides/k8s-autoscaler.md`
says "each Ray node is run as a Kubernetes Pod", so two defined terms
already cover what the compound names.

**There was no convention to preserve.** Across the 55 prose lines using
the term, casing split four ways:

| Form | Occurrences |
|---|---|
| Ray Pods | 20 |
| Ray pods | 16 |
| Ray pod | 16 |
| Ray Pod | 15 |

Meanwhile "head Pod" and "worker Pod" already outnumber it 284 to 86
under `doc/source/cluster/kubernetes/`, so the replacement vocabulary is
the one these docs mostly use.

## What changed

83 lines across 31 files. The term becomes "Pod" where context is
unambiguous, which is most of them. Where a bare "Pod" would lose
meaning I used an explicit form instead:

- Headings, which have no surrounding context: "Check logs of the head
and worker Pods", "Verify the Ray cluster's Pods and PodGroup",
"Configuring Kubernetes Pods for TPU usage".
- Pages where other kinds of Pod are in scope: "the Ray cluster's Pods"
in `network-policy.md`, `prometheus-grafana.md`, `k8s-events.md`, and
`scheduler-plugins.md`.
- `rayservice-high-availability.md` listed "Ray Pod: This Pod sends
requests to the RayService". That Pod is a client that isn't part of the
RayCluster, and it's named `ray-pod` in the sample manifest, so it's now
listed by its actual object name.

## What replaces it on the orientation pages

Removing the compound takes away the handle a Ray-first reader was using
for the node-and-Pod relationship, so the relationship now gets stated
where readers form their mental model. It was only in
`user-guides/k8s-autoscaler.md`, whose title begins "(Advanced)", and
absent from `index.md`, `getting-started.md`, and
`user-guides/config.md`.

One sentence each on the two orientation pages:

- `index.md`: "KubeRay runs each Ray node as a Kubernetes Pod, so each
Ray cluster consists of a head Pod and a collection of worker Pods."
- `getting-started.md`: "It runs each Ray node as a Kubernetes Pod, so a
Ray cluster's head node is its head Pod and its worker nodes are its
worker Pods."

`getting-started/raycluster-quick-start.md` is the natural third
location, since line 53 is where the two vocabularies genuinely first
meet for a reader following the quickstart. It's left alone
deliberately: that paragraph writes "pods" lowercase throughout, and
adding a capitalized sentence into it would either read inconsistently
or drag the casing sweep into this PR. It belongs to whoever runs that
pass.

The rules behind both changes are in ray-project#65239, which now carries a "State
the node-to-Pod mapping once, early" section and a "Keep Pods out of
Ray-general pages" section. The second one is why this PR touches
`ray-core/scheduling/placement-group.rst` and
`serve/production-guide/fault-tolerance.md`.

## What this deliberately doesn't touch

- **`Ray head Pod` and `Ray worker Pod` stay.** Those qualify by role,
which is the form these docs already prefer and the one Google's Ray on
GKE docs use. Only the unqualified compound goes.
- **No casing sweep.** Lowercase "head pod" occurrences are left alone.
That's the Vale rule in ray-project#65239, not this PR.
- **`python/` code comments and docstrings keep the term.** About 10
occurrences under `python/ray/autoscaler`, `python/ray/dashboard`, and
the KubeRay tests identify which Pods the operator manages, which is
reasonable for a code comment. This PR is scoped to documentation prose.
- **The `kuberay` repo is out of scope.** Its authored prose has a
handful of uses and its `docs/reference/api.md` is generated from Go doc
comments. That's a maintainer call for that repo, and I'll raise it
there separately rather than assume the same decision carries.

## Two fixes on lines this change already rewrites

- `k8s-autoscaler.md` linked to `.../horizontal-Pod-autoscale/`, which
returns **404**. The correct URL is all-lowercase and returns 200. An
earlier Pod-casing sweep appears to have capitalized inside the URL.
- `index.md` described a Ray cluster as "a head node pod and a
collection of worker node pods", stacking both vocabularies in one
phrase. Now "a head Pod and a collection of worker Pods".
- `index.md` also wrote "heterogenous compute nodes" on that same line.
Now "heterogeneous".

## One casing fix folded in

`k8s-ecosystem/kai-scheduler.md` wrote "KAI scheduler deployment" in one
place and "KAI Scheduler" everywhere else. The KubeRay Vale vocabulary
proposed in ray-project#65239 surfaced it, and @win5923 confirmed the two-word
title-case form on that PR. Folded in here rather than opened as a
one-line PR, per the guidance in `AGENTS.md` about standalone trivial
changes.

The other hyphenated spellings in that file stay as they are. They sit
inside links to `NVIDIA/KAI-Scheduler`, the Helm release name, and the
`<KAI_SCHEDULER_VERSION>` placeholder, so none of them are prose.

## Testing

```
pre-commit run --files $(git diff --name-only)
```

Every hook reports "no files to check". Stating that plainly rather than
implying coverage it doesn't give: no pre-commit hook applies to
Markdown or reStructuredText under `doc/source/`, and the `vale` hook is
scoped to `^doc/source/data/.*`, so none of these files are linted in CI
today.

What I verified by hand instead:

- **No residual term.** `grep -rIniE '\bray [*_`]* ?pods?\b' .` over the
whole repo returns only the `python/` code comments listed above as
intentionally out of scope. This includes a markup-split case, "Ray
\*\*Pod quantities\*\*", that a naive search misses.
- **reStructuredText heading integrity.** `gpu.rst` has a section whose
title shortened, so its underline was resized to match. Title and
underline are both 30 characters.
- **No broken anchors.** Four headings changed text. Searched for
inbound references to their generated anchors and found none, and none
carries an explicit MyST anchor.
- **The URL fix.** `curl` returns 404 for the old casing and 200 for the
new one.
- **Config comments included.** `configs/static-ray-cluster.tls.yaml`
carried the term in two YAML comments mirroring `config.md` prose, so
the removal is complete rather than Markdown-only.

Rendering is verified by the Read the Docs preview build on this PR.

No code, no API, no behavior change.

## Not a duplicate

```
gh pr list --repo ray-project/ray --state open --search "Ray Pod"
gh pr list --repo ray-project/ray --state open --search "pod terminology"
```

No open PR proposes this change. ray-project#65239 is the style-guide PR where the
question came up and is the discussion surface for the rule; this PR is
the cleanup and stands on its own against master. Two of my open PRs
touch nearby files: ray-project#65287 rewrites lines in `jax-tpu-profiling.md`,
which this PR doesn't touch, and ray-project#65263 is a draft adding
`scheduling.md`, which introduces one new use of the term that I'll fix
there rather than here.

Per `AGENTS.md`, mechanical cleanups need maintainer coordination.
That's the thread on ray-project#65239 with @win5923, who reviewed and approved the
style-guide change and raised the question this PR answers.

## AI assistance

Written with AI assistance (Claude). I've reviewed every changed line,
generated and inspected the counts myself, and can defend the change end
to end.




---

### Update: four casing defects folded in (f9fc8ea)

Extending the KubeRay Vale vocabulary in ray-project#65239 turned four latent
casing errors into alerts. They belong with the rest of the terminology
cleanup rather than in a PR of their own.

- `configuring-ippr.md`, two uses: "Kubelet" to "kubelet". Kubernetes
writes the component lowercase in prose.
- `rayservice-incremental-upgrade.md`: "Install istio" to "Install
Istio" in a step label, where the word names the project. The lowercase
`istio` elsewhere on that page is correct and stays, since it's a
GatewayClass `metadata.name` and a `controllerName` value rather than
the project name.
- `resource-isolation-with-writable-cgroups.md`: the H1 read "Resource
Isolation with Writable Cgroups on Google Kubernetes Engine (GKE)".
Lowercasing only "Cgroups" would leave a title-case heading with one
lowercase word, so the whole heading moves to sentence case, which the
style guide requires anyway.

**One coupling worth flagging for review.** The explicit MyST label
above that H1 is unchanged, so every `{ref}` to the page still resolves,
and the bare `{ref}` in `cluster/kubernetes/user-guides.md` picks up the
new title automatically. But
`ray-core/resource-isolation-with-cgroupv2.rst` passes custom link text
that mirrored the old title case, so that text moves to sentence case
too. That's the one file this PR touches outside
`doc/source/cluster/kubernetes/`, and it's a one-line consistency fix
caused directly by the heading change.

Verified against the ray-project#65239 ruleset by diffing the alert set for these
files before and after the change: the four alerts clear and no new
alert appears. AI assistance was used for this commit and for that
verification.


### Update: a bad replacement in this PR, plus three defects in the same
files (89b0e49)

**This PR had a bug.** The term replacement turned "KubeRay pods" into
"KubePods" in `tpu.md`: the pattern matched "Ray pods" inside "KubeRay
pods" and left the "Kube" prefix glued to the replacement. `git log -S`
traces it to the retirement commit, so it isn't pre-existing. It's now
"Pods", which is what the rule asks for when the qualifier only names
the framework.

I swept every added line in this PR for the same signature, a lowercase
letter glued to "Pod" or "Pods", and this was the only instance. The
other repo-wide matches are Kubernetes event reasons such as
`CreatedHeadPod`, correct as literal strings.

Three more defects, in files this PR already edits:

- `tpu.md`: "GKE nodepool" to "GKE node pool" in prose. The `az aks
nodepool` spelling elsewhere in the docs is a CLI subcommand and stays.
- `prometheus-grafana.md`: "spawned by replicaset controller" to
"spawned by a ReplicaSet controller", fixing the API object casing and a
missing article.
- `rayservice-incremental-upgrade.md`: "utilizing" to "using", "like" to
"such as" for an example, and "(e.g. `istio`)" to "for example `istio`",
plus the imperative in place of "You will need to".

Verified against the ray-project#65239 ruleset with a column-independent diff of
the alert set for these files: five alerts clear, no new finding. The
two passive-voice alerts that change column position are pre-existing
and unchanged in substance.

**Deliberately not in this PR.** These sit in files this PR doesn't
otherwise touch, so folding them in would widen its file scope for
unrelated reasons: "Deepseek" for DeepSeek in
`examples/rayserve-deepseek-example.md` (an H1) and
`serve/llm/architecture/overview.md`; `gsutil` in
`examples/distributed-checkpointing-with-gcsfuse.md`, where `gcloud
storage` supersedes it and swapping a documented command needs someone
who can verify the equivalent invocation; and "nodepool" in the prose of
`user-guides/azure-aks-gpu-cluster.md`.

AI assistance was used for this commit and for the verification above.


### Update: adopt the RayCluster possessive the style guide settled on
(68041df)

ray-project#65239 merged after this PR was written, and the rule it landed is more
specific than the form used here. It says to use the resource name in
the possessive: the operator creates these Pods, sets their
`ownerReferences` to the RayCluster, and labels them `ray.io/cluster`,
so ownership, selection, and lifecycle are facts about the resource
rather than about the Ray cluster it produces. Its worked example is the
exact sentence this PR introduced in six places: "List the RayCluster's
Pods" above `kubectl get pods -l=ray.io/is-ray-node=yes`.

All 16 possessives become "the RayCluster's Pods". Each turns on one of
the three:

- **Selection**, nine uses. Six step comments above label-filtered
`kubectl` commands in `rayservice.md`, `rayservice-quick-start.md`,
`configuring-autoscaling.md`, `label-based-scheduling.md`, and
`rayservice-no-ray-serve-replica.md` (twice); the PodMonitor and the
`kubectl wait -l ray.io/cluster=` in `prometheus-grafana.md`; and the
`podSelector` in `network-policy.md`.
- **Ownership**, four uses. The Pods the RayCluster owns and places in
one PodGroup in `scheduler-plugins.md` (three), and the Pods KubeRay
injects environment variables into in `k8s-events.md`.
- **Membership**, three uses. Which Pods carry the proxy in
`kuberay-serve-high-throughput.md`, and which Pods to `exec` into in
`serve/production-guide/fault-tolerance.md` (twice).

Non-possessive uses of "Ray cluster" are unchanged, since they name the
running thing. Two of them the style guide now carries verbatim as its
own `Use:` examples: "Each Ray cluster consists of a head Pod and a
collection of worker Pods" on the landing page, and "a Ray cluster's
head node is its head Pod" on the getting-started page. That's a check
on the earlier commits rather than a change to them.

One thing left alone. `config.md` reads "manages Pods in order to match
the `RayCluster`'s spec", with the resource name in backticks. The
backticks predate this PR and code-formatting the resource name is a
separate question from the possessive, so it stays as it is.

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

core Issues that should be addressed in Ray Core docs An issue or change related to documentation docs-go RtD-only checks for docs-only changes. Doesn't run full library doc-test suites. go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants