Skip to content

[Refactor] MicroDuck prior PPOTrainer and PPO-EWMA recipes - #4378

Draft
vmoens wants to merge 2 commits into
football-examplefrom
codex/microduck-ppo-recipes
Draft

vmoens wants to merge 2 commits into
football-examplefrom
codex/microduck-ppo-recipes

Conversation

@vmoens

@vmoens vmoens commented Sep 14, 2026

Copy link
Copy Markdown
Collaborator

MicroDuck prior training now uses PPOTrainer for optimization while retaining complete-episode collection, recurrent minibatches, per-task GAE, evaluation and portable best/latest exports. The Hydra recipe selects ordinary PPO or PPO-EWMA and saves resumable learner, optimizer, proximal actor/updater, RNG, scheduler and evaluation state. Skill/prior training remains in TorchRL and requires no zoo installation.

This also fixes two concrete update errors: the proximal actor no longer advances for gradient accumulation or skipped nonfinite optimizer steps, and prior GAE reserves a bootstrap row for each complete episode instead of discarding a suffix when several episodes truncate.

Stacked above #4375 (football-example). The optional games zoo consumes the same trainer and delayed-actor objective in its own recipe.

Validation: native-MuJoCo whole-episode/per-task/recurrent/resume regressions passed; nine focused trainer/updater tests passed; the matching zoo suite passed 39 tests (one accelerated-backend skip). Installed-package PPO-EWMA tag smoke and recurrent prior PPO-EWMA smoke produced finite losses and resumable checkpoints. Fixed-rollout game tests compare GAE and an optimizer update against explicit calculations, and verify frozen opponents remain unchanged across PPO and EWMA resume. CI runs both prior recipe smoke commands and the installed zoo integration tutorial.

Simulator continuation starts from fresh episodes after restart; fixed-data optimizer continuation is checked exactly. No training comparison or claim that EWMA improves learning is made.

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

pytorch-bot Bot commented Sep 14, 2026

Copy link
Copy Markdown

🔗 Helpful Links

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

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

✅ No Failures

As of commit 8c81e5c with merge base a2acf99 (image):
💚 Looks good so far! There are no failures yet. 💚

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 Sep 14, 2026
@github-actions github-actions Bot added Refactoring Refactoring of an existing feature CI Has to do with CI setup (e.g. wheels & builds, tests...) Environments Adds or modifies an environment wrapper Examples Trainers and removed Refactoring Refactoring of an existing feature labels Sep 14, 2026
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. Environments Adds or modifies an environment wrapper Examples Refactoring Refactoring of an existing feature Trainers

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant