-
Notifications
You must be signed in to change notification settings - Fork 7.1k
Closed
Description
Our v2 transforms tests started failing for RandomResizedCrop
and LinearTransform
with:
__________________________________________ TestResizedCrop.test_transform[make_video-ratio-value2] ___________________________________________
test/test_transforms_v2.py:3659: in test_transform
check_transform(
test/test_transforms_v2.py:397: in check_transform
pickle.loads(pickle.dumps(transform))
../../.miniconda3/envs/pt/lib/python3.11/site-packages/torch/storage.py:505: in _load_from_bytes
return torch.load(io.BytesIO(b))
../../.miniconda3/envs/pt/lib/python3.11/site-packages/torch/serialization.py:1160: in load
warnings.warn(
E FutureWarning: You are using `torch.load` with `weights_only=False` (the current default value), which uses the default pickle module implicitly. It is possible to construct malicious pickle data which will execute arbitrary code during unpickling (See https://github.com/pytorch/pytorch/blob/main/SECURITY.md#untrusted-models for more details). In a future release, the default value for `weights_only` will be flipped to `True`. This limits the functions that could be executed during unpickling. Arbitrary objects will no longer be allowed to be loaded via this mode unless they are explicitly allowlisted by the user via `torch.serialization.add_safe_globals`. We recommend you start setting `weights_only=True` for any use case where you don't have full control of the loaded file. Please open an issue on GitHub for any issues related to this experimental feature.
The offending line is
vision/test/test_transforms_v2.py
Line 397 in e2aff7e
pickle.loads(pickle.dumps(transform)) |
The warning (converted to an error) is only emitted with RandomResizedCrop
and LinearTransform
and not on the other transforms. This is because these 2 transforms have an attribute that is a tensor.
Opened pytorch/pytorch#130242 on core
Metadata
Metadata
Assignees
Labels
No labels