-
Notifications
You must be signed in to change notification settings - Fork 514
Tutorial for Shapley Value Sampling likely needs update #1486
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
Comments
What version of Captum are you on? The tutorials are for the latest version; based on the screenshot provided, you're on a previous version where Based on the code snippet, please remove |
Could be the case. I installed captum using |
I can likely do something along the lines of |
Ah yeah it's been a little over a year since the last package release, though we're actively trying to get one out soon. I'll leave this open and come back in a month if we still don't have a release to update the website and notebook to call out that a manual installation is required. |
Summary: Got pytorch#1486 when I was oncall They ran into this error: > TypeError: ShapleyValues.attribute() got an unexpected keyword argument 'skip_tokens' due to being on a package of Captum where > LLMAttribution.attribute() doesn't have skip_tokens as a parameter, and therefore it's being passed to ShapleyValues.attribute() as part of **kwarg, though ShapleyValues never supported skip_tokens It's not sufficient to be on the latest Captum release (v0.7), atp they need to install from Github Differential Revision: D69566114
pytorch#1496) Summary: Got pytorch#1486 when I was oncall a while ago. A user ran into this error: > TypeError: ShapleyValues.attribute() got an unexpected keyword argument 'skip_tokens' due to being on a package of Captum where > LLMAttribution.attribute() doesn't have skip_tokens as a parameter, and therefore it's being passed to ShapleyValues.attribute() as part of **kwarg, though ShapleyValues never supported skip_tokens It's not sufficient to be on the latest Captum release (v0.7), atp they need to install from Github Differential Revision: D69566114
#1496) Summary: Pull Request resolved: #1496 Got #1486 when I was oncall a while ago. A user ran into this error: > TypeError: ShapleyValues.attribute() got an unexpected keyword argument 'skip_tokens' due to being on a package of Captum where > LLMAttribution.attribute() doesn't have skip_tokens as a parameter, and therefore it's being passed to ShapleyValues.attribute() as part of **kwarg, though ShapleyValues never supported skip_tokens It's not sufficient to be on the latest Captum release (v0.7), atp they need to install from Github Reviewed By: craymichael Differential Revision: D69566114 fbshipit-source-id: 38f5fdc46c610a8ab1e8a21ef375121fa18c9606
📚 Documentation
In the tutorials for perturbation based attribution for HuggingFace CasualLMs, in the block 12 that demonstrates how to use SHAP values, the parameter
skip_tokens
is being passed:Running that code gives the error -
TypeError: ShapleyValues.attribute() got an unexpected keyword argument 'skip_tokens'
:Neither the API doc nor the source has the
attribute
method has parameterskip_tokens
, likely removed in one of the more current versions of the package.Thanks for the great package and documentation.
The text was updated successfully, but these errors were encountered: