Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Feature] pass policy-factory in mp data collectors #2859

Merged
merged 13 commits into from
Mar 20, 2025

Conversation

[ghstack-poisoned]
Copy link

pytorch-bot bot commented Mar 18, 2025

🔗 Helpful Links

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

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.

@facebook-github-bot facebook-github-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 Mar 18, 2025
vmoens added a commit that referenced this pull request Mar 18, 2025
ghstack-source-id: 369e690488adb4c6ebc566c3b67b81069ac30333
Pull Request resolved: #2859
@vmoens vmoens added the bug Something isn't working label Mar 18, 2025
@vmoens vmoens linked an issue Mar 18, 2025 that may be closed by this pull request
3 tasks
@vmoens
Copy link
Contributor Author

vmoens commented Mar 18, 2025

In this PR, I add an example to show how to sync weights when the native weight update class doesn't work (eg serializing mps weights is not possible so you can cast them to cpu then recast to mps)
I also fix the collectors and test the solution.
This should also make other update methods easier to implement.

cc @mikaylagawarecki

[ghstack-poisoned]
vmoens added a commit that referenced this pull request Mar 18, 2025
ghstack-source-id: 166cdfee45c82ad5a0fec935786e02ae046e9599
Pull Request resolved: #2859
@vmoens
Copy link
Contributor Author

vmoens commented Mar 18, 2025

We also need to find a way to pass the local update to the sub-collector. With the distributed ones it's easy to do (we can pass any kwarg). For mp ones not so much atm

[ghstack-poisoned]
vmoens added a commit that referenced this pull request Mar 19, 2025
ghstack-source-id: 3101c9e73f0b9c8a36e0594e896de667cdd855a8
Pull Request resolved: #2859
[ghstack-poisoned]
vmoens added a commit that referenced this pull request Mar 19, 2025
ghstack-source-id: b951eb0d6a917c6b7892ba962c032b5c3a018cbe
Pull Request resolved: #2859
[ghstack-poisoned]
vmoens added a commit that referenced this pull request Mar 19, 2025
ghstack-source-id: 6396c5908798df2be211e786778e081a099594fa
Pull Request resolved: #2859
[ghstack-poisoned]
vmoens added a commit that referenced this pull request Mar 19, 2025
ghstack-source-id: 993ec0d7bf7945cdc231875c3c75e34aeb0970fe
Pull Request resolved: #2859
[ghstack-poisoned]
vmoens added a commit that referenced this pull request Mar 19, 2025
ghstack-source-id: 3af3a995c48e0eb6ce1736a587b565fa1ac758c4
Pull Request resolved: #2859
[ghstack-poisoned]
vmoens added 3 commits March 19, 2025 17:05
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
vmoens added a commit that referenced this pull request Mar 20, 2025
ghstack-source-id: f938148c57abbb5cd57c55d8d3af46a6b3038a5d
Pull Request resolved: #2859
vmoens added 2 commits March 20, 2025 07:30
[ghstack-poisoned]
[ghstack-poisoned]
@vmoens vmoens merged commit cf9400a into gh/vmoens/121/base Mar 20, 2025
25 of 50 checks passed
vmoens added a commit that referenced this pull request Mar 20, 2025
ghstack-source-id: bce8abe9853d5ec187f91ffbcd8b940fa18ec8ab
Pull Request resolved: #2859
@vmoens vmoens deleted the gh/vmoens/121/head branch March 20, 2025 18:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[BUG] DataCollectors fail when device is set to MPS
2 participants