-
Notifications
You must be signed in to change notification settings - Fork 21.4k
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
[functorch] add new ensembling api, demonstrate in example #88850
Conversation
[ghstack-poisoned]
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/88850
Note: Links to docs will display an error until the docs builds have been completed. ✅ No FailuresAs of commit fd510c3: This comment was automatically generated by Dr. CI and updates every 15 minutes. |
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Directionally this looks good to me and the code looks correct. We should bikeshed the name of the API before this goes in
for key in grad_weights: | ||
new_weights[key] = weights[key] - grad_weights[key] * lr |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
(no action required) Honestly should just look like the following:
def sgd_update(weight, grad_weight):
return weight - grad_weight * lr
new_weights = pytree.tree_map(sgd_update, weights, grad_weights)
but our tree_map doesn't have those semantics yet (JAX's does).
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I had two last two points, then this should be good to go!
- My first reaction at
stack_ensembled_state
was some confusion, but I can be convinced - Are there tests for the error cases?
[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
Looks like there are some erroneous submodule changes |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM
[ghstack-poisoned]
@pytorchbot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Merge failedReason: The following mandatory check(s) failed (Rule Dig deeper by viewing the failures on hud Details for Dev Infra teamRaised by workflow job |
@pytorchmergebot rebase |
@pytorchbot successfully started a rebase job. Check the current status here |
[ghstack-poisoned]
Successfully rebased |
ghstack-source-id: bf8db67fa3b8591d2339466883a7ad00107b47a8 Pull Request resolved: #88850
@pytorchmergebot merge |
Merge startedYour change will be merged once all checks pass (ETA 0-4 Hours). Learn more about merging in the wiki. Questions? Feedback? Please reach out to the PyTorch DevX Team |
Stack from ghstack (oldest at bottom):