Skip to content

[doc] Repoint ASHA Tune example links to README (fixes docs build) - #64630

Merged
elliot-barn merged 3 commits into
ray-project:masterfrom
dstrodtman:fix-tune-asha-readme-ref
Jul 9, 2026
Merged

elliot-barn merged 3 commits into
ray-project:masterfrom
dstrodtman:fix-tune-asha-readme-ref

Conversation

@dstrodtman

Copy link
Copy Markdown
Contributor

Why

The master docs build is currently failing on the ASHA Tune example:

doc/source/tune/examples/index.rst:25: WARNING: toctree contains reference to
  nonexisting document '_collections/tune/examples/tune_pytorch_asha/tune_pytorch_asha'
doc/source/tune/examples/index.rst:48: WARNING: unknown document: ...
doc/source/tune/examples/tune-pytorch-cifar.ipynb: WARNING: unknown document: ...

The ASHA example is pulled at build time via sphinx-collections (see doc/source/conf.py). Its published notebook was renamed to README.ipynb, matching the convention every other fetched example already uses, so the canonical document is now .../tune_pytorch_asha/README. The published archive no longer contains a tune_pytorch_asha document, so under fail_on_warning these three stale references break the build. conf.py was already updated to exclude the new README.md sidecar, but the canonical links were missed.

What

Repoint the three remaining references from .../tune_pytorch_asha/tune_pytorch_asha to .../tune_pytorch_asha/README, matching how the other fetched examples (deepspeed_finetune/README, distributing-pytorch/README, multi_agent_a2a/README, ...) are linked:

  • doc/source/tune/examples/index.rst — toctree entry and the :doc: list-table row
  • doc/source/tune/examples/tune-pytorch-cifar.ipynb — the {doc} link in the "See More PyTorch Examples" cell

Verification

  • Repo-wide grep confirms no tune_pytorch_asha/tune_pytorch_asha references remain.
  • Confirmed the published example archive contains README.ipynb (which builds to the .../README document the new links target); the notebook edit was applied surgically and re-validated as JSON.
  • The RtD PR preview will confirm the full build resolves.

The ASHA Tune example is fetched at build time via sphinx-collections.
Its published notebook was renamed to README.ipynb to match the
convention every other fetched example uses, so the canonical document
is now .../tune_pytorch_asha/README and the old .../tune_pytorch_asha
document no longer exists. Three references still pointed at the old
name and fail the build under fail_on_warning (toctree entry, a :doc:
list-table row, and a {doc} link in tune-pytorch-cifar.ipynb). Repoint
them to README, matching the other fetched examples.

Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman requested review from a team as code owners July 9, 2026 15:42

@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 updates documentation references in index.rst and tune-pytorch-cifar.ipynb to point to the README file instead of tune_pytorch_asha under the tune_pytorch_asha examples directory. There are no review comments, so I have no feedback to provide.

@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Jul 9, 2026
README.ipynb is globally excluded for every fetched template, so
README.md is each template's canonical page. A stale exclude_patterns
entry also dropped tune_pytorch_asha/README.md — left over from when the
canonical page was tune_pytorch_asha.ipynb and README.md was an orphan
sidecar. With both the .ipynb (global) and the .md (this entry) excluded,
the asha template had no README document at all, so the toctree/:doc:
references repointed to README in the previous commit still resolved to
a nonexisting document and failed the build. Remove the entry so
README.md builds, matching every other linked template.

Signed-off-by: Douglas Strodtman <[email protected]>
@dstrodtman
dstrodtman requested a review from a team as a code owner July 9, 2026 16:07
The source-read hook that retags notebook-derived python code blocks
containing Jupyter magics/shell escapes (!.. / %..) only matched blocks
whose magic was on the first line (after optional comments). A cell that
runs some Python and then shells out (e.g. imports + os.environ, then
!uv pip install) kept the python tag, so Pygments failed to lex it and
the build failed under -W. This surfaced once the ASHA example's README
became reachable. Generalize the hook to retag any _collections python
fence whose body contains a magic line anywhere. Verified the offending
block lexes clean as ipython3 and no magic-free block is retagged.

Signed-off-by: Douglas Strodtman <[email protected]>
@elliot-barn
elliot-barn merged commit 34f0c57 into ray-project:master Jul 9, 2026
3 checks passed
elliot-barn added a commit that referenced this pull request Jul 15, 2026
…64630) (cherry-pick 2.56.1) (#64761)

Cherry-pick of #64630 onto `releases/2.56.1` to fix the failing
ReadTheDocs build on the 2.56.1 release line.

Original PR: #64630

## Why
The docs build on `releases/2.56.1` fails under `fail_on_warning` (-W)
with 3 warnings, all from stale references to a renamed
sphinx-collections example:
```
tune/examples/index.rst:25: WARNING: toctree contains reference to nonexisting document
  '_collections/tune/examples/tune_pytorch_asha/tune_pytorch_asha'
tune/examples/index.rst:48: WARNING: unknown document: '.../tune_pytorch_asha/tune_pytorch_asha'
tune-pytorch-cifar.ipynb: WARNING: unknown document: '.../tune_pytorch_asha/tune_pytorch_asha'
```
The ASHA example is pulled at build time via `sphinx-collections`; its
published notebook was renamed to `README.ipynb`, so the canonical
document is now `.../tune_pytorch_asha/README`. The old
`tune_pytorch_asha` document no longer exists in the published archive.

## What
- `conf.py`: remove the now-wrong
`_collections/tune/examples/tune_pytorch_asha/README.md` exclusion (that
exclusion was deleting the canonical README page).
- `tune/examples/index.rst`: repoint the toctree entry and the `:doc:`
list-table row to `.../tune_pytorch_asha/README`.
- `tune/examples/tune-pytorch-cifar.ipynb`: repoint the `{doc}` link in
the "See More PyTorch Examples" cell.

Clean cherry-pick (no conflicts). Verified no
`tune_pytorch_asha/tune_pytorch_asha` references remain.

## Note
This is a pre-existing docs-build breakage on the release branch
(independent of any code cherry-picks). Once merged, in-flight 2.56.1
cherry-pick PRs (#64757, #64758) can be rebased to get green docs
builds.

---------

Signed-off-by: Douglas Strodtman <[email protected]>
Signed-off-by: elliot-barn <[email protected]>
Co-authored-by: Douglas Strodtman <[email protected]>
Co-authored-by: Claude Opus 4.8 (1M context) <[email protected]>
400Ping pushed a commit to 400Ping/ray that referenced this pull request Aug 18, 2026
…ay-project#64630)

## Why

The `master` docs build is currently failing on the ASHA Tune example:

```
doc/source/tune/examples/index.rst:25: WARNING: toctree contains reference to
  nonexisting document '_collections/tune/examples/tune_pytorch_asha/tune_pytorch_asha'
doc/source/tune/examples/index.rst:48: WARNING: unknown document: ...
doc/source/tune/examples/tune-pytorch-cifar.ipynb: WARNING: unknown document: ...
```

The ASHA example is pulled at build time via `sphinx-collections` (see
`doc/source/conf.py`). Its published notebook was renamed to
`README.ipynb`, matching the convention every other fetched example
already uses, so the canonical document is now
`.../tune_pytorch_asha/README`. The published archive no longer contains
a `tune_pytorch_asha` document, so under `fail_on_warning` these three
stale references break the build. `conf.py` was already updated to
exclude the new `README.md` sidecar, but the canonical links were
missed.

## What

Repoint the three remaining references from
`.../tune_pytorch_asha/tune_pytorch_asha` to
`.../tune_pytorch_asha/README`, matching how the other fetched examples
(`deepspeed_finetune/README`, `distributing-pytorch/README`,
`multi_agent_a2a/README`, ...) are linked:

- `doc/source/tune/examples/index.rst` — toctree entry and the `:doc:`
list-table row
- `doc/source/tune/examples/tune-pytorch-cifar.ipynb` — the `{doc}` link
in the "See More PyTorch Examples" cell

## Verification

- Repo-wide grep confirms no `tune_pytorch_asha/tune_pytorch_asha`
references remain.
- Confirmed the published example archive contains `README.ipynb` (which
builds to the `.../README` document the new links target); the notebook
edit was applied surgically and re-validated as JSON.
- The RtD PR preview will confirm the full build resolves.

---------

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

Labels

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