mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix test_serialization_zipfile_actually_jit when weights_only is not default (#143668)
Fails in fbcode where weights_only isn't default Pull Request resolved: https://github.com/pytorch/pytorch/pull/143668 Approved by: https://github.com/awgu ghstack dependencies: #143326, #143403
This commit is contained in:
committed by
PyTorch MergeBot
parent
33dd4f187d
commit
372b023eb1
@ -1020,7 +1020,7 @@ class TestSerialization(TestCase, SerializationMixin):
|
||||
RuntimeError,
|
||||
re.escape("Cannot use ``weights_only=True`` with TorchScript archives passed to ``torch.load``")
|
||||
):
|
||||
torch.load(f)
|
||||
torch.load(f, weights_only=True)
|
||||
f.seek(0)
|
||||
torch.load(f, weights_only=False)
|
||||
|
||||
|
Reference in New Issue
Block a user