Skip to content

[Algorithm] Add MicroDuck PPO MJLab example - #4183

Merged
vmoens merged 6 commits into
mainfrom
codex/microduck-ppo-example
Sep 2, 2026
Merged

vmoens merged 6 commits into
mainfrom
codex/microduck-ppo-example

Conversation

@vmoens

@vmoens vmoens commented Aug 28, 2026 •

Copy link
Copy Markdown
Contributor

No description provided.

@vmoens vmoens added the ci/optdeps Run the full tests-optdeps suite on this PR label Aug 28, 2026
@pytorch-bot

pytorch-bot Bot commented Aug 28, 2026 •

Copy link
Copy Markdown

🔗 Helpful Links

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

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

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 28, 2026
@github-actions github-actions Bot added new algo New algorithm request or PR CI Has to do with CI setup (e.g. wheels & builds, tests...) Examples and removed new algo New algorithm request or PR labels Aug 28, 2026
@vmoens
vmoens force-pushed the codex/microduck-ppo-example branch from 69076d8 to 331e5a8 Compare August 31, 2026 07:58
@github-actions github-actions Bot added the new algo New algorithm request or PR label Aug 31, 2026
@github-actions github-actions Bot added Documentation Improvements or additions to documentation Environments Adds or modifies an environment wrapper Objectives Trainers Environments/mjlab labels Sep 2, 2026
vmoens and others added 6 commits September 2, 2026 20:57
Group MicroDuck examples by robot rather than by simulator backend so the
MJLab and backend-neutral MuJoCo scripts live side by side.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
mjlab reports episode reward terms, curriculum levels and termination
counts through the extras["log"] mapping returned by reset and step. The
wrapper discarded it, so training scripts had to subclass _reset and
_step to recover those metrics. Add a log_extras option that accumulates
the numeric entries and a pop_logged_extras method returning their means
since the previous call. MJLabEnv and MJLabEnvConfig forward the option.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Provide the KL-targeted learning-rate schedule popularized by rsl_rl as a
reusable utility: shrink the learning rate when the measured policy KL
exceeds twice the target, grow it when the KL falls below half the
target, and clamp every parameter group to a configurable range. The
kl_approx output of ClipPPOLoss can be passed to step() directly.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
Use MJLabWrapper(log_extras=True) instead of a private subclass, replace
the hand-rolled adaptive learning-rate schedule with KLAdaptiveLR, fill
the replay buffer once per iteration instead of once per epoch, return
the environment and its normalizer from make_env, and log through
torchrl_logger.

Co-Authored-By: Claude Fable 5.1 <noreply@anthropic.com>
@vmoens
vmoens force-pushed the codex/microduck-ppo-example branch from b65177f to cad787a Compare September 2, 2026 19:58
@vmoens
vmoens merged commit 9689030 into main Sep 2, 2026
96 of 100 checks passed
@vmoens
vmoens deleted the codex/microduck-ppo-example branch September 22, 2026 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci/optdeps Run the full tests-optdeps suite on this PR CI Has to do with CI setup (e.g. wheels & builds, tests...) CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. Documentation Improvements or additions to documentation Environments/mjlab Environments Adds or modifies an environment wrapper Examples new algo New algorithm request or PR Objectives Trainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant