Pass weights_only flag to EXIR deserialization#18588
Pass weights_only flag to EXIR deserialization#18588CaptnJackSparrow wants to merge 1 commit intopytorch:mainfrom
Conversation
Summary: This is a workaround to the following error during deserialization of the EXIR graph: ```Exception has occurred: UnpicklingError (note: full exception trace is shown but execution is paused at: <module>) Weights only load failed. This file can still be loaded, to do so you have two options, �[1mdo those steps only if you trust the source of the checkpoint�[0m. (1) In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source. (2) Alternatively, to load with `weights_only=True` please check the recommended steps in the following error message. WeightsUnpickler error: Unsupported global: GLOBAL executorch.exir.serde.export_serialize._reconstruct_fake_tensor was not an allowed global by default. Please use `torch.serialization.add_safe_globals([executorch.exir.serde.export_serialize._reconstruct_fake_tensor])` or the `torch.serialization.safe_globals([executorch.exir.serde.export_serialize._reconstruct_fake_tensor])` context manager to allowlist this global if you trust this class/function. ``` Differential Revision: D98258299
🔗 Helpful Links🧪 See artifacts and rendered test results at hud.pytorch.org/pr/pytorch/executorch/18588
Note: Links to docs will display an error until the docs builds have been completed. ❌ 2 New Failures, 2 Unrelated FailuresAs of commit ec4d230 with merge base 02cb325 ( NEW FAILURES - The following jobs have failed:
BROKEN TRUNK - The following jobs failed but were present on the merge base:👉 Rebase onto the `viable/strict` branch to avoid these failures
This comment was automatically generated by Dr. CI and updates every 15 minutes. |
|
@CaptnJackSparrow has exported this pull request. If you are a Meta employee, you can view the originating Diff in D98258299. |
This PR needs a
|
Summary:
This is a workaround to the following error during deserialization of the EXIR graph:
Differential Revision: D98258299