Skip to content

[Feature] Add the DreamerV3 block RSSM core - #4072

Merged
vmoens merged 4 commits into
gh/vmoens/289/basefrom
gh/vmoens/289/head
Aug 12, 2026
Merged

[Feature] Add the DreamerV3 block RSSM core#4072
vmoens merged 4 commits into
gh/vmoens/289/basefrom
gh/vmoens/289/head

Conversation

@vmoens

@vmoens vmoens commented Aug 8, 2026

Copy link
Copy Markdown
Collaborator

Stack from ghstack (oldest at bottom):

Summary:

  • add the grouped block-linear recurrent core used by DreamerV3
  • add RMS-normalized prior and posterior predictor options
  • preserve the existing GRU implementation as the default for checkpoint compatibility

Rationale:
The maintained DreamerV3 implementation used a conventional GRUCell, while the
reference architecture projects deterministic state, stochastic state, and action
separately before applying grouped recurrent gates. Providing the block core as an
explicit mode enables architecture-parity experiments without invalidating existing
TorchRL models.

Test plan:

  • pytest test/modules/test_dreamer_components.py -k DreamerV3Components -q
  • pytest test/objectives/test_dreamer_v3.py -q
  • verify the frozen numerical fixture, normalized-action invariance, gradients,
    RMS-normalized posterior shapes, and torch.compile full-graph execution

[ghstack-poisoned]
@pytorch-bot

pytorch-bot Bot commented Aug 8, 2026

Copy link
Copy Markdown

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/4072

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 1ea75bd with merge base d5a62cb (image):

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.

@vmoens

vmoens commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator Author

Update after the stack-level ghstack rebase: The full eight-PR Dreamer stack was checked out from #4075, rebased onto current origin/main, linted with pre-commit run --all-files, and submitted successfully as vmoens. This PR is now at c58247eb9921. The core Dreamer suites pass (267 tests) and the two doctest modules pass (15 tests); the DMC-only smoke still requires dm_control, which is not installed locally. Any earlier conflict/head-status note below is superseded; the substantive code-review observations remain applicable.

Reviewed current PR head a1dc57e7fd08d6d74867770fa45f0eed334a8a78 and the latest CI/bot report. The requested rebase onto freshly fetched origin/main could not complete: replaying the lower-stack base-update commit 0b8b08d65 conflicts in sota-implementations/dreamer_v3/dreamer_v3.py. I left that rebase in progress and did not force-push.

On the PR-specific diff, I checked the grouped block projections/gating, action normalization, RMS-normalized prior/posterior paths, the frozen numerical fixture, gradients, and full-graph compile coverage. pytest -q test/modules/test_dreamer_components.py -k DreamerV3Components passes (4 passed). I did not find an additional functional issue at this head, but the stack conflict must be resolved before it can be refreshed.

The current source/config CI failure is actionable but outside these two changed files: µfmt wants the SymExpTwoHot import reordered in torchrl/modules/__init__.py; the reported bulk LBFGSConfig parity failures are present on trunk/merge-base.

vmoens added 3 commits August 10, 2026 09:15
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
@vmoens

vmoens commented Aug 11, 2026

Copy link
Copy Markdown
Collaborator Author

Addressed the review pass and resubmitted this commit after rebasing the stack onto current main. No layer-specific code change was needed; block-RSSM validation, dtype preservation, action normalization, and compile coverage are preserved. The full all-files lint suite passes at this PR boundary.

@vmoens
vmoens marked this pull request as ready for review August 12, 2026 08:42
vmoens added a commit that referenced this pull request Aug 12, 2026
Summary:
- add the grouped block-linear recurrent core used by DreamerV3
- add RMS-normalized prior and posterior predictor options
- preserve the existing GRU implementation as the default for checkpoint compatibility

Rationale:
The maintained DreamerV3 implementation used a conventional GRUCell, while the
reference architecture projects deterministic state, stochastic state, and action
separately before applying grouped recurrent gates. Providing the block core as an
explicit mode enables architecture-parity experiments without invalidating existing
TorchRL models.

Test plan:
- pytest test/modules/test_dreamer_components.py -k DreamerV3Components -q
- pytest test/objectives/test_dreamer_v3.py -q
- verify the frozen numerical fixture, normalized-action invariance, gradients,
  RMS-normalized posterior shapes, and torch.compile full-graph execution

ghstack-source-id: 885a253
Pull-Request: #4072
@vmoens
vmoens merged commit 1ea75bd into gh/vmoens/289/base Aug 12, 2026
161 of 220 checks passed
@vmoens
vmoens deleted the gh/vmoens/289/head branch August 12, 2026 09:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Feature New feature Integrations/torch_geometric Integrations Modules

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant