question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

detailed summary type does not work: Callback error updating interaction-summary-graph

See original GitHub issue

in explainerdashboard version 0.34

when using the detailed summary type on the XGBRegressionExplainer i get the following error (in dash):

Callback error updating interaction-summary-graph-60.figure, interaction-summary-index-col-60.style 17:56:37 Callback error updating interaction-summary-graph-60.figure, interaction-summary-index-col-60.style

image

code to replicate:

from sklearn.datasets import load_diabetes
import pandas as pd

data = load_diabetes()
X = pd.DataFrame(data = data['data'],columns = data['feature_names'])
y = data['target']

from xgboost import XGBRegressor

sklearnxgbr = XGBRegressor()
sklearnxgbr.fit(X,y)

from explainerdashboard.explainers import XGBRegressionExplainer
from explainerdashboard import ExplainerDashboard

explainer = XGBRegressionExplainer(sklearnxgbr, X,y)

ExplainerDashboard(explainer, 
                  summary_type='detailed', 
                  ).run()


All the other plots do work, including the aggregate summary plot but not the detailed (compact_dot) feature dependency and interaction summary plots

Issue Analytics

  • State:closed
  • Created 2 years ago
  • Comments:6 (5 by maintainers)

github_iconTop GitHub Comments

1reaction
oegedijkcommented, May 4, 2021

Ah, found it! There was a bug when you don’t define any onehot encoded columns. Fixed it, will try to get a new release out tomorrow.

So this fails:

from sklearn.ensemble import RandomForestClassifier
from explainerdashboard import ClassifierExplainer, ExplainerDashboard
from explainerdashboard.datasets import titanic_survive, titanic_names

X_train, y_train, X_test, y_test = titanic_survive()
explainer = ClassifierExplainer(RandomForestClassifier().fit(X_train, y_train), X_test, y_test)
ExplainerDashboard(explainer).run()

but this should work:

from sklearn.ensemble import RandomForestClassifier
from explainerdashboard import ClassifierExplainer, ExplainerDashboard
from explainerdashboard.datasets import titanic_survive, titanic_names

X_train, y_train, X_test, y_test = titanic_survive()
explainer = ClassifierExplainer(RandomForestClassifier().fit(X_train, y_train), X_test, y_test, 
                                cats=['Sex', 'Deck', 'Embarked'])
ExplainerDashboard(explainer).run()
0reactions
hugocoolcommented, May 16, 2021

Hi @oegedijk , it definitely works!

many thanks!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Callback error updating plot-div.children (Plotly Dash)
I tried it and it works. The question is "why?'. (I have used this technique before without a problem) I added event_df to...
Read more >
Callback error updating plot-div.children - Dash Python
Basically, I am trying to store intermediate value in a hidden div 'data-storage-json', but I am unable to use it - the callback...
Read more >
The Dash Callback - Input, Output, State, and more - YouTube
The Callback is the most important element in Dash. You need to know it so you can create interactive dashboard apps.
Read more >
Plotly-Dash error - Google Groups
Hi Guys,. I'm getting an error while executing the code...Please help me if anyone is aware of dash and plotly.
Read more >
Callback initialization with None vs default properties #468
Through this analysis, I've come to the conclusion that plotly/dash-renderer#81 isn't a complete solution to the underlying issues and ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found