Captum: Captum Insights not working in Google Colab

Created on 11 Oct 2019  路  9Comments  路  Source: pytorch/captum

When trying to run the Getting started with Captum Insights tutorial in a Google Colab notebook, I stumbled upon the following issue: When calling visualizer.render(debug=False), the result looks like in the screenshot below.

Screenshot 2019-10-11 at 21 05 48

The reason for this behavior is that Captum's render() method does not redirect requests as e.g. shown in TensorBoard's _display_colab() method. While the current implementation works fine with regular IPython notebooks, Colab requires some additional tweaks as described in the TensorBoard code.

Do you have any plans to support Colab or is this even a priority? If no one is already working on this, I could make a PR adding some code similar to TensorBoard as a proof of concept.

bug insights triaged

Most helpful comment

@J0Nreynolds is going to investigate here as well.

All 9 comments

Hi @floscha , thank you so much for posting the issue. Google Colab notebook support would be great! We haven't had time to look into it. cc: @edward-io

Feel free to give it a shot and send in a PR. Thanks!

This would be excellent! I wonder if this is also the issue seen in SageMaker at https://github.com/pytorch/captum/issues/138 . @edward-io and @J0Nreynolds, thoughts?

@J0Nreynolds is going to investigate here as well.

This will be essential for all remote work beyond Colab, too, e.g. if running a jupyter lab server on a remote cluster.

@eburling master should be working in remote Jupyter deployments after #124 , Colab has some special requirements. Let us know if its giving you issues.

A fix allowing Captum Insights to run in Colab notebooks will be merged soon: https://github.com/pytorch/captum/pull/255

Thanks @floscha for showing us TensorBoard's _display_colab method as a reference. The fix was very similar to that.

Great job @J0Nreynolds!

@floscha , @J0Nreynolds if this is merged and working, can we close the issue ?

Was this page helpful?
0 / 5 - 0 ratings

Related issues

AvantiShri picture AvantiShri  路  5Comments

gkakogeorgiou picture gkakogeorgiou  路  3Comments

asalimih picture asalimih  路  5Comments

elboyran picture elboyran  路  5Comments

rmcavoy picture rmcavoy  路  4Comments