UnpicklingError: Weights only load failed. In PyTorch 2.6, we changed the default value of the `weights_only` argument in `torch.load` from `False` to `True`. Re-running `torch.load` with `weights_only` set to `False` will likely succeed, but it can result in arbitrary code execution. Do it only if you got the file from a trusted source.
Please file an issue with the following so that we can make `weights_only=True` compatible with your use case: WeightsUnpickler error: Can only build Tensor, Parameter, OrderedDict or types allowlisted via `add_safe_globals`, but got <class 'numpy.dtypes.UInt32DType'>
Checklist before your report.
masterbranch of AdaSeq.What happened?
Where should I modify the config or how should I fix this error raised within the lib?
torch.serialization.add_safe_globalsbut there are too many variables may need to add.Python traceback
show/hide
Operating system
Ubuntu 22.04 LTS
Python version
3.11.11
Output of pip freeze
show/hide
How to reproduce
show/hide
Code of Conduct