Repository navigation
[Feature] Add TD-MPC2 loss module - #4454
Merged
Merged
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/4454
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (2 Unrelated Failures)As of commit 5842fcf with merge base 8a53f8c ( 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. |
This was referenced Sep 21, 2026
vmoens
approved these changes
Sep 21, 2026
bsprenger
force-pushed
the
feat/tdmpc2-loss
branch
from
September 22, 2026 01:19
95b631c to
ea03d66
Compare
bsprenger
force-pushed
the
feat/tdmpc2-loss
branch
from
September 22, 2026 05:57
ea03d66 to
519fc24
Compare
bsprenger
force-pushed
the
feat/tdmpc2-loss
branch
3 times, most recently
from
September 22, 2026 07:42
70c266d to
02e9c83
Compare
theap06
reviewed
Sep 24, 2026
theap06
left a comment
Collaborator
There was a problem hiding this comment.
Overall looks pretty good. Just one nitpick: could you add a test case in tdmpc2 that checks via public api as the current tests cover shapes and the private methods?
bsprenger
force-pushed
the
feat/tdmpc2-loss
branch
from
September 29, 2026 18:51
02e9c83 to
5842fcf
Compare
Collaborator
Author
|
Updated to test the public API for model_loss and actor_loss_from_latents. Thanks for the feedback! |
theap06
approved these changes
Sep 29, 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.
Description
Note
This PR stacks on #4453 . I cannot find a good way to compare the diff against that base, since it is in my own fork.
Once it is merged, I will re-target this one to make the diff easier to read.
This PR introduces the core loss objective for the TD-MPC2 algorithm, porting over the logic into the trainer framework.
Motivation and Context
5th PR in the chain to address #4448 . The design of the loss is is described in depth in the original paper and associated implementation.
Types of changes
What types of changes does your code introduce? Remove all that do not apply:
Checklist
Go over all the following points, and put an
xin all the boxes that apply.If you are unsure about any of these, don't hesitate to ask. We are here to help!