-
Notifications
You must be signed in to change notification settings - Fork 422
[BugFix] RSSMRollout not advancing state/belief across time steps in Dreamer #3236
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/3236
Note: Links to docs will display an error until the docs builds have been completed. ❌ 14 New Failures, 1 Cancelled Job, 5 Unrelated FailuresAs of commit 601698f with merge base 8570c25 ( NEW FAILURES - The following jobs have failed:
CANCELLED JOB - The following job was cancelled. Please retry:
BROKEN TRUNK - The following jobs failed but were 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. |
|
Hi @cmdout! Thank you for your pull request and welcome to our community. Action RequiredIn order to merge any pull request (code, docs, etc.), we require contributors to sign our Contributor License Agreement, and we don't seem to have one on file for you. ProcessIn order for us to review and merge your suggested changes, please sign at https://code.facebook.com/cla. If you are contributing on behalf of someone else (eg your employer), the individual CLA may not be sufficient and your employer may need to sign the corporate CLA. Once the CLA is signed, our tooling will perform checks and validations. Afterwards, the pull request will be tagged with If you have received this in error or have any questions, please contact us at [email protected]. Thanks! |
|
Hello @cmdout |
Description
This PR fixes the RSSM rollout state propagation in
RSSMRollout.forward.At each timestep, after computing the prior and posterior, we now:
("next", *)keys to current usingstep_mdp(..., keep_other=True), andConcretely:
step_mdpimport, andstep_mdpinside the time loop before selectingin_keysand updating with the next step’s values.This ensures
("next", "state")and("next", "belief")are correctly advanced tostateandbelieffor the subsequent step.Motivation and Context
Previously, the rollout did not propagate
stateandbelieffrom("next", ...)back to the current keys, causing the loop to reuse stalestate/belief. This broke the intended posterior-to-prior chaining in Dreamer’s RSSM and led to incorrect latent rollouts (and potentially training instability and degraded reconstruction/reward predictions).The fix aligns the implementation with Dreamer’s design and the world model wiring used elsewhere (e.g., in
dreamer_utils._dreamer_make_world_model), where the prior for step t+1 must consume the posterior outputs of step t.If there is an open issue tracking this bug, please link it here.
Example:
close #XXXXTypes of changes
Checklist