mirror of
https://github.com/pytorch/pytorch.git
synced 2025-10-20 21:14:14 +08:00
Fix failures when default is flipped for weights_only (#127627)
Tests on XLA shard not fixed yet but there is an issue here https://github.com/pytorch/xla/issues/7799 Pull Request resolved: https://github.com/pytorch/pytorch/pull/127627 Approved by: https://github.com/albanD ghstack dependencies: #132349
This commit is contained in:
committed by
PyTorch MergeBot
parent
c8ad5e37e8
commit
d9576c9440
@ -239,7 +239,8 @@ class TestModule(TestCase):
|
||||
with tempfile.TemporaryFile() as f:
|
||||
torch.save(m, f)
|
||||
f.seek(0)
|
||||
m_copy = torch.load(f)
|
||||
# weights_only=False as this is legacy code that saves the model
|
||||
m_copy = torch.load(f, weights_only=False)
|
||||
output_from_copy = m_copy(*args, **kwargs)
|
||||
self.assertEqual(output, output_from_copy)
|
||||
|
||||
|
Reference in New Issue
Block a user