You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Since torchrec register a state_hook. The path of is always prepended a long prefix:
for example, if I have a module structure like
A.B.C.ec = EmbeddingCollection() # A is not DMP wrapped, instead, ec is DMP wrapped.
# then I'll get a state dict key
A.B.C.ec.A.B.C.ec.embeddings.weight
I would like to keep A.B.C.ec.embeddings.weight only. I found the related source code.
For some reason, I have to use DMP as a submodule of the model. Is there any thing I can do?
The text was updated successfully, but these errors were encountered:
JacoCheung
changed the title
[Bug] state_dict returns wrong path when EC is internally DMP wrapped
[Bug] state_dict returns wrong path when DMP is as a submodule
Nov 23, 2024
Since torchrec register a state_hook. The path of is always prepended a long prefix:
for example, if I have a module structure like
I would like to keep
A.B.C.ec.embeddings.weight
only. I found the related source code.For some reason, I have to use DMP as a submodule of the model. Is there any thing I can do?
The text was updated successfully, but these errors were encountered: