Module implementing checks for the use of 'torch.load' and 'torch.save'.
None |
None |
checkPytorchLoad | Function to check for the use of 'torch.load'. |
getChecks | Public method to get a dictionary with checks handled by this module. |
Function to check for the use of 'torch.load'.
Using `torch.load` with untrusted data can lead to arbitrary code execution. The safe alternative is to use `weights_only=True` or the safetensors library.
Public method to get a dictionary with checks handled by this module.