Skip to content

[doc][train] Drop stale RAY_TRAIN_V2_ENABLED=1 instructions - #67510

Merged
dstrodtman merged 1 commit into
ray-project:masterfrom
marwan116:docs/train-v2-default-env-var
Oct 28, 2026
Merged

dstrodtman merged 1 commit into
ray-project:masterfrom
marwan116:docs/train-v2-default-env-var

Conversation

@marwan116

Copy link
Copy Markdown
Contributor

Problem

  • Ray Train V2 has been the default since Ray 2.51: is_v2_enabled() defaults to True.
  • A few Train docs on master still tell readers to set RAY_TRAIN_V2_ENABLED=1.
  • The rendered report-callback snippet on the monitoring page asserts that the variable equals "1". If you copy it as-is, it raises KeyError.

Change

  • local-mode.md: drop RAY_TRAIN_V2_ENABLED=1 from the two multi-node torchrun commands. The single-node command on the same page already has none.
  • deprecated.rst: say that V2 is the default since 2.51, and point to RAY_TRAIN_V2_ENABLED=0 for the deprecated V1 API.
  • doc_code/{fault_tolerance,metric_logging,train_tune_interop}.py: remove the lines that set or assert the variable.
RAY_TRAIN_V2_ENABLED=1 torchrun ...    ->  torchrun ...
"can be enabled by setting =1"         ->  "the default starting in Ray 2.51;
                                             for V1, set =0"
os.environ[...] = "1" / assert == "1"  ->  removed

Decisions to confirm

Related: follows #66895. The FSDP2 example page and several other templates come from anyscale/templates and still set the flag. They are not part of this PR.

Tested: metric_logging.py and train_tune_interop.py run cleanly with the variable unset. In fault_tolerance.py every section runs up to the relax_collectives_on_preemption block, which needs master (#66225); the test venv had Ray 2.59.

🤖 Generated with Claude Code

Problem:
- Ray Train V2 is the default since Ray 2.51.
- Some Train docs still tell readers to set RAY_TRAIN_V2_ENABLED=1.
- The rendered report-callback snippet on the monitoring page asserts
  that the variable equals "1". Copied as-is, it raises KeyError.

Change:
- Drop the variable from the multi-node torchrun commands in the local
  mode guide.
- Say that V2 is the default in the V1 API page note, and point to
  RAY_TRAIN_V2_ENABLED=0 for the deprecated V1 API.
- Remove the lines that set or assert the variable in the
  fault_tolerance, metric_logging and train_tune_interop doc code.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
Signed-off-by: Marwan Sarieddine <[email protected]>
@marwan116
marwan116 requested review from a team as code owners October 28, 2026 14:36

@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 the documentation and example code to reflect that Ray Train V2 is now enabled by default starting in Ray 2.51, removing unnecessary environment variable configurations. Feedback on the changes suggests avoiding contractions like 'It's' in the documentation to maintain a formal tone.

Comment thread doc/source/train/api/deprecated.rst Resolved
@marwan116 marwan116 added docs An issue or change related to documentation train Ray Train Related Issue labels Oct 28, 2026
@dstrodtman dstrodtman added the go add ONLY when ready to merge, run all tests label Oct 28, 2026
@dstrodtman
dstrodtman merged commit 6d8651d into ray-project:master Oct 28, 2026
7 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

docs An issue or change related to documentation go add ONLY when ready to merge, run all tests train Ray Train Related Issue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants