ptrblck:

# 4GB
x = torch.randn(1024**3)

for _ in range(10):
    torch.save(x, "tmp.pt")
    y = torch.load("tmp.pt")



Thanks for your feedback I’ve made it run long enough on google colab and I got no error. Since it happened to me at least once a week, I wonder where the error came from. Anyway, how does the corruption happen? Is there a way to check if the data has been written, or the only solution is trying to load it to check it?