Skip to content

Consolidate the naming of named_parameter and state_dict for CheckpointWrapper #80089

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

Closed
wants to merge 4 commits into from

Conversation

fegin
Copy link
Contributor

@fegin fegin commented Jun 22, 2022

Stack from ghstack (oldest at bottom):

named_parameter() should return the same parameter names as state_dict() but the current CheckpointWrapper does not enforce this naming rule. This PR resolves this issue.

Differential Revision: D37344200

…ntWrapper

named_parameter() should return the same parameter names as state_dict() but the current CheckpointWrapper does not enforce this naming rule. This PR resolves this issue.

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

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

facebook-github-bot commented Jun 22, 2022

🔗 Helpful links

✅ No Failures (0 Pending)

As of commit 56150c9 (more details on the Dr. CI page):

Expand to see more

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


This comment was automatically generated by Dr. CI (expand for details).

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

Click here to manually regenerate this comment.

fegin added a commit that referenced this pull request Jun 22, 2022
…ntWrapper

named_parameter() should return the same parameter names as state_dict() but the current CheckpointWrapper does not enforce this naming rule. This PR resolves this issue.

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

ghstack-source-id: 159696213
Pull Request resolved: #80089
@facebook-github-bot facebook-github-bot added the oncall: distributed Add this issue/PR to distributed oncall triage queue label Jun 22, 2022
Copy link
Member

@rohan-varma rohan-varma left a comment

Choose a reason for hiding this comment

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

lgtm, thanks

Overrides :meth:`named_parameters()` to intercept parameter names and
remove all occurrences of _CHECKPOINT_PREFIX.
"""
# Determine which logic to use based on the context at call time
Copy link
Member

Choose a reason for hiding this comment

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

nit: there is no context here?

…or CheckpointWrapper"

named_parameter() should return the same parameter names as state_dict() but the current CheckpointWrapper does not enforce this naming rule. This PR resolves this issue.

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

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jun 23, 2022
…ntWrapper

Pull Request resolved: #80089

named_parameter() should return the same parameter names as state_dict() but the current CheckpointWrapper does not enforce this naming rule. This PR resolves this issue.
ghstack-source-id: 159744641

Differential Revision: [D37344200](https://our.internmc.facebook.com/intern/diff/D37344200/)
@rohan-varma rohan-varma self-requested a review June 28, 2022 20:33
Copy link
Member

@rohan-varma rohan-varma left a comment

Choose a reason for hiding this comment

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

lgtm

…or CheckpointWrapper"

named_parameter() should return the same parameter names as state_dict() but the current CheckpointWrapper does not enforce this naming rule. This PR resolves this issue.

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

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jun 30, 2022
…ntWrapper

Pull Request resolved: #80089

named_parameter() should return the same parameter names as state_dict() but the current CheckpointWrapper does not enforce this naming rule. This PR resolves this issue.
ghstack-source-id: 160471938

Differential Revision: [D37344200](https://our.internmc.facebook.com/intern/diff/D37344200/)
…or CheckpointWrapper"

named_parameter() should return the same parameter names as state_dict() but the current CheckpointWrapper does not enforce this naming rule. This PR resolves this issue.

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

[ghstack-poisoned]
fegin added a commit that referenced this pull request Jul 5, 2022
…ntWrapper

Pull Request resolved: #80089

named_parameter() should return the same parameter names as state_dict() but the current CheckpointWrapper does not enforce this naming rule. This PR resolves this issue.
ghstack-source-id: 160637693

Differential Revision: [D37344200](https://our.internmc.facebook.com/intern/diff/D37344200/)
@fegin
Copy link
Contributor Author

fegin commented Jul 5, 2022

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

@pytorchbot successfully started a merge job. Check the current status here

@github-actions
Copy link
Contributor

github-actions bot commented Jul 5, 2022

Hey @fegin.
You've committed this PR, but it does not have both a 'release notes: ...' and 'topics: ...' label. Please add one of each to the PR. The 'release notes: ...' label should represent the part of PyTorch that this PR changes (fx, autograd, distributed, etc) and the 'topics: ...' label should represent the kind of PR it is (not user facing, new feature, bug fix, perf improvement, etc). The list of valid labels can be found here for the 'release notes: ...' and here for the 'topics: ...'.
For changes that are 'topic: not user facing' there is no need for a release notes label.

facebook-github-bot pushed a commit that referenced this pull request Jul 6, 2022
…ntWrapper (#80089) (#80089)

Summary:
named_parameter() should return the same parameter names as state_dict() but the current CheckpointWrapper does not enforce this naming rule. This PR resolves this issue.

Pull Request resolved: #80089
Approved by: https://github.com/rohan-varma

Test Plan: contbuild & OSS CI, see https://hud.pytorch.org/commit/pytorch/pytorch/e0eeb06ec6b047eaa9ec7d9d08debd636dffb9a2

Reviewed By: mehtanirav

Differential Revision: D37344200

Pulled By: fegin

fbshipit-source-id: e4ae3136d68114bff548f3f1774356a30515047d
@facebook-github-bot facebook-github-bot deleted the gh/fegin/19/head branch July 9, 2022 14:17
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.

4 participants