Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add safe_globals to resume training on PyTorch 2.6
Starting from version 2.4 PyTorch introduces a stricter check for the objects which can be loaded with torch.load(). Starting from version 2.6 loading with weights_only=True requires allowlisting of such objects. Fixes: huggingface#34631 See: pytorch/pytorch#137602 See: https://pytorch.org/docs/stable/notes/serialization.html#torch.serialization.add_safe_globals Signed-off-by: Dmitry Rogozhkin <[email protected]>
- Loading branch information