[Refactor] Unify MAPPOLoss + IPPOLoss into MultiPPOLoss with deprecat…#3788
Closed
theap06 wants to merge 1 commit into
Closed
[Refactor] Unify MAPPOLoss + IPPOLoss into MultiPPOLoss with deprecat…#3788theap06 wants to merge 1 commit into
theap06 wants to merge 1 commit into
Conversation
…ion warnings
MAPPOLoss and IPPOLoss are structurally identical — the only difference is
which critic the user passes in. This PR consolidates them into a single
MultiPPOLoss class with a critic_type field ("centralized" | "independent")
that makes the intended algorithm self-documenting without changing any
gradient computation.
MAPPOLoss and IPPOLoss are retained as deprecated aliases (DeprecationWarning
on instantiation) and will be removed in v0.11 per the two-minor-release
deprecation policy.
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/3788
Note: Links to docs will display an error until the docs builds have been completed. ❌ 6 New Failures, 2 Unrelated FailuresAs of commit baeb46f with merge base 68f1ba5 ( NEW FAILURES - The following jobs have failed:
FLAKY - The following job failed but was likely due to flakiness present on trunk:
BROKEN TRUNK - The following job failed but was present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
vmoens
reviewed
May 23, 2026
Collaborator
vmoens
left a comment
There was a problem hiding this comment.
I'm not against having the two loss modules, even if they're (almost) identical. It's clearer from an API perspective. We should not deprecate them
|
|
||
| def __init__(self, *args: Any, **kwargs: Any) -> None: | ||
| warnings.warn( | ||
| "IPPOLoss is deprecated and will be removed in v0.11. " |
Collaborator
There was a problem hiding this comment.
lol the next release is 0.13 ;)
Contributor
Author
I'll close the PR then! |
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.
Addresses the Proposed field in #3748
@matteobettini lmk what you think