-
Notifications
You must be signed in to change notification settings - Fork 738
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
Use graphs in a Jupyter notebook? #1
Comments
I think I answered my question. Looks like But, when I try to plot it, there is an error saying I need a Plotly account:
I made an account, and started reading the docs. The getting-started section said to init with
where the API key is at https://plot.ly/settings/api. Then I could display the plot. |
So I think I'm good. |
However, for my regression example that just shows a feature-importance graph, which is different from the learned score function in your graph. So, it would be useful to list out which graphs can be generated this way, and how. I'll keep digging. |
Looks like I can get at features with the 'key' parameter of
|
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! |
Magic, thank you! |
@interpret-ml Thanks for this update. I had a similar error with |
Hi Everyone, Our latest fix (in master and on PyPi -- v0.1.0) should now address this problem. To set a specific ip/port pair, you can use the following new functions before you call show():
set_show_addr takes in a tuple of (ip address, port number), and will have future visualizations run off of the specified port. get_show_addr returns the current ip/port pair being used by the package. Re-opening this issue to enable discussion around this. If anyone else is having problems with the new method, please reply here or react to this comment. Thanks! |
I tried to run without Jupyter. when ebm_global = ebm.explain_global() cannot visit my public IP by browser (error by ERR_CONNECTION_TIMED_OUT ). |
@huangwei2013 Thanks for reporting this! We tried on both Ubuntu and Windows machines, and public IP addresses seemed to bind fine for us. Is there a chance it's a port forwarding/firewall issue? Regarding wget: wget will only return a static html page, and won't execute the Javascript which is required for our visualizations. One note of caution for anyone reading this: accessing the ip address/port directly at root (ex: http://127.0.0.1:7777) currently does not work. All visualizations are hosted at a designated URL path (ex: http://127.0.0.1:7777/123456). Console prints should have the full URL, and we're looking into making this more accessible. |
@p9anand This issue might be a bit more difficult to reproduce since it's on a specific environment, which we don't have immediate access to. It might take a bit longer to debug, but we're looking into it and we'll keep you in the loop. |
iptables is clean sysinfo:(vm from Aliyun) output for ‘show(ebm_global)’: |
Just to confirm, when you load this url in a browser (src of the iframe in the show method): http://127.0.0.1:7001/139629491858848/ You get a page that says "Loading..." which doesn't update further? |
I run on a server without GUI,so just visit by wget . No sure of what will happen later ... |
Thx @BrainMiner , I get the pic |
@huangwei2013 can you try the following to verify that there are no firewalls between the machine with InterpretML and the machine with the browser. On the server:
On the client, go to: If you don't see "Hello World", then most likely there is a firewall somewhere along the chain between the machines. |
@interpret-ml |
I have used above methods but issue still persists. It shows blank running after below commands
Am I doing anything wrong? |
Thanks for this library.
I'm following along with the README.md and got to:
When I run that in my Jupyter notebook I get:
RuntimeError: Could not find open port
.Maybe it's trying to run a web server from a notebook?
Can I just make the individual graphs in the notebook? How?
I see functions in
interpret.visual.plot
, but I'm having a bit of trouble finding the right objects to pass to it.The text was updated successfully, but these errors were encountered: