Fix the PPO example docstrings to name the arguments the constructors take - #21887
Open
darkdi wants to merge 1 commit into
Open
Fix the PPO example docstrings to name the arguments the constructors take#21887darkdi wants to merge 1 commit into
darkdi wants to merge 1 commit into
Conversation
darkdi
requested review from
ethanwharris,
justusschock and
tchaton
as code owners
August 6, 2026 01:49
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.
What does this PR do?
The two policy-network constructors in the PPO domain template document arguments they do not take. Both say:
but
ActorCategorical.__init__takes onlyactor_net, andActorContinuous.__init__takesactor_netandact_dim. The entries are left over from a version that built the network inside the constructor —ExperienceSourceDatasetabove them still takes the network from the caller.This is a template people copy, so the wrong names travel. Replaced the four entries with the arguments that are actually there. Docstrings only; nothing else in the file changes.
One related thing I left alone:
LambdaCallbackdocuments**kwargs, while its__init__spells out every hook explicitly and has no**kwargs. Strictly it is the same defect, but the honest fix would mean listing fifty keyword arguments or rewording the entry, and that is your call rather than mine.Before submitting
ruff checkandruff format --checkpass on the file with the pinnedruff==0.15.9PR review
Anyone in the community is welcome to review the PR.