Skip to content

Conversation

@micedre
Copy link
Collaborator

@micedre micedre commented Dec 16, 2025

PyTorch 2.6 changed the default value of weights_only parameter in torch.load() from False to True. Since Lightning checkpoints contain optimizer and scheduler state (not just tensors), loading now requires weights_only=False.

This is safe as the checkpoint is self-generated during training.

fixes #47

PyTorch 2.6 changed the default value of weights_only parameter in
torch.load() from False to True. Since Lightning checkpoints contain
optimizer and scheduler state (not just tensors), loading now requires
weights_only=False.

This is safe as the checkpoint is self-generated during training.
@micedre micedre merged commit c9382ca into InseeFrLab:main Dec 16, 2025
5 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Error with recent version of pytorch-lightning and torch

1 participant