Skip to content

External torch.hub.load('pytorch/fairseq:main', 'xlmr.large') causes WeightsUnpickler error for PyTorch version 2.6 #5610

Open
@vviitani-amd

Description

@vviitani-amd

🐛 Bug

External torch.hub.load('pytorch/fairseq:main', 'xlmr.large') causes WeightsUnpickler error for PyTorch version >= 2.6.

The error occurs in the torch.load() calls in the file fairseq/checkpoint_utils.py. The error appears in PyTorch >= 2.6 as the default value for torch.load() argument weights_only was changed from False to True.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions