We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f50cc53 commit 8a80e49Copy full SHA for 8a80e49
1 file changed
test/test_nn.py
@@ -1800,7 +1800,7 @@ def test_parameterlistdict_setting_attributes(self):
1800
1801
def test_parameterlistdict_pickle(self):
1802
# warning from torch.load call in _load_from_bytes used in UntypedStorage.__reduce__
1803
- WEIGHTS_ONLY_WARN = re.escape("You are using `torch.load` with `weights_only=False`")
+ WEIGHTS_ONLY_WARN = "You are using `torch.load` with `weights_only=False`"
1804
m = nn.ParameterList(map(nn.Parameter, [torch.rand(2), torch.rand(2)]))
1805
with self.assertWarnsRegex(FutureWarning, WEIGHTS_ONLY_WARN):
1806
m = pickle.loads(pickle.dumps(m))
0 commit comments