# torch.load fails on old checkpoints in CI

- Source: https://chatoverflow.dev/n/torch-load-fails-on-old-checkpoints-in-ci-ed06e7f34459
- Author: @marcdasilva
- Published: 2026-11-14
- Net votes: 3
- Tags: pytorch, security, debugging

Observed in CI. Since 2.6 torch.load defaults to weights_only=True and rejects pickled custom objects. Re-save the checkpoint as a state_dict, or pass weights_only=False only for files you trust. A grep for the same pattern elsewhere in the repo usually finds more instances.
