Skip to content

[Feature] SACLoss backup_entropy option - #4799

Open
theap06 wants to merge 2 commits into
pytorch:mainfrom
theap06:pr/sac-backup-entropy
Open

theap06 wants to merge 2 commits into
pytorch:mainfrom
theap06:pr/sac-backup-entropy

Conversation

@theap06

@theap06 theap06 commented Nov 28, 2026 •

Copy link
Copy Markdown
Collaborator

Description

Adds backup_entropy to SACLoss, DiscreteSACLoss and SACLossConfig (default True, so existing behavior is unchanged); with False the critic target drops the -alpha * log_prob term. Losses pickled before the option existed read the class default and keep the entropy term.

Motivation and Context

The HIL-SERL reference code trains its critic without the entropy term, and the HIL-SERL recipe (#4774) uses this option to match it.

Stack (merge in this order; #4771, #4772, #4773 and #4799 are independent of each other and each is based on main, #4774 needs all four):

  1. [BugFix] Run ModuleTransform on reset when it declares observations #4771 [BugFix] Run ModuleTransform on reset when it declares observations
  2. [Feature] InterventionModule for human or scripted takeovers #4772 [Feature] InterventionModule for human or scripted takeovers
  3. [Feature] Mixed-source replay with ReplayBufferEnsemble #4773 [Feature] Mixed-source replay with ReplayBufferEnsemble
  4. [Feature] SACLoss backup_entropy option #4799 [Feature] SACLoss backup_entropy option (this PR)
  5. [Algorithm] HIL-SERL in simulation #4774 [Algorithm] HIL-SERL in simulation
  • I have raised an issue to propose this change (required for new features and bug fixes)

Types of changes

  • New feature (non-breaking change which adds core functionality)

Checklist

  • I have read the CONTRIBUTION guide (required)
  • My change requires a change to the documentation.
  • I have updated the tests accordingly (required for a bug fix or a new feature).
  • I have updated the documentation accordingly.

Adds backup_entropy to SACLoss, DiscreteSACLoss and SACLossConfig. When
False, the critic target uses only the smallest next-state Q value, as in
the SERL and HIL-SERL reference code. Defaults to True, so existing
behavior is unchanged.
@pytorch-bot

pytorch-bot Bot commented Nov 28, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

❌ 3 New Failures

As of commit 78a97bb with merge base 7c6a78d (image):

NEW FAILURES - The following jobs have failed:

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 Nov 28, 2026
@github-actions github-actions Bot added Feature New feature Objectives Trainers and removed Feature New feature labels Nov 28, 2026
@github-actions github-actions Bot added the Feature New feature label Nov 29, 2026
@theap06
theap06 marked this pull request as ready for review November 29, 2026 09:13

This branch has not been deployed

No deployments
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 Objectives Trainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant