Skip to content
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

Fix KernelShap Overflow Issues #649

Closed
wants to merge 2 commits into from

Conversation

vivekmig
Copy link
Contributor

@vivekmig vivekmig commented Apr 6, 2021

This ensures that Lime / Kernel Shap interpretable model inputs, targets, and similarity scores are floats, which avoids sporadic int overflow issues occurring in Kernel Shap.

@facebook-github-bot
Copy link
Contributor

@vivekmig has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

Copy link
Contributor

@miguelmartin75 miguelmartin75 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

@@ -511,17 +511,17 @@ def attribute(
if show_progress:
attr_progress.close()

combined_interp_inps = torch.cat(interpretable_inps)
combined_interp_inps = torch.cat(interpretable_inps).float()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Wondering if .double() would be a good alternative in some cases?

@facebook-github-bot
Copy link
Contributor

@vivekmig has imported this pull request. If you are a Facebook employee, you can view this diff on Phabricator.

@facebook-github-bot
Copy link
Contributor

@vivekmig merged this pull request in 43acfcd.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants