fix serialization of nn.Parameter with dill#10296
fix serialization of nn.Parameter with dill#10296elanmart wants to merge 3 commits intopytorch:masterfrom
Conversation
|
@pytorchbot retest this please |
1 similar comment
|
@pytorchbot retest this please |
facebook-github-bot
left a comment
There was a problem hiding this comment.
SsnL has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
|
This will lose backward hooks, you'll need to serialize (and reconstitute them as well). |
|
See also #10220, where we have a parallel code path specifically for the multiprocessing serialization case. |
|
@elanmart Could you update the diff to include backward hooks like here? https://github.com/pytorch/pytorch/pull/10220/files#diff-0d553ed0e9ca41fdac21632b4d503a10R41 |
|
@ailzhang please excuse my late response, I was having a few days off. Yes, of course I'll do my best to fix that. |
|
No rush. Just wondering if there is any progress on this? |
211f606 to
f679203
Compare
|
@ssnl well yeah there's really no excuse, I lost track of this PR, which kept people waiting. I'm not sure how the multiprocessing codepath should affect the solution here. Is sticking an extra |
|
@elanmart Adding a classmethod is fine by me, but it seems to break other things (see CI). |
|
@ssnl the CI seems to run fine now, what do you think? |
ssnl
left a comment
There was a problem hiding this comment.
Thanks! LGTM. I wonder if we should install dill in CI and add a test...
facebook-github-bot
left a comment
There was a problem hiding this comment.
soumith is landing this pull request. If you are a Facebook employee, you can view this diff on Phabricator.
Summary: Should resolve pytorch#9981. Pull Request resolved: pytorch#10296 Differential Revision: D9196353 Pulled By: soumith fbshipit-source-id: 109b6da42b7240cdbc7a0586745c735bce5e1279
|
Hi @elanmart |
|
I just had a look at the initial issue, #9981. |
|
Argh, never mind. I was still on torch 0.4.1 because a dependency pulled it in. |
Should resolve #9981.