interpretml / interpret

Fit interpretable models. Explain blackbox machine learning.
https://interpret.ml/docs
MIT License
6.22k stars 726 forks source link

show(ebm_local) doesn't show anything #282

Closed yliyanage closed 2 years ago

yliyanage commented 3 years ago

I am trying to get local explanations. I am getting this user-warning and it is not showing anything on the Jupyter lab cell.

ebm = ExplainableBoostingClassifier() ebm.fit(Xtrain, Ytrain) ebm_local = ebm.explain_local(Xtest, Ytest) show(ebm_local)

--/miniconda3/envs/py3/lib/python3.7/site-packages/interpret/visual/udash.py:5: UserWarning: The dash_html_components package is deprecated. Please replace import dash_html_components as html with from dash import html import dash_html_components as html --/miniconda3/envs/py3/lib/python3.7/site-packages/interpret/visual/udash.py:6: UserWarning: The dash_core_components package is deprecated. Please replace import dash_core_components as dcc with from dash import dcc import dash_core_components as dcc --/miniconda3/envs/py3/lib/python3.7/site-packages/interpret/visual/udash.py:7: UserWarning: The dash_table package is deprecated. Please replace import dash_table with from dash import dash_table

Also, if you're using any of the table format helpers (e.g. Group), replace from dash_table.Format import Group with from dash.dash_table.Format import Group import dash_table as dt

dhops commented 2 years ago

I'm having the same issue. Did you figure it out?

dhops commented 2 years ago

If you use the "visualize" function, you can export the visualizations to html

for i in range(len(X_test)): ebm_local.visualize(i).write_html("graph"+str(i)+".html")

interpret-ml commented 2 years ago

Hi @yliyanage and @dhops,

Thanks for reporting this issue! We can reproduce the user warnings with the latest version of Dash and JupyterLab, but the graphs still show up beneath the warnings for us.

image

@dhops has the right idea for an alternative way to print out graphs, but it'd be better if we could figure out why show wasn't working for you as intended. Do you mind sharing a few details with us?

Thanks! -InterpretML Team

dhops commented 2 years ago

I'm not using a notebook, so that explains my problems I guess :)

yliyanage commented 2 years ago

@dhops Thank you for the suggestion! It works, but I still would like to get the table GUI in the cell.

@interpret-ml

Here are my configurations. I ma using Jupiter lab.

yliyanage commented 2 years ago

In Safari:

Screen Shot 2021-09-24 at 7 19 57 AM

In Firefox:

Screen Shot 2021-09-24 at 7 18 24 AM
interpret-ml commented 2 years ago

Just a quick update -- we're still trying to reproduce the issue of graphs not showing up.

@dhops -- Yes, unfortunately our extended visualizations are designed to work in notebook or notebook-like IPython environments.

@yliyanage -- Do you mind running the following code at the top of your Jupyter Lab to see if it works?


from interpret.provider import InlineProvider
from interpret import set_visualize_provider

set_visualize_provider(InlineProvider())

It would also help to know if your lab notebook is "Trusted". Thanks again for reporting this!

yliyanage commented 2 years ago

@interpret-ml Thanks for the update! That worked for me!!! 👍

MarMarhoun commented 1 year ago

@interpret-ml Thanks for your suggestions. However, the same issue is still occurring for the local explanations but it's working well for global explainations.

I'm using Colab.