BUG: SHAP DeepExplainer cannot get SHAP values from TorchScript model #3532
Labels
awaiting feedback
Indicates that further information is required from the issue creator
bug
Indicates an unexpected problem or unintended behaviour
deep explainer
Relating to DeepExplainer, tensorflow or pytorch
Issue Description
DeepExplainer
currently seems unable to handle a Pytorch model loaded from TorchScript, and will throwRuntimeError: register_forward_hook is not supported on ScriptModules
.DeepExplainer
has no problem with the original sourcenn.Module
, but throws the error when its converted toScriptModule
. Reconstituting a handlernn.Module
fromScriptModule
gives the same error.I'm using 0.42.1, but the problem occurs on the latest release as well.
Minimal Reproducible Example
Traceback
Expected Behavior
No response
Bug report checklist
Installed Versions
0.42.1
The text was updated successfully, but these errors were encountered: