Skip to content

[doc] Convert ray-contribute stability, whitepaper, and profiling guides to MyST#64111

Open
dstrodtman wants to merge 1 commit into
ray-project:masterfrom
dstrodtman:djs-260615-raycontrib-md-tierB
Open

[doc] Convert ray-contribute stability, whitepaper, and profiling guides to MyST#64111
dstrodtman wants to merge 1 commit into
ray-project:masterfrom
dstrodtman:djs-260615-raycontrib-md-tierB

Conversation

@dstrodtman

Copy link
Copy Markdown
Contributor

Description

Convert three contributor-facing Developer Guides reference pages in doc/source/ray-contribute/ from reStructuredText to MyST Markdown, matching the conventions already used by docs.md and agent-development.md. Continues the in-progress migration of the section to MyST (the declared standard for new pages).

Pages converted:

  • stability
  • whitepaper
  • profiling

Faithful format conversion only — no content restructuring. Heading hierarchy is preserved exactly, including Docstrings remaining an h3 under Stable (unchanged from master). The three .. autofunction:: directives in stability are wrapped in {eval-rst}, with their .. _*-api-def: labels kept inline so the targets stay globally referenceable.

Cross-reference labels preserved exactly (these have external callers — observability docs, python/ray/util/annotations.py, ray-oom-prevention, etc.): api-stability, api-stability-alpha, api-stability-beta, api-stability-stable, public-api-def, developer-api-def, deprecated-api-def, whitepaper, ray-core-internal-profiling.

Toctree entries are extensionless and unchanged; .html redirect targets in doc/redirects/current.yaml are unaffected (HTML output paths are format-independent).

Related issues

None.

Additional information

Verified the three autofunction targets (PublicAPI, DeveloperAPI, Deprecated in ray.util.annotations) resolve, all 9 labels are preserved, and no bare .md.rst links were introduced. Relying on the Read the Docs PR preview build for the authoritative Sphinx warning check.

…des to MyST

## Why

`doc/.claude/CLAUDE.md` declares MyST Markdown the standard for new doc
pages, and a lint check rejects newly added `.rst`. This continues the
`ray-contribute/` migration with the reference pages that carry
externally-referenced labels and autodoc.

## What

Convert three Developer Guides pages from reStructuredText to MyST
Markdown, matching the conventions in the existing `docs.md` /
`agent-development.md`:

- `stability`
- `whitepaper`
- `profiling`

Faithful format conversion only, no content restructuring — heading
hierarchy is preserved exactly, including `Docstrings` remaining an `h3`
under `Stable` as it renders on master. The three `.. autofunction::`
directives in `stability` are wrapped in `{eval-rst}`, keeping their
`.. _*-api-def:` labels inline so they stay globally referenceable.

All cross-reference labels are preserved exactly: `api-stability`,
`api-stability-alpha`, `api-stability-beta`, `api-stability-stable`,
`public-api-def`, `developer-api-def`, `deprecated-api-def`, `whitepaper`,
and `ray-core-internal-profiling`. These are referenced from observability
docs, `python/ray/util/annotations.py`, `ray-oom-prevention`, and others.
Toctree entries are extensionless and unchanged; `.html` redirect targets
in `doc/redirects/current.yaml` are unaffected.

Signed-off-by: Douglas Strodtman <douglas@anyscale.com>
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@dstrodtman dstrodtman requested a review from a team as a code owner June 15, 2026 19:29

@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 converts several developer documentation files (profiling, stability, and whitepaper) from reStructuredText (.rst) to MyST Markdown (.md) format. The review feedback highlights opportunities to improve the profiling guide by correcting the relative path to the raylet binary, replacing the undefined $PATH_TO_OUTPUT_DIR environment variable with a robust /tmp default to prevent permission errors, and ensuring subsequent commands consistently reference these updated paths.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.


```bash
# Use the appropriate path.
RAYLET=ray/python/ray/core/src/ray/raylet/raylet

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 python directory is located at the root of the Ray repository (i.e., python/ray/...). Using ray/python/... as the path will fail if run from the repository root. Let's update this to the correct relative path.

Suggested change
RAYLET=ray/python/ray/core/src/ray/raylet/raylet
RAYLET=python/ray/core/src/ray/raylet/raylet

Comment on lines +112 to +115
RAY_JEMALLOC_CONF=prof:true,lg_prof_interval:33,lg_prof_sample:17,prof_final:true,prof_leak:true,prof_prefix:$PATH_TO_OUTPUT_DIR/jeprof.out \
RAY_JEMALLOC_LIB_PATH=$JEMALLOC_DIR/lib/libjemalloc.so \
RAY_JEMALLOC_PROFILE=gcs_server \
ray start --head

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

Using an undefined environment variable $PATH_TO_OUTPUT_DIR in the prof_prefix configuration will default to writing directly to the root directory (/jeprof.out), which typically fails with a 'Permission denied' error for non-root users. Using /tmp/jeprof.out is a safer and more robust default that works out of the box.

Suggested change
RAY_JEMALLOC_CONF=prof:true,lg_prof_interval:33,lg_prof_sample:17,prof_final:true,prof_leak:true,prof_prefix:$PATH_TO_OUTPUT_DIR/jeprof.out \
RAY_JEMALLOC_LIB_PATH=$JEMALLOC_DIR/lib/libjemalloc.so \
RAY_JEMALLOC_PROFILE=gcs_server \
ray start --head
RAY_JEMALLOC_CONF=prof:true,lg_prof_interval:33,lg_prof_sample:17,prof_final:true,prof_leak:true,prof_prefix=/tmp/jeprof.out \
RAY_JEMALLOC_LIB_PATH=$JEMALLOC_DIR/lib/libjemalloc.so \
RAY_JEMALLOC_PROFILE=gcs_server \
ray start --head


# Check the output files. You should see files with the format of "jeprof.<pid>.0.f.heap".
# Example: jeprof.out.1904189.0.f.heap
ls $PATH_TO_OUTPUT_DIR/

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

Update the directory listing command to match the /tmp output directory suggestion.

Suggested change
ls $PATH_TO_OUTPUT_DIR/
ls /tmp/


# Use jeprof to view the profile data. The first argument is the binary of GCS server.
# Note that you can also use `--pdf` or `--svg` to generate different formats of the profile data.
jeprof --text $YOUR_RAY_SRC_DIR/python/ray/core/src/ray/gcs/gcs_server $PATH_TO_OUTPUT_DIR/jeprof.out.1904189.0.f.heap

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

Simplify the jeprof command by using the relative path from the repository root and the /tmp output directory, avoiding the need for undefined environment variables.

Suggested change
jeprof --text $YOUR_RAY_SRC_DIR/python/ray/core/src/ray/gcs/gcs_server $PATH_TO_OUTPUT_DIR/jeprof.out.1904189.0.f.heap
jeprof --text python/ray/core/src/ray/gcs/gcs_server /tmp/jeprof.out.1904189.0.f.heap

@edoakes edoakes added the go add ONLY when ready to merge, run all tests label Jun 15, 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 Jun 15, 2026
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 go add ONLY when ready to merge, run all tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants