Giter Club home page Giter Club logo

Comments (9)

interpret-ml avatar interpret-ml commented on May 12, 2024 2

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 show method the exact same way as before. Ex:

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

from interpret.

interpret-ml avatar interpret-ml commented on May 12, 2024

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 preserve method as such:

# 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 preserve is a stop-gap measure, in the future we'll try to have the show method handle environments where it is either impossible or not agreeable to run a web server.

from interpret.

yulonglin avatar yulonglin commented on May 12, 2024

Is it possible to retrieve the "Summary" page?

For example, without needing to specify column name:

preserve(ebm_global)

from interpret.

yulonglin avatar yulonglin commented on May 12, 2024

Just a note, preserve also allows locating via the index besides the column name. Especially useful for local interpretations

preserve(ebm_local, 0, file_name='example0.html')

from interpret.

trungngv avatar trungngv commented on May 12, 2024

@interpret-ml has this issue been fixed yet?

from interpret.

jyipks avatar jyipks commented on May 12, 2024

I attempted this on version 0.1.19 and I got the following, am I missing something?
ModuleNotFoundError: No module named 'interpret.provider'

from interpret.

interpret-ml avatar interpret-ml commented on May 12, 2024

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.

from interpret.

trungngv avatar trungngv commented on May 12, 2024

@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:
https://stackoverflow.com/questions/43288550/iopub-data-rate-exceeded-in-jupyter-notebook-when-viewing-image

from interpret.

interpret-ml avatar interpret-ml commented on May 12, 2024

Hi @trungngv --

Great to hear it's working, and it looks like the other issue is resolved per the stackoverflow thread.

-InterpretML team

from interpret.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.