# %tensorboard line magic in Jupyter Notebook app

**URL:** <https://discourse.openondemand.org/t/tensorboard-line-magic-in-jupyter-notebook-app/3104>\
**Category:** Get Help\
**Tags:** question\
**Created:** [November 17, 2023, 5:44pm UTC](https://discourse.openondemand.org/t/tensorboard-line-magic-in-jupyter-notebook-app/3104 "2023-11-17T17:44:42Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![RonRahaman](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/ronrahaman/32/1031_2.png) [@RonRahaman](https://discourse.openondemand.org/u/RonRahaman)\
**Post date:** [November 17, 2023, 5:44pm UTC](https://discourse.openondemand.org/t/tensorboard-line-magic-in-jupyter-notebook-app/3104/1 "2023-11-17T17:44:42Z")

</div>

Has anyone been able to use the `%tensorboard` line magic in their Jupyter Notebook app?

When I try it using an example notebook ( [Get started with TensorBoard &nbsp;|&nbsp; TensorFlow](https://www.tensorflow.org/tensorboard/get_started#using_tensorboard_with_keras_modelfit) ), I get a timeout. See the screenshot below. I used the `--port 0` option to let tensorboard find an unused port on its own.

Using the same tensorboard installation and the same notebook, I’m able to get it working in an Interactive Desktop session. In that case, I start the notebook in a terminal in the desktop session. However, it’s not as convenient as I would like.

 ![Screen Shot 2023-11-17 at 11.27.59 AM](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/e/e1ba4c9d59a25bd0631c0477ce2c21c7324ebf88.png)

---

<div class="post-metadata">

**Author:** ![hrandquist](https://sea1.discourse-cdn.com/flex015/user_avatar/discourse.openondemand.org/hrandquist/32/2536_2.png) [@hrandquist](https://discourse.openondemand.org/u/hrandquist)\
**Post date:** [November 17, 2023, 7:31pm UTC](https://discourse.openondemand.org/t/tensorboard-line-magic-in-jupyter-notebook-app/3104/2 "2023-11-17T19:31:57Z")

</div>

This is timing out because tensorboard isn’t aware of the proxying we do through Apache. It looks like this might be solvable through [GitHub - jupyterhub/jupyter-server-proxy: Jupyter notebook server extension to proxy web services.](https://github.com/jupyterhub/jupyter-server-proxy) - it looks like tensborboard has support for this problem as detailed in this PR: [Support jupyter-server-proxy (and other proxies) by zac-hopkinson · Pull Request #3674 · tensorflow/tensorboard · GitHub](https://github.com/tensorflow/tensorboard/pull/3674).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/flex015/uploads/osc/original/2X/b/bae70bd0ed39a3ae769c2108155f4cb3e9da8385.png) [@system](https://discourse.openondemand.org/u/system)\
**Post date:** [May 15, 2024, 7:32pm UTC](https://discourse.openondemand.org/t/tensorboard-line-magic-in-jupyter-notebook-app/3104/3 "2024-05-15T19:32:31Z")

</div>

Closed on May 15, 2024, 7:32pm UTC

This topic was automatically closed 180 days after the last reply. New replies are no longer allowed.
