Repository navigation
[Docs] Fix broken samples in the RLlib, Tune scheduler and collective guides - #66918
Merged
Merged
Conversation
Signed-off-by: Nagizaaz Shaik <[email protected]>
Contributor
There was a problem hiding this comment.
Code Review
This pull request corrects several outdated import paths in the RLlib documentation, specifically updating imports for PPOConfig, AlgorithmConfig, and TorchRLModule to reflect their correct locations in the codebase. There are no review comments to address, and I have no further feedback to provide.
Signed-off-by: Nagizaaz Shaik <[email protected]>
Contributor
Author
|
Added a second signed-off commit for two more stale names: |
…lers guide Signed-off-by: Nagizaaz Shaik <[email protected]>
pseudo-rnd-thoughts
approved these changes
Oct 12, 2026
pseudo-rnd-thoughts
left a comment
Member
There was a problem hiding this comment.
Thanks for fixing these issues
dstrodtman
approved these changes
Oct 13, 2026
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?
Several doc samples fail when copied because they use names or arguments that don't exist. This PR bundles the fixes:
RLlib import paths
doc/source/rllib/multi-agent-envs.md:from ray.rllib.algorithm.ppo import PPOConfig→ModuleNotFoundError: No module named 'ray.rllib.algorithm'. Nowray.rllib.algorithms.ppo.doc/source/rllib/offline.md(2 samples):from ray.rllib.algorithm_config import AlgorithmConfig→ModuleNotFoundError. Nowray.rllib.algorithms.algorithm_config.doc/source/rllib/rl-modules.md(2 samples):from ray.rllib.core import Columns, TorchRLModule→ImportError: cannot import name 'TorchRLModule'.ray.rllib.coreexportsColumnsbut notTorchRLModule, so the sample now importsTorchRLModulefromray.rllib.core.rl_module.torch.Wrong names
doc/source/rllib/offline.md:Columns.TERMINATED/Columns.TRUNCATED→Columns.TERMINATEDS/Columns.TRUNCATEDS.doc/source/ray-more-libs/ray-collective.md:collective.destroy_group()→collective.destroy_collective_group().Tune scheduler arguments
doc/source/tune/api/schedulers.rst: thePopulationBasedTrainingReplaysample passesexperiment_dir=andtrial_id=, but the constructor is__init__(self, policy_file: str), so it raisesTypeError: PopulationBasedTrainingReplay.__init__() got an unexpected keyword argument 'experiment_dir'. The sample now passespolicy_file=with thepbt_policy_<trial id>.txtnaming from the class docstring, and the sentence above it describes that argument.Related issue number
None.
Checks
git commit -s) in this PR.scripts/format.shto lint the changes in this PR. (Docs-only change; no Python files touched.)AI assistance
AI assistance was used to find and prepare these fixes.
Not a duplicate: searched open PRs with
gh pr list --repo ray-project/ray --state open --search "<terms>"forPopulationBasedTrainingReplay,schedulers.rst policy_file,rllib docs import pathsandray-collective destroy_collective_group. The only hits were this PR and #66654, which is an unrelated Ray Data change. There is no linked issue.Tests run and results:
pip install "ray[rllib]": each original import line raises the error quoted above and each corrected line imports.pip install "ray[tune]"(ray 2.59.0):PopulationBasedTrainingReplay(experiment_dir=..., trial_id=...)raises theTypeErrorabove;PopulationBasedTrainingReplay(policy_file=<path to a one-row policy file>)constructs. The signature inpython/ray/tune/schedulers/pbt.pyonmasteris__init__(self, policy_file: str).Docs-only change.