Links don't work with %tensorboard in Colab
Internal links don't seem to work when using the embedded tensorboard profiler with Colab. For example, the graph viewer link from the trace viewer opens a new tab to the profile overview page (this might be useful itself, but the links in the new tab also don't work). Presumably it should open the graph viewer within the iframe.
Example: https://colab.research.google.com/drive/1aGvUY_jc4JVltoU9HeirQnN1kVvVyiB8?usp=sharing
Hi Skye, There are changes being made in Tensorboard to enable the deep link of the profiler plugin, you could try update the run environment, and it should be working with a minimum tensorboard version of 2.17.0 and stable tbp version. Also it will open a new tab in the chrome (not within the iframe), mainly to support the crosslinks more generally for cases other than colab as well.
for reference, a quick workaround would be:
!pip install tensorboard --upgrade
and restart the environment and relaunch the tensorboard with plugin.
@zzzaries Using colab linked by skye, with tensorboard and plugin version 2.19.0, I'm still seeing an issue with this. I'm actually seeing a new tab open up and a 403 error. Is this a bug on our side or tensorboard?
It could be on our side, did you check what is the address link from the graph viewer link in trace viewer? It supposed to open a new tab for tenserboard with profile hash + tool navigation query params embedded. Because the plugin was in the iframe, it could be the colab has a different arrangement compared to launching a local tensorboard directly. I remember fixing something relative, will double check on this.
The 403 error happens when we run the profiler in a colab with the tensorboard magic line, because the plugin is rendered in an iframe in the Colab output cell, and the content is sandboxed for security concerns.
Unfortunately the problem cannot be solved in the xprof code since we are not aware of the sandbox environment and don't have control over it. But we should be able to see the rerouted content by opening it under the same colab sandbox: So instead of click on the link directly, we can do this:
- (Assuming we are on Op Profile page and see the Graph Viewer link there) Right click to copy the link
- Run the following code in a new code cell:
import IPython
IPython.display.IFrame(src=<paste the link here>), width=900, height=600
and we should be able to see the graph viewer page.