-
Notifications
You must be signed in to change notification settings - Fork 26.3k
Fix preserve submodule attribute in freezing #45143
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
Conversation
This PR prevents freezing cleaning up a submodule when user requests to preserve a submodule. [ghstack-poisoned]
💊 CI failures summary and remediationsAs of commit 52d5f06 (more details on the Dr. CI page): 💚 💚 Looks good so far! There are no failures yet. 💚 💚
1 failure confirmed as flaky and can be ignored:
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 on the GitHub issue tracker or post in the (internal) Dr. CI Users group. This comment has been revised 3 times. |
Codecov Report
@@ Coverage Diff @@
## gh/bzinodev/17/base #45143 +/- ##
=======================================================
- Coverage 67.84% 67.83% -0.01%
=======================================================
Files 384 384
Lines 50064 50064
=======================================================
- Hits 33965 33963 -2
- Misses 16099 16101 +2
Continue to review full report at Codecov.
|
eellison
left a comment
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
| class TestModule(nn.Module): | ||
| def __init__(self): | ||
| super(TestModule, self).__init__() | ||
| self.sub1 = SubModule() # aliasing |
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.
stray aliasing comment ?
| m = TestModule() | ||
| ms = torch.jit.script(m) | ||
| ms.eval() | ||
| mf = torch._C._freeze_module(ms._c, ["sub1"]) |
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.
nit: use public api torch.jit.freeze
Stack from ghstack:
This PR prevents freezing cleaning up a submodule when user requests to
preserve a submodule.
Differential Revision: D23844969