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 kernel explainer save / load method #2604

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

WeichenXu123
Copy link
Contributor

Signed-off-by: Weichen Xu weichen.xu@databricks.com

Fix kernel explainer save / load method:

Issues in original KernelExplainer.save:

  • It saves model by calling model.save, but shap.utils._legacy.Model has no save method
  • It tries to save "masker", but there's no "masker" in KernelExplainer
  • It does not save "KernelExplainer.data" attribute, the attribute is required when loading back

Issues in original KernelExplainer.load:

  • Use mismatched model loader to load model
  • Try to load non-existent "masker" attribute
  • Don't not load "data" attribute and then cause calling " KernelExplainer" constructor lack of "data" argument.

Signed-off-by: Weichen Xu <weichen.xu@databricks.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant