Tensorboard Integration for Jupyter Notebook.
A jupyter server extension for better collaboration between jupyter notebook and tensorboard (a visualization tool for tensorflow), providing graphical user interface for tensorboard start, manage and stop in jupyter interface. It provides:
Be sure that tensorflow(-gpu)>=1.3.0 has been installed. If not, you should install or upgrade your tensorflow>=1.3.0 first, and tensorboard is a dependency of tensorflow so that it is automatically installed. This package does not have a tensorflow dependency because there are several distributions of tensorflow, for example, tensorflow and tensorflow-gpu. Any way, you must be sure you have tensorflow(-gpu) installed before install this package.
Install the pip package. The python version must be the same as Jupyter: if you start jupyter notebook in python3, pip3
may be used to install the package
pip(3) install jupyter-tensorboard
NOTE:
The python version is important, you must be sure that your jupyter, jupyter_tensorboard, tensorflow have the same python version. If your tensorflow python and jupyter python versions are different, e.g., use tensorflow in py2 but jupyter starts in py3, both versions of tensorflow(py2 and py3) should be installed, and jupyter_tensorboard should install to py3, in accordance with jupyter.
Restart the jupyter notebook server.
Docker image for Jupyter Notebook Scientific Python Stack + Tensorflow + Tensorboard
is available, just with the command:
docker pull lspvic/tensorboard-notebook
docker run -it --rm -p 8888:8888 lspvic/tensorboard-notebook
Jupyter notebook with tensorboard integrated is now available in http://localhost:8888 , details are in docker/README.md.
Once jupyter_tensorboard is installed and enabled, and your notebook server has been restarted, you should be able to find the interfaces to manage tensorboard instances.
tensorboard
button will be presented. Click the button, a new browser tab will be opened to show the tensorboard interface with the proposed directory as logdir.tensorboard
menu in new
and a new tensorboard instance is started with current directory as logdir.running
tab, a list of tensorboard instances are showed. Managing operations such as browsing, navigating, shutdown can be found here.http://jupyter-host/tensorboard/<name>/
with the instance names increasing from 1.To purge the installation of the extension, there are a few steps to execute:
jupyter tensorboard disable --user
pip uninstall jupyter-tensorboard
or if you have uninstall the pip package, but the extension seems to be not purged, you can execute:
jupyter serverextension disable jupyter_tensorboard --user
jupyter nbextension disable jupyter_tensorboard/tree --user
jupyter nbextension uninstall jupyter_tensorboard --user
The commands accept the same flags as the jupyter serverextension
command provided by notebook versions, including --system
to enable(or disable) in system-wide config, or --sys-prefix
to enable(or disable) in config files inside python's sys.prefix
, such as for a virtual environment.
If you encounter problems with this server extension, you can:
pip list|grep tensor
, you should see at least three lines, jupyter-tensorboard
, tensorflow
and tensorflow-tensorboard
(or tensorboard
). And also, check that tensorflow
version is >=1.3.pip list|grep notebook
, you shold see notebook
package.jupyter tensorboard enable --user
. The step should be performed in the installation process, however, in some cases it seems that the command is not executed.Thanks all the contributors and others for making significant contributions (report bugs, fix bugs, make enhancements, etc).
一、基本方法 这里主要是通过ssh端口转发的方式实现。 二、服务器端启动服务 nohup jupyter-notebook --notebook-dir <notebook data dir> --no-browser --port <jupyter port> --ip <server ip> > jupyter.log 2>&1 & 三、建立ssh隧道 nohup ssh -i <privat
失败一:在jupyter使用并显示tensorboard,虽然可以更新,但是每次需要清空logs文件夹里的内容(可能是重名了) 失败二:给出的网址http://localhost:6006/ 在Microsoft Edge浏览器里不能自动更新 成功:先定位到logs文件,然后在谷歌浏览器打开命令终端给出的网址 1、首先进入含有logs文件夹的那个大文件夹,然后在上面win+R进入命令终端 2、输入
文章来源 | 恒源云社区 原文地址 | 【小技巧-工具篇】 1、JupyterLab/TensorBoard 如何使用? 可参考JupyterLab文档、TensorBoard文档。 2、JupyterLab打不开或者响应慢怎么办? 如果遇到JupyterLab页面响应特别缓慢或者打不开的情况,可登录实例后通过以下命令来重启JupyterLab supervisorctl restart jupy
环境: tensorflow2.0 jupyter notebook unbuntu18.04(这个应该影响不大) 示例: 用的是iris数据集分类,该数据集库自带。 import tensorflow as tf import numpy as np from sklearn.datasets import load_iris data = load_iris() iris_target =
解决tensorboad 在windows下的Jupyter中 使用的问题。 问题一:解决jupyter中无法绘制动态图的问题。 %pylab 在Jupyter中输入上述命令,获取jupyter的内置画图工具。我的结果是TkAgg / 也可能为Qt5Agg类似。 之后加一句命令: %matplotlib tk 就可以在生成额外的画图窗口。类似matlab中画图生成新窗口一样。 本命了和%m
基本做法就是通过ssh建立主机和服务器之间的隧道,然后把服务器当地的端口转发到主机。 值得注意的是ssh尤其是开放端口的ssh存在安全风险,使用需谨慎。 建立SSH隧道 关于ssh的应用可以参考ssh -D -L -R 差异。(这篇文章里的host1可以看作客户端,host2看作服务器,host3是中间转接主机3) 主要困难在于服务器位于内网,外网客户端不可见。客户端分两种情况,分别是客户端位于内