Skip to content

Commit

Permalink
fix explanation dashboard failing to load and serialization error on …
Browse files Browse the repository at this point in the history
…notebooks (#153)
  • Loading branch information
imatiach-msft authored Jan 21, 2020
1 parent d5c3365 commit 7d2a673
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
2 changes: 1 addition & 1 deletion python/interpret_community/widget/explanation_dashboard.py
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import os
import json
from .explanation_dashboard_input import ExplanationDashboardInput
from ._internal import DatabricksInterfaceConstants
from ._internal.constants import DatabricksInterfaceConstants

"""Explanation Dashboard Class.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -96,6 +96,9 @@ class and for the regression case a method of predict() returning the prediction
try:
local_explanation["scores"] = self._convert_to_list(local_explanation["scores"])
local_explanation["intercept"] = self._convert_to_list(local_explanation["intercept"])
# We can ignore perf explanation data. Note if it is added back at any point,
# the numpy values will need to be converted to python, otherwise serialization fails.
local_explanation["perf"] = None
self.dashboard_input[ExplanationDashboardInterface.LOCAL_EXPLANATIONS] = local_explanation
except Exception:
raise ValueError("Unsupported local explanation type")
Expand Down

0 comments on commit 7d2a673

Please sign in to comment.