Repository navigation
[doc][train] Unpublish five outdated Train examples with temporary redirects - #66893
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Code Review
This pull request removes several outdated or legacy training examples, including GPT-J-6B DeepSpeed fine-tuning, Dolly-v2-7b FSDP fine-tuning, and Vicuna-13b DeepSpeed fine-tuning, along with their associated notebooks, configuration files, release tests, and documentation references. It also configures temporary redirects for these removed examples to point to their modern equivalents or general landing pages. I have no feedback to provide.
This was referenced Oct 9, 2026
matthewdeng
approved these changes
Oct 9, 2026
dstrodtman
force-pushed
the
doc-1803-unpublish-train-examples
branch
from
October 9, 2026 19:06
56bef34 to
481f68a
Compare
…directs Unpublish Train examples that are out of date and waiting on a replacement or a rebuild, and send their URLs to the closest current page in the meantime. - Delete the object detection, dolly-v2 FSDP, vicuna-13b DeepSpeed, and GPT-J DeepSpeed notebooks, and remove the Llama-2 template card. - Exclude the DreamBooth page from the build. Its code under doc/source/templates/05_dreambooth_finetuning and its two release tests stay so it can be rebuilt and republished. - Redirect each old URL, underscore and hyphenated, to the nearest current example or the gallery. Each rule carries a "Temporary" description so it can be found and repointed when the replacement ships. - Remove the three manual release tests that only ran the deleted notebooks, with their working directories and BYOD setup scripts. - Repoint or drop the inbound links from use-cases, the DeepSpeed and Accelerate guides, and the Tune Lightning example. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
Removing torch-detection.ipynb leaves only pytorch-resnet-finetune.ipynb, which this target excludes because //doc:pytorch_resnet_finetune already tests it. The empty glob fails package loading, so drop the target. Both filegroups stay; other packages still reference them. Co-Authored-By: Claude Opus 5.5 <[email protected]> Signed-off-by: Douglas Strodtman <[email protected]>
dstrodtman
force-pushed
the
doc-1803-unpublish-train-examples
branch
from
October 13, 2026 13:15
d47b1b1 to
05eee5c
Compare
dstrodtman
added a commit
that referenced
this pull request
Oct 13, 2026
#66894) ## Why are these changes needed? The Ray Train style-pass PRs, #66886, #66887, and #66888, flagged pre-existing problems in the pages they edited and left them as written, because a style pass shouldn't change claims. This PR fixes the ones that don't change a technical claim. Each fix is settled by the page itself, its own code sample, or its own tables. **Stacked on #66886, #66887, and #66888.** Those three PRs are siblings on `doc-1549-train-vale-style`, #66885's branch, so this PR targets that branch and starts from a merge of all three. Until they merge, the diff here includes their changes. Review only the three commits after the merge commit: - `ea20d30` getting-started guides - `af794c9` overview, framework, and example pages - `67b7b59` user guides Once the style PRs land, I'll rebase onto `master` and retarget there. ### Getting-started guides - Eight numbered lists describe components, parameters, or what a function does, not steps. They're now bullets, as the bot review on #66886 suggested: the three-component lists in the PyTorch, JAX, LightGBM, Transformers, and XGBoost guides, the `prepare_model` and `prepare_data_loader` lists, and the LightGBM `ScalingConfig` parameters. The intro lists that run from "Configure..." to "Launch..." are real sequences and stay numbered. - `getting-started-jax.md`: "PodSlices" is "Pod slices", Google's spelling, in the body and the front-matter description. ### Overview, framework, and example pages - `benchmarks.md`: "perform similarly (within 2.5%)" and "(within 1%)" are false as two-sided bounds. The page's own tables show a 9.5% gap in the PyTorch 16-worker CPU row and 4.3% in the TensorFlow one, both with Ray Train faster. The sentences now say what the tables show: Ray Train is at most 2.5% (PyTorch) and 1% (TensorFlow) slower, and faster in the CPU rows named. - `distributed-tensorflow-keras.md`: "saving model weights but not models" contradicts the sample, which calls `model.save(... "model.keras")` and stores the epoch. The load sample calls `json.dump` without importing `json`, which fails when a reader copies the block alone. - `deepspeed.md`: the `:skipif: True` skeleton used `tokenized_datasets`, `collate_fn`, `num_epochs`, `loss`, and `ray` without defining or importing them, while it defined `train_dataset` and never used it. It now passes `train_dataset` and declares the placeholders the same way it already declares `model = ...`. The runnable versions are literal-included from tested files in `python/ray/train/examples/deepspeed/`. - `examples/lightning/lightning-cola-advanced.ipynb`: "this examples uses" typo, flagged on #66883. The matching "with with" typo in the vicuna notebook isn't fixed here, because #66892 deletes that notebook. ### User guides - `persistent-storage.md`: "In the preceding example, the training loop saves some artifacts to the worker's current working directory." No preceding example does that. - `hyperparameter-optimization.md`: "The next section on fault tolerance describes this further." The next section doesn't cover driver snapshots. The link now points to the driver fault tolerance section of the fault tolerance guide, which does. - `local-mode.md`: the prose said to change only `num_workers`, but the sample's diff also sets `use_gpu=True`. "Master node" stays: the section runs `torchrun` without a Ray cluster, so "head node" would mislead. - `using-accelerators.md`: `get_device` returns one device. - `data-loading-preprocessing.md`: "Ray Data splits all datasets" becomes "Ray Train splits", matching the same page's own statement that Ray Train splits all datasets with `Dataset.streaming_split` by default. Two code comments change to match. Corrections that need Ray Train engineering to confirm are in #66895, stacked on this one. ## Related issue number None. Not a duplicate: I searched open PRs touching `doc/source/train/`. The open PRs there are this stack (#66883, #66885, #66886, #66887, #66888) and the example cleanups (#66892, #66893), which don't touch these lines. ## Checks - Docs-only. The code edits are in a `:skipif: True` skeleton, an untested sample block, and code comments. - `vale` on the changed files from the repo root: alerts only removed, none added. - `codespell` on the changed files: clean. - `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check` on the changed files: clean. - The notebook still parses as JSON. - Full `-W` doc build: relying on the Read the Docs preview. AI assistance (Claude Code) was used to research and draft these edits. Draft until the submitter has 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]>
elliot-barn
approved these changes
Oct 13, 2026
dstrodtman
added a commit
that referenced
this pull request
Oct 13, 2026
…#66895) ## Why are these changes needed? The Ray Train style-pass PRs, #66886, #66887, and #66888, flagged pre-existing claims that looked inconsistent with the source and kept them as written. This PR corrects the ones that current source settles. Each claim was already in the docs before the style pass, so none of them is drift that the style pass introduced. It's stacked on #66894, the mechanical fixes for the same pages, which builds on the three style PRs. The diff against #66894's branch is one commit, `6c6db91`. **For Ray Train reviewers:** these corrections change what the docs say, so please confirm them. Each item cites the source it rests on. Items marked **confirm** carry a specific point to check. ### Getting-started guides - `getting-started-jax.md`: "By default, this configuration requests one GPU per worker." `use_gpu` defaults to `False` (`python/ray/train/v2/api/config.py`). One GPU per worker is what `use_gpu=True` gives you when `resources_per_worker` isn't set (`_resources_per_worker_not_none` in `python/ray/air/config.py`). - `getting-started-transformers.md`: `prepare_trainer` doesn't validate configurations (`python/ray/train/huggingface/transformers/_transformers_utils.py`). It swaps in Ray Data-aware dataloaders and records a usage tag, so "validate its configurations" goes. - `getting-started-pytorch-lightning.md`: the strategy classes accept their base classes' arguments, but the `RayDDPStrategy` docstring says `process_group_backend`, `timeout`, and `start_method` are disabled and belong in `TorchConfig` (`python/ray/train/lightning/_lightning_utils.py`). The sentence now says so. - `getting-started-pytorch-lightning.md`: CI tests `pytorch-lightning==1.8.6` in the Lightning 1.x lane (`python/requirements/ml/lightning1.txt`, `.buildkite/ml.rayci.yml`) and `2.6.1` in the main ML lanes (`python/requirements_compiled.txt`). Nothing installs 1.6.5 or 2.1.2. The minimum, `>=1.6.5`, stays as written. Whether to raise it is a separate question for the Train team. ### User guides - `checkpoints.md`: Python, not Ray Train, deletes a `tempfile.TemporaryDirectory` when its `with` block exits, which can happen before an async upload finishes. Ray Train deletes the local directory only after the upload, when `delete_local_checkpoint_after_upload` is set (`_upload_checkpoint` in `python/ray/train/v2/_internal/execution/context.py`). The sentence names the right actor and points out that the page's sample uses `tempfile.mkdtemp`. - `fault-tolerance.md`, `hyperparameter-optimization.md`, and `api/api.md`: Ray Train V2 is the default starting in Ray 2.51. `is_v2_enabled()` defaults `RAY_TRAIN_V2_ENABLED` to `True` (`python/ray/train/v2/_internal/constants.py`) since #57857, which `ray-2.51.0` contains and `ray-2.50.0` doesn't. The intro notes and the "Enable `RAY_TRAIN_V2_ENABLED=1`" migration steps now scope the variable to Ray 2.43 through 2.50. Whether to drop these notes entirely is a scope decision for the Train team. - `elastic-training.md`: "Without a retry limit, the run exits on the first such failure," where "such failures" includes node preemption. `DefaultFailurePolicy` (`python/ray/train/v2/_internal/execution/failure_handling/default.py`) charges preemptions to `max_preemption_failures`, which defaults to `-1`, unlimited (`FailureConfig` in `python/ray/train/v2/api/config.py`). Other worker failures count against `max_failures`, which defaults to 0. The prose and the sample's comment now say so, and the sample's emphasized line moves down one to stay on `run_config`. **Confirm** node loss: a failure counts as a preemption only when `RayActorError.preempted` is set, which needs drain information, so an unannounced node loss should count against `max_failures`. - `results.md`: "Ray Train stores all training results, including reported metrics" contradicts the note at the top of the same page. In V2, the report handler keeps only reports that carry a checkpoint (`python/ray/train/v2/_internal/execution/checkpoint/report_handler.py`). The sentence now says Ray Train stores checkpoints and the metrics attached to them. - `asynchronous-validation.md`: worker 0's return value is rejected with a `ValueError` if `contains_tensor(result)` is true (`python/ray/train/v2/_internal/execution/worker_group/worker.py`). That check inspects nested containers, so "can't contain" is more accurate than "can't be". "Must be Python-based" overstated it. The sentence now suggests converting with `.item()`, as the page's sample does. ### Framework pages - `huggingface-accelerate.md`: "the plan is to deprecate `AccelerateTrainer` in Ray 2.8" is stale. #40274 deprecated it in 2.8.0, and #41276 removed it in 2.9.0. Whether to keep the migration section at all is a scope decision for the Train team. - `distributed-tensorflow-keras.md`: `train.report` doesn't save checkpoint state "on the trainer, where you ran your Python script". Workers copy checkpoint files to the configured storage path (`persist_current_checkpoint` in `python/ray/train/v2/_internal/execution/storage.py`, called from `_upload_checkpoint`). The sentence now says so and links the persistent storage guide. ## Related issue number None. Not a duplicate: I searched open PRs touching `doc/source/train/`. The open PRs there are this stack and the example cleanups (#66892, #66893), which don't touch these lines. Questions from the style pass that need a Train decision rather than a source check aren't in this PR. Examples are whether Lightning's `AsyncCheckpointIO` is incompatible in every upload mode, whether the PyTorch and TensorFlow parity benchmarks should be rerun or retired, and when to drop the V2 opt-in and `AccelerateTrainer` migration notes. They're tracked separately for Ray Train engineering. ## Checks - Docs-only: every change is in a `.md` file under `doc/source/train/`, so no library tests run. The one sample edit, a code comment in `elastic-training.md`, is in an untested `code-block`. - Every cited claim was checked against the source at this branch's base. - `vale` on the changed files from the repo root: alerts only removed, none added. - `codespell` on the changed files: clean. - `doc/.claude/skills/ray-soft-wrap/scripts/softwrap.py --check` on the changed files: clean. - Full `-W` doc build: relying on the Read the Docs preview. AI assistance (Claude Code) was used to research and draft these edits. Draft until the submitter has reviewed every changed line and a Ray Train reviewer has confirmed the claims. 🤖 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]>
edoakes
pushed a commit
that referenced
this pull request
Oct 15, 2026
## Why are these changes needed? `doc/source/templates/` is the Ray 2.6-era "Ray Starter Templates" directory. The harness that made it a templates mechanism is gone. `exclude_patterns` in `doc/source/conf.py` drops `templates/*` from the Sphinx build, and nothing in it backs a bazel test target. What was left on master: - `01_batch_inference`, `02_many_model_training`, `03_serving_stable_diffusion`, `configs/`, `testing/`, and `README.md` had no references outside the directory. The README documents a contribution workflow whose scripts (`testing/validate.py`, `testing/release/`) no longer exist. - `04_finetuning_llms_with_deepspeed` was referenced only by a doctest exclusion in `doc/BUILD.bazel`. #66893 repointed its last doc links to the `deepspeed_finetune` example. - `05_dreambooth_finetuning` backed `train/examples/pytorch/dreambooth-finetuning.md`, which #66893 unpublished because the example doesn't run on current libraries. It also backed two release tests, `air_example_dreambooth_finetuning` and `air_example_dreambooth_finetuning_lora`, through symlinks in `release/air_examples/dreambooth/`. Both tests are `frequency: manual` and were jailed after failing (#49847, #49846). Its `requirements.txt` pins a July-2023 stack (`torch==2.0.1`, `diffusers==0.19.3`, `transformers==4.30.2`). The DreamBooth example is being rebuilt on current diffusers as a new example, so this PR deletes the old sources rather than moving them. The rebuilt example lands outside `templates/`. ## What this PR changes - Deletes `doc/source/templates/` (69 files). - Deletes the unpublished `doc/source/train/examples/pytorch/dreambooth-finetuning.md` and its `exclude_patterns` entry. The temporary redirects in `doc/redirects/current.yaml` from both old DreamBooth URLs to `/train/examples.html` stay as they are, to be repointed when the rebuilt example ships. - Deletes `release/air_examples/dreambooth/` and the two jailed release tests in `release/release_tests.yaml` (the whole `AIR examples` group, which held only these two). - Removes the dead `templates/*` patterns from `exclude_patterns` and `llms_txt_exclude` in `conf.py`, and the `04` doctest exclusion from `doc/BUILD.bazel`. - `.buildkite/test.rules.txt`: drops `doc/source/templates/05_dreambooth_finetuning/` from the literalinclude-sources rule and `doc/source/templates/` from the skip rule that #65289 added. `_templates/` keeps its skip rule. The comments are updated to match. - `.buildkite/test.rules.test.txt`: drops the `templates/` cases. The assertion that the prose-and-image skip still wins inside a `doc`-routed directory moves from `05` to `cluster/doc_code/`, so that coverage isn't lost. - `.github/CODEOWNERS`: drops `templates` from the catch-all comment's directory list. ## Questions for reviewers - **Release tests (ml team):** this removes `air_example_dreambooth_finetuning` and `air_example_dreambooth_finetuning_lora`. They're manual-only and jailed, and their sources go away with this directory. If you'd rather keep the test definitions as a placeholder for the rebuilt example, say so and I'll restore them. - **External links:** these templates were promoted publicly around Ray 2.6, so blog posts or course material might link to `github.com/ray-project/ray/tree/master/doc/source/templates/...`. This PR is a clean delete. If maintainers would prefer a tombstone `README.md` pointing at the Train examples gallery, I can add one. ## Related PRs Once this merges, the following open Dependabot PRs target manifests that no longer exist and can be closed: #65851, #65850, #64851, #64850, #64002, #64001, #62417, #62418, #56096, #54423, #55301. ## Duplicate check Searched open PRs for `doc/source/templates` and `dreambooth`. The only matches are the Dependabot bumps listed above, #67006 (my own in-tree-links sweep, which deliberately leaves this directory alone), and #66880 (touches `release_tests.yaml` but not the DreamBooth entries). ## Testing - `rayci test-rules` (built from `ray-project/rayci`) against the updated `.buildkite/test.rules.txt` and `test.rules.test.txt`: 177/177 cases pass. Flipping one new case to a wrong expectation makes it fail, confirming the case is live. - `git grep` for `doc/source/templates`, each template directory name, and `air_example_dreambooth` returns no matches outside `_templates/`. - `conf.py` parses, and `release/release_tests.yaml` loads with `yaml.safe_load`. - `pre-commit` passes on the changed files, including buildifier on `doc/BUILD.bazel` and the master-link resolution check. - The docs build runs on this PR's Read the Docs preview. 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]>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why are these changes needed?
A maintainer triage of the Ray Train examples marked five examples as outdated: four LLM and detection notebooks that need a replacement, and the DreamBooth example, which needs a rebuild on current diffusers. This PR takes them off the site and points each URL at the closest current page until the replacement ships.
Stacked on #66892, which is stacked on #66883. Merge those first.
train/examples/...)pytorch/torch-detectionray-overview/examples/object-detection)lightning/dolly-lightning-fsdp-finetuningpytorch-fsdpexamplelightning/vicuna-13b-lightning-deepspeed-finetunedeepspeed_finetuneexampledeepspeed/gptj-deepspeed-fine-tuningdeepspeed_finetuneexamplepytorch/dreambooth-finetuningThe Llama-2 gallery card, which linked to
doc/source/templates/04_finetuning_llms_with_deepspeedon GitHub, is also removed. It has no docs URL to redirect. The template directory itself isn't touched here.What changes
conf.pyadds the page toexclude_patterns, so it stops building while its source, its code undertemplates/05_dreambooth_finetuning/, and its two release tests (air_example_dreambooth_finetuning,air_example_dreambooth_finetuning_lora) stay in place for the rebuild. Republishing means removing the exclusion and the two temporary redirects.ray-overview/use-cases.mdnow links the object detection example. The Tune Lightning example drops its dolly link. The Accelerate guide drops its Llama-2seealso. The DeepSpeed guide's "Run DeepSpeed with Other Frameworks" table listed only the three removed examples, so it becomes a sentence linking the Accelerate, Transformers, and Lightning guides.excludeentries inexamples/lightning/BUILD.bazel, and the GPT-J note inexamples/BUILD.bazel.Release tests (please review, @ray-project/ray-train)
Removes the three manual-frequency release tests that only ran the deleted notebooks, with their
release/air_examples/working directories and BYOD setup scripts:air_example_gptj_deepspeed_fine_tuning(byod_gptj_test.sh)air_example_dolly_v2_lightning_fsdp_finetuning(byod_dolly_test.sh)air_example_vicuna_13b_lightning_deepspeed_finetuning(byod_vicuna_test.sh)No other release test, BUILD file, or CI config references those directories or scripts. Release tests don't run on premerge, so CI can't confirm this part.
Redirects
Each page gets two rules, one for the old underscore slug and one for the hyphenated slug from #66883, both pointing at the final target, so no chain forms. Every one of the 10 rules carries
description: "Temporary: repoint when the replacement or rebuilt example ships", sogrep Temporary doc/redirects/current.yamlfinds them when the new examples land.Verification
rtd-redirects validate doc/redirects/current.yaml: 0 errors, 0 warnings.make -C doc rtd-build(RtD-faithful,-W) on this branch:build succeeded., zero Sphinx warnings.train/examples/pytorch/now emits onlypytorch-resnet-finetune.html, confirming the DreamBooth exclusion.grepoverdoc/source/,release/,.buildkite/,ci/, andpython/ray/train/finds no remaining link to an unpublished page. Remaining hits are the DreamBooth template code and its kept release tests, plus comments in.buildkite/test.rules*.txtthat describe the template directories.pre-commitpasses on the changed files.Not a duplicate. Two older open PRs edit these notebooks: #62580 fixes the dolly and vicuna release-test dependencies, and #63342 swaps dolly for a Pythia example and moves the Train release tests to manual. This PR deletes those notebooks and their tests, so both would need a rebase or would no longer apply. Draft #66880 also edits
release_tests.yaml, but not these three entries.AI assistance (Claude Code) was used to prepare this change. I reviewed every changed line.
Related issue number
N/A
Checks
🤖 Generated with Claude Code