KEMBAR78
[DDP/Functional Optim] Support kwarg arguments by rohan-varma · Pull Request #62079 · pytorch/pytorch · GitHub
Skip to content

Conversation

@rohan-varma
Copy link
Contributor

@rohan-varma rohan-varma commented Jul 23, 2021

Stack from ghstack:

Adds support for kwarg arguments into functional optimizer running as
hook.

Differential Revision: D29838127

Adds support for kwarg arguments into functional optimizer running as
hook.

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)

[ghstack-poisoned]
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Jul 23, 2021

🔗 Helpful links

💊 CI failures summary and remediations

As of commit 1acfce9 (more details on the Dr. CI page):


💚 💚 Looks good so far! There are no failures yet. 💚 💚


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

Click here to manually regenerate this comment.

Adds support for kwarg arguments into functional optimizer running as
hook.

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Jul 23, 2021
Pull Request resolved: #62079

Adds support for kwarg arguments into functional optimizer running as
hook.
ghstack-source-id: 134166276

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)
Adds support for kwarg arguments into functional optimizer running as
hook.

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)

[ghstack-poisoned]
self.functional_optimizer = functional_optim_cls(
[],
*self.functional_optim_args,
*functional_optim_args,
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Optimizers usually only have kwargs. Do you have any example that needs args?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

AFAIK user is able to construct regular optimizer without specifying kwargs and just using the parameter order in constructor:

s = torch.optim.SGD(torch.nn.Linear(1,1).parameters(), 0.01)

so wanted to support the same behavior here.

Adds support for kwarg arguments into functional optimizer running as
hook.

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Jul 23, 2021
Pull Request resolved: #62079

Adds support for kwarg arguments into functional optimizer running as
hook.
ghstack-source-id: 134219582

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)
Adds support for kwarg arguments into functional optimizer running as
hook.

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Jul 23, 2021
Pull Request resolved: #62079

Adds support for kwarg arguments into functional optimizer running as
hook.
ghstack-source-id: 134239594

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)
Adds support for kwarg arguments into functional optimizer running as
hook.

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Jul 24, 2021
Pull Request resolved: #62079

Adds support for kwarg arguments into functional optimizer running as
hook.
ghstack-source-id: 134249089

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)
Adds support for kwarg arguments into functional optimizer running as
hook.

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Jul 26, 2021
Pull Request resolved: #62079

Adds support for kwarg arguments into functional optimizer running as
hook.
ghstack-source-id: 134282611

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)
Adds support for kwarg arguments into functional optimizer running as
hook.

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)

[ghstack-poisoned]
rohan-varma added a commit that referenced this pull request Jul 26, 2021
Pull Request resolved: #62079

Adds support for kwarg arguments into functional optimizer running as
hook.
ghstack-source-id: 134330379

Differential Revision: [D29838127](https://our.internmc.facebook.com/intern/diff/D29838127/)
@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 64283fe.

@facebook-github-bot facebook-github-bot deleted the gh/rohan-varma/360/head branch July 30, 2021 14:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed Merged oncall: distributed Add this issue/PR to distributed oncall triage queue

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants