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
how to graph without spinning a local web-server #52
Comments
Hi @jyipks - thanks for the issue, There's two ways as mentioned. For the first where the web server needs to be spun up but at a specific address there's this: from interpret import set_show_addr
set_show_addr(('127.0.0.1', 7001))
show(explanation) # Will run on 127.0.0.1/localhost at port 7001 However if you don't want to spin up the web server at all, you won't get the dashboard but you can still plot the graphs with the # Replace show with the preserve.
ebm_global = ebm.explain_global(name='EBM')
# show(ebm_global)
from interpret import preserve
# preserve(ebm_global, 'Age', file_name='global-age-graph.html')
preserve(ebm_global, 'Age') Currently |
Is it possible to retrieve the "Summary" page? For example, without needing to specify column name:
|
Just a note, preserve also allows locating via the index besides the column name. Especially useful for local interpretations
|
@interpret-ml has this issue been fixed yet? |
Hi @trungngv, We do have a better workaround than the preserve method. If you run the following code at the top of your notebook: from interpret.provider import InlineProvider
from interpret import set_visualize_provider
set_visualize_provider(InlineProvider()) Interpret will start rendering visualizations in Javascript, and embed them directly in the notebook (without needing to spin up a local server). You can then use the ebm_global = ebm.explain_global()
show(ebm_global) # Works without a web server if set_visualize_provider() was run earlier Please let us know if this works for you! -InterpretML Team |
I attempted this on version 0.1.19 and I got the following, am I missing something? |
Hi @jyipks, That's interesting. Can you try the following? pip uninstall interpret
pip uninstall interpret-core and then run pip install interpret Effectively reinstalling the interpret library. We've seen this in rare cases where upgrading interpret from older versions can cause issues. |
@interpret-ml yes, thanks for the for quick fix. This is working for me now except a separate issue related to IOpub data rate, which seems to be due to dash. This stackoverflow question has the fix: |
Hi @trungngv -- Great to hear it's working, and it looks like the other issue is resolved per the stackoverflow thread. -InterpretML team |
Is this API available yet? We cant seem to plot it locally with plotly offline.
Hi @dfrankow, thanks for the issue! We're just about to introduce a few new API changes that should make this easier in our next release. One, we'll let you specify a port in the show method, so that you can pick your own port that you know is open. Second, we'll introduce a new function that doesn't spin up the local web-server, and directly uses plotly to visualize it. For now, here are a few notes:
visualize() does return a plotly object, and you can use plotly.offline so that you don't need an api key. And yes, if you pass in a key to visualize() , you can get a specific graph back out!
If you run this code at the top of your notebook:
you can then use "iplot(plotly_figure)" in your notebook to get a direct plotly graph. We'll have a nicer API around this soon!
Originally posted by @interpret-ml in #1 (comment)
The text was updated successfully, but these errors were encountered: