-
Notifications
You must be signed in to change notification settings - Fork 497
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Bug in LimeBase example? #905
Comments
Hi @th789 , thanks for catching this! It seems that the lambda function provided as to_interp_rep_transform should be changed to accept kwargs. We will update the documentation to correct this. |
Hi @vivekmig, thank you so much for the reply! I had tried that, but it led to another error message (see below). Perhaps I misunderstood what you meant?
|
Hi @th789 , the signature also needs to include a positional argument for original inputs, based on the expected function signature defined here. Seems like this wasn't updated after a change in the function signature, sorry about that! You can try out the updated sample in #908 . In addition to the function, you would also need to change to a batch size of 1, since LimeBase supports attribution for one example at a time, unless the forward function returns a batch-wise output or loss. |
Thank you very much @vivekmig, I really appreciate it! |
Summary: LimeBase example code did not apply the expected signature, causing issues when running code based on the example, as reported in #905 . This fixes the example to run appropriately. Pull Request resolved: #908 Reviewed By: miguelmartin75 Differential Revision: D35050422 Pulled By: vivekmig fbshipit-source-id: 9bf1e727c3fa02a8e9dbf5aee00125a59f8a2062
🐛 Bug
I am trying to run the example provided for LimeBase on https://captum.ai/api/lime.html. However, running the example leads to the following error message: "TypeError: () got an unexpected keyword argument 'kernel_width'" (more info below).
To Reproduce
Error message:
Expected behavior
There should be no error message and
attr_coefs
should return the feature attributions.Environment
Describe the environment used for Captum
The text was updated successfully, but these errors were encountered: