mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
[pkg] improve error message for module detection on saving pass (#73106)
Summary: Pull Request resolved: https://github.com/pytorch/pytorch/pull/73106 The original error message didn't have next steps, and someone got confused. This error message should make debugging a bit easier. Test Plan: Imported from OSS Reviewed By: ngimel Differential Revision: D34559499 Pulled By: PaliC fbshipit-source-id: fd5fec9c4db10a20775435a587bad24336a671ef (cherry picked from commit efdcf1e198389ee156a46cf0f8b185d8145d3266)
This commit is contained in:
committed by
PyTorch MergeBot
parent
7b8fc74897
commit
e7051939fb
@ -607,7 +607,8 @@ class PackageExporter:
|
|||||||
f"Object '{field}' from module {module} was mocked out during packaging "
|
f"Object '{field}' from module {module} was mocked out during packaging "
|
||||||
f"but is being used in resource - {resource} in package {package}. "
|
f"but is being used in resource - {resource} in package {package}. "
|
||||||
"If this error is happening during 'save_pickle', please ensure that your "
|
"If this error is happening during 'save_pickle', please ensure that your "
|
||||||
"pickled object doesn't contain any mocked objects."
|
"pickled object doesn't contain any mocked objects. Try interning or externing"
|
||||||
|
f"{module} if {field} is supposed to be in the package."
|
||||||
)
|
)
|
||||||
else:
|
else:
|
||||||
return
|
return
|
||||||
|
Reference in New Issue
Block a user