-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Description
Error initializing LTP (model path: 'base'): 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: Unsupported operand 118
Check the documentation of torch.load to learn more about types accepted by default with weights_only https://pytorch.org/docs/stable/generated/torch.load.html.
Please ensure LTP models are correctly downloaded and paths are correct.
You might need to run ltp.LTP() once to download default models, or specify a correct path.