Skip to content

[doc][core] Split miscellaneous topics into their own pages - #66851

Draft
dstrodtman wants to merge 4 commits into
doc-1711-core-ia-regroupfrom
doc-1711-core-misc-split
Draft

dstrodtman wants to merge 4 commits into
doc-1711-core-ia-regroupfrom
doc-1711-core-misc-split

Conversation

@dstrodtman

@dstrodtman dstrodtman commented Oct 8, 2026 •

Copy link
Copy Markdown
Contributor

Note

Stacked on #66850. This PR targets that branch, so its diff shows only the split. Merge #66850 first, and GitHub retargets this PR to master.

Why are these changes needed?

core/miscellaneous.md holds four unrelated topics: setting .options() at call time, calling overloaded Java functions, inspecting cluster state, and tuning a cluster of more than 1,000 nodes. A reader looking for any one of them has no way to find it from the nav. #66850 regroups the Ray Core advanced topics, and this PR finishes that work by giving each topic a home next to related pages.

The PR also adds cross-links between two pairs of pages that share a filename and cover related but distinct content, so a reader on one page can find the other.

What changed

miscellaneous.md split

The prose and code of each section move unchanged. The page titles and section headings changed to imperative task headings per the writing-style guide. Each new page also gets its own label and meta description, and the dashboard image path is updated for the new location.

Old section New location
Dynamic remote parameters New page core/tasks/dynamic-options.md, Set remote parameters dynamically, listed in the Tasks toctree
Overloaded functions (Java) New section Call overloaded Java functions at the end of core/cross-language.md
Inspecting cluster state New page core/cluster-state.md, Inspect cluster state, listed in Advanced topics
Running large Ray clusters New page cluster/large-clusters.md, Run large Ray clusters, in the cluster docs' top-level toctree next to configure and head-node-memory-management from #66850
  • large-clusters.md gains one sentence linking to the existing VM guide, Best practices for deploying large clusters (vms-large-cluster). The two pages overlap on ulimit -n. The VM guide doesn't cover the ARP cache or the 2,000-node benchmark. Most of the VM guide isn't VM-specific either, so merging the two into one deployment-agnostic page is a reasonable follow-up. This PR doesn't attempt it.
  • In cluster-state.md, a hidden ray.shutdown() testcode block is removed. It reset state from the earlier sections of the combined page, and as the first block of a standalone page it would reference ray before the import.
  • miscellaneous.md is deleted.

Doctest targets

In doc/BUILD.bazel, the Core doctest_each list drops source/core/miscellaneous.md and adds source/core/cluster-state.md and source/core/tasks/dynamic-options.md, so the moved testcode blocks keep a per-file doctest target. The doc_prose_doctest_targets lint requires every page with a runnable block to be listed.

Cross-links

Pair Relationship
objects/object-spilling.md and internals/object-spilling.md Configuration how-to and internals
tasks/nested-tasks.md and patterns/nested-tasks.md How nesting releases resources, and the divide-and-conquer pattern

Each page in a pair gains one sentence linking to the other. sandboxes.md and api/sandboxes.md already link to each other, as a guide and its API reference.

Redirects

Two page rules send /core/miscellaneous.html and /ray-core/miscellaneous.html to /core/tasks/dynamic-options.html, the page that took the first section. A page redirect can't route by fragment, so links to a later section's anchor land on that page too. No repo content links to miscellaneous.

Verification

  • Full RtD-faithful build. make -C doc rtd-build in a fresh Python 3.11 venv from doc/requirements-doc.lock.txt reports build succeeded. with exit 0, which means zero Sphinx warnings under -W.
  • Redirect validation. rtd-redirects validate doc/redirects/current.yaml reports 0 errors and 0 warnings.
  • Redirect simulation. rtd-redirects simulate with --prefix /core/ --prefix /ray-core/ --git-renames doc/source against master, latest, releases-2.50.0, and releases-2.40.0 reports 0 regressions, 0 wrong landings, and 0 new loops on every version. Both old miscellaneous URLs reach /core/tasks/dynamic-options.html in 1 hop on master.
  • Moved code. The per-file doctest targets for cluster-state.md and dynamic-options.md run each page's testcode blocks in CI. I also extracted each new page's testcode blocks and ran them in order against Ray 2.59.0 from PyPI. All 5 blocks on dynamic-options.md and the 1 block on cluster-state.md pass.

Duplicate check

No open PR touches miscellaneous.md, cross-language.md, or the object-spilling and nested-tasks pages.

AI assistance

I prepared this PR with AI assistance (Claude Code). I reviewed every changed line and ran the verification above.

🤖 Generated with Claude Code

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman added a commit that referenced this pull request Oct 29, 2026
…blocks (#67432)

## Description

Converts the last `>>>` doctest examples on documentation pages, so
`>>>` examples remain only in docstrings and on the two pages that teach
the docstring format. #67429 changes the contributor guidance to match.
This PR is independent of that stack and targets `master`.

Before this PR, seven pages under `doc/source/` had `>>>` prompts. Two
of them teach the docstring format and stay as they are:
`ray-contribute/writing-code-snippets.md` and
`ray-contribute/getting-involved.md`. This PR converts the other five:

| Page | Before | After | Test coverage |
|---|---|---|---|
| `data/working-with-tensors.md` | Three `{doctest}` blocks |
`{testcode}` and `{testoutput}` blocks | Unchanged. The `dtype` and
shape checks still run. The two per-image shapes the doctest skipped are
now a `+MOCK` sample. |
| `ray-references/glossary.md` | One `{doctest}` block with `+SKIP` on
every line | `{testcode}` and `{testoutput}` | Gained. The block used to
run nothing and now runs. The expected output is unchanged, because Ray
produces it exactly. |
| `serve/advanced-guides/multi-app-container.md` | `>>>` prompts in a
`python` fence, with every request skipped | Plain `python` and `text`
blocks | None before or after. The requests need the containerized Serve
apps running. The doctest only ran `import requests` and two string
assignments. |
| `core/tasks/nested-tasks.md` | REPL transcript in a `bash` block |
Plain `python` and `text` blocks | None before or after. The page's
`doc_code/` script is tested. |
| `serve/production-guide/fault-tolerance.md` | Interactive `$ python` /
`>>>` transcripts | Plain `python` blocks, with `text` blocks for output
| None before or after. These steps kill actors on a live cluster. |

### Test wiring

- `doc/BUILD.bazel`:
- Removes the Serve `doctest_each` call. Its only file was
`multi-app-container.md`, which no longer has a runnable example, so the
target would pass without testing anything.
- Drops the comment explaining why `nested-tasks.md` isn't listed, since
the page no longer has anything runnable to explain.
- The glossary and tensors entries stay, because both pages still have
runnable examples.
- `doc/test_prose_doctest_targets.py`: removes `nested-tasks.md` and
`fault-tolerance.md` from `UNTESTED`. Neither page has a runnable
example now. The two docstring-teaching pages stay exempt.

No `.buildkite/test.rules.txt` change. All prose routes to `doc_example`
whether or not a doctest target names the page, and the existing routing
cases for these pages still hold.

This PR edits `doc/BUILD.bazel`, so premerge runs every library's docs
example step. The glossary target is tagged `team:none`, which runs only
post-merge or with `docs-example-test`, so this PR carries that label
too.

## Related issues

Companion to #67429, which reserves `>>>` doctest-style examples for
docstrings in the contributor guide.

## Additional information

### Duplicate check

I searched open PRs for each converted page and for `doctest` in titles.
#66705 edits `fault-tolerance.md` around line 53, far from these hunks.
Draft #66851 appends a line to `nested-tasks.md` after these hunks.
Neither converts these examples. The docstring conversion PRs (#67238,
#66745, #67237) touch `python/`, not pages.

### Testing

I reproduced the CI doctest runner locally: Ray 2.59.0, Python 3.11,
`pytest==7.4.4`, `ray-project/pytest-sphinx@c1ab2b33`, the Ray Data
`doctest_pytest_plugin.py`, and the macro's `--doctest-modules
--doctest-glob='*.md' -c NO_PYTEST_CONFIG` arguments.

- `working-with-tensors.md`: passes before (2 items: the doctest blocks
and the testcode blocks) and after (1 item). A copy with a wrong
expected shape fails with `Expected (32, 28, 99) / Got (32, 28, 28)`, so
the new assertions are live.
- `glossary.md`: before, 1 skipped. After, 1 passed. A copy with a wrong
expected value fails.
- `python doc/test_prose_doctest_targets.py`: "73 listed pages; every
runnable page is accounted for."
- `pre-commit run --files` on the changed files passes, including
buildifier and buildifier-lint.
- `vale` on each changed page: no new alerts compared with `master`.
- After this PR, `git grep -l '^\s*>>> '` over `doc/source/*.md` and
`*.rst` returns only the two pages that teach the docstring format.
- The Read the Docs preview covers rendering.

This PR was prepared with AI assistance (Claude Code). 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]>
@dstrodtman
dstrodtman force-pushed the doc-1711-core-ia-regroup branch from 0ed9efe to 3a8b6b8 Compare October 29, 2026 20:42
@dstrodtman
dstrodtman force-pushed the doc-1711-core-misc-split branch from ced342a to 9efa4b2 Compare October 29, 2026 20:42
dstrodtman and others added 2 commits October 30, 2026 15:43
… doc-1711-core-misc-split

Signed-off-by: Douglas Strodtman <[email protected]>
The runnable examples moved out of miscellaneous.md into cluster-state.md
and tasks/dynamic-options.md, so test those pages instead.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman added a commit that referenced this pull request Nov 2, 2026
#67639)

## Description

Stacked on #67429, which is stacked on #67426.

#67426 tells contributors not to add new notebooks, but other
contributor docs still offer the in-tree notebook flow as a way to
publish a new example. This PR removes those instructions and keeps only
what someone needs to maintain the two notebook examples that remain.

### What this PR changes

- `doc/source/ray-contribute/publishing-examples-legacy.md`: rewrites
the page as "Maintaining an in-tree notebook example." It keeps its file
name and its `publishing-examples-legacy` label, so no redirect is
needed.
- It names the two examples that still use the flow,
`serve/tutorials/video-analysis` and
`train/examples/transformers/transformer-reinforcement-learning`. These
are the only `working_dir: //doc/...` entries in
`release/release_tests.yaml`.
- It drops the steps for publishing a new notebook: setting up a working
directory, the `content/` layout, and wiring a toctree or
`examples.yml`. Neither remaining example uses the `content/` layout.
Each one has `README.ipynb`, a `README.md` copy, and `ci/`, and
`exclude_patterns` in `conf.py` decides which file renders.
- It drops the `orphan: true` advice. `conf.py` sets `orphan` on every
page an `examples.yml` gallery links to through
`collect_example_orphans()`.
- It keeps the cell-tag guidance from #67426, the CI test, the release
test, triggering it, and the pre-merge checks, all reworded for an
existing example. The `tests.sh` sample matches what both examples run.
The trigger example uses the real test name `video_analysis_pipeline`.
- `doc/source/ray-contribute/publishing-examples.md`: replaces "Two ways
to publish an example" with a description of the template-collections
flow. It says not to publish a new example as an in-tree notebook and
links the maintenance page.
- `doc/README.md`: replaces "Adding examples as MyST Markdown Notebooks"
with "Running in-tree notebooks." It says not to add new notebooks,
points to `docs.md`, and keeps the `RUN_NOTEBOOKS` instructions, which
`conf.py` still reads as `nb_execution_mode`. It drops the paragraph
that recommended notebooks for examples and a commented-out link to a
tutorial that no longer exists.
- `doc/source/ray-contribute/writing-code-snippets.md`: "When to use
*literalinclude*" said to use it for "an end-to-end example," which
conflicts with #67426's end-to-end guide, which CI doesn't test. It now
says "a longer example" and links `writing-e2e-guide`.
- `doc/source/core/objects/object-spilling.md`: turns a `{doctest}`
block into a plain `python` block. The block has no `>>>` prompt and no
target, so it ran nothing, and it was the last `{doctest}` block on a
documentation page. #67432 missed it because it searched for `>>>`.

## Related issues

Stacked on #67429 and #67426. Follows #67432, which converted the other
page doctests.

## Additional information

### Duplicate check

I searched open PRs for `publishing-examples-legacy`, `in-tree
notebook`, `RUN_NOTEBOOKS`, `object-spilling`, `writing-code-snippets`,
and changes to `doc/README.md`. No open PR rewrites the legacy page or
the README section. #66851 also edits `object-spilling.md`, and #65868
also edits `writing-code-snippets.md`, in other hunks. `git merge-tree`
reports no conflicts with either.

### Testing

- `pre-commit run --files` on the changed files passes, including the
check that links to files on master resolve.
- `python doc/test_prose_doctest_targets.py` passes: "73 listed pages;
every runnable page is accounted for."
- `rayci test-rules` at v0.51.0, the version `.rayciversion` pins,
passes.
- `vale` on the rewritten pages: no new alerts beyond a passive-voice
flag on an unchanged sentence. The alerts in `doc/README.md` are all on
lines this PR doesn't change.
- The Read the Docs preview covers rendering.

This PR was prepared with AI assistance (Claude Code). 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]>
… doc-1711-core-misc-split

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

Copy link
Copy Markdown

This pull request has been automatically marked as stale because it has not had
any activity for 14 days. It will be closed in another 14 days if no further activity occurs.
Thank you for your contributions.

You can always ask for help on our discussion forum or Ray's public slack channel.

If you'd like to keep this open, just leave any comment, and the stale label will be removed.

@github-actions github-actions Bot added the stale The issue is stale. It will be closed within 7 days unless there are further conversation label Nov 18, 2026

This branch has not been deployed

No deployments
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

stale The issue is stale. It will be closed within 7 days unless there are further conversation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant