Skip to content

[BugFix] [TQC] [1/3] Support list-valued critics in SoftUpdate - #4077

Open
gtnv wants to merge 1 commit into
pytorch:mainfrom
gtnv:fix/TQC-fix-softupdate
Open

[BugFix] [TQC] [1/3] Support list-valued critics in SoftUpdate#4077
gtnv wants to merge 1 commit into
pytorch:mainfrom
gtnv:fix/TQC-fix-softupdate

Conversation

@gtnv

@gtnv gtnv commented Aug 9, 2026

Copy link
Copy Markdown
Contributor

Summary

Closes #4076

Initialize target updaters from an unlocked shallow source container, allowing list-backed functional parameters to be structurally selected. Extend the existing SAC list-critic regression through a real SoftUpdate.step().

Validation

Tested on an H100 80 GB host with PyTorch 2.11.0+cu130.

  • Upstream reproduction fails in SoftUpdate(...) with RuntimeError: Cannot modify locked TensorDict.
  • Patched reproduction moves both delayed critic leaves by exactly 0.5 after adding 1 to each source.
  • Targeted updater/SAC tests: 12 passed, 196 deselected in 1.98 s.
  • Full SAC suite: 1679 passed, 494 skipped in 27.16 s.
  • All pre-commit hooks pass.

cc @vmoens

@pytorch-bot

pytorch-bot Bot commented Aug 9, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

Note: Links to docs will display an error until the docs builds have been completed.

⚠️ 15 Awaiting Approval

As of commit ab1bdf7 with merge base d7659c7 (image):

AWAITING APPROVAL - The following workflows need approval before CI can run:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Aug 9, 2026
@gtnv
gtnv marked this pull request as ready for review August 9, 2026 02:31
@vmoens

vmoens commented Aug 10, 2026

Copy link
Copy Markdown
Collaborator

Reviewed rebased head ab1bdf76ebf7577ee29fb4a8cba79f7ee7a82fc5 against current origin/main and the latest bot/check state. I checked that the shallow clone unlocks only the temporary TensorDict container needed by select, while preserving the underlying parameter objects and source/target mapping; the extended regression also exercises a real SoftUpdate.step() for both SAC versions.

Targeted result: pytest -q test/objectives/test_sac.py::TestSAC::test_sac_list_qvalue_networks -> 2 passed. I did not find a functional issue in this diff. Residual risk is the broader suite, which is still awaiting workflow approval on this fork PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

BugFix CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Objectives

Projects

None yet

Development

Successfully merging this pull request may close these issues.

[BUG] SoftUpdate fails for list-valued SAC critics

2 participants