[Test] Add off-policy data-parallel learning suite#4026
Draft
vmoens wants to merge 3 commits into
Draft
Conversation
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/rl/4026
Note: Links to docs will display an error until the docs builds have been completed. ✅ You can merge normally! (1 Unrelated Failure)As of commit f0888fd with merge base f2a2337 ( BROKEN TRUNK - The following job 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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Adds
sota-implementations/offpolicy-dp/, a Hydra-configured distributed suite for DQN, SAC, DDPG, and TD3 using the merged data-parallel Trainer and flexible transport APIs.The suite includes:
[B, T]to[B * T]before replay insertionDDPG now accepts an optional
exploration_moduleinDDPGTrainerandDDPGTrainerConfig. Local and Ray execution publish weights with the sameactor + explorationstructure used by the collector, while the loss and evaluator continue to use the deterministic actor. The SOTA DDPG configuration applies fixed Gaussian action noise with standard deviation 0.2.Experiment design
Random-only collection is disabled in these profiles. SAC is stochastic, TD3 and DDPG use persistent Gaussian action noise, and DQN begins with epsilon equal to one. Learner startup is separated from action selection: scale runs collect ten million stochastic-policy transitions before the first optimization step instead of requesting a distributed random-action warmup against the shared replay counter.
The scale defaults are a starting point for the next allocation:
A full 1,000-step prefill trajectory from every environment would require 100 million transitions before learning begins. The shorter stochastic prefill targets early terminations while exploration continues throughout the run. Humanoid retains
frame_skip=1for batched solver stability and therefore is not directly comparable to the standard five-substep benchmark.Why
The distributed components need an end-to-end workload that exercises collection, replay transport, multi-rank learning, policy synchronization, numerical health, and shutdown together. DDPG collection must remain stochastic after replay prefill; publishing only its deterministic actor can optimize losses without improving behavior. Separating replay fill from random-only action selection also avoids per-collector warmup thresholds being compared with a shared replay write count.
Validation
python3 -m py_compile torchrl/trainers/algorithms/ddpg.py torchrl/trainers/algorithms/configs/trainers.py sota-implementations/offpolicy-dp/train.py sota-implementations/offpolicy-dp/run_suite.py test/test_trainer.py test/test_configs.pypre-commit run --files <changed files>python -m pytest test/test_trainer.py test/test_configs.py -k 'TestDDPGTrainer or test_ddpg_trainer_config' -q— 3 passedThe earlier runs below validate transport, replay accounting, flat sampled batches, policy publication, numerical finiteness, and shutdown. They predate the learning-scale redesign and should not be interpreted as successful learning curves. The redesigned 200-million-transition profiles have not been run because the original allocation has ended.
Related stacks: #4005 and #3958.