question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

"ERROR: Timed out waiting for TensorBoard to start." on Jupyter

See original GitHub issue

Environment information (required)

OS: Windows 10 Education 1903 Python version: 3.7.4 TensorFlow version: 2.0 TensorBoard version: 2.0 Jupyter version: jupyter 1.0.0 jupyter-client 5.2.4 jupyter-console 6.0.0 jupyter-core 4.4.0 jupyterlab 1.1.4 jupyterlab-server 1.0.0

Please run diagnose_tensorboard.py (link below) in the same environment from which you normally run TensorFlow/TensorBoard, and paste the output here:

Diagnostics

Diagnostics output
--- check: autoidentify
INFO: diagnose_tensorboard.py version 4725c70c7ed724e2d1b9ba5618d7c30b957ee8a4

--- check: general
INFO: sys.version_info: sys.version_info(major=3, minor=7, micro=4, releaselevel='final', serial=0)
INFO: os.name: nt
INFO: os.uname(): N/A
INFO: sys.getwindowsversion(): sys.getwindowsversion(major=10, minor=0, build=18362, platform=2, service_pack='')

--- check: package_management
INFO: has conda-meta: False
INFO: $VIRTUAL_ENV: None

--- check: installed_packages
INFO: installed: tensorboard==2.0.0
INFO: installed: tensorflow-gpu==2.0.0
INFO: installed: tensorflow-estimator==2.0.0

--- check: tensorboard_python_version
INFO: tensorboard.version.VERSION: '2.0.0'

--- check: tensorflow_python_version
INFO: tensorflow.__version__: '2.0.0'
INFO: tensorflow.__git_version__: 'v2.0.0-rc2-26-g64c3d382ca'

--- check: tensorboard_binary_path
INFO: which tensorboard: b'C:\\Python37\\Scripts\\tensorboard.exe\r\n'

--- check: readable_fqdn
INFO: socket.getfqdn(): 'GT62VR-7RD'

--- check: stat_tensorboardinfo
INFO: directory: C:\Users\otavi\AppData\Local\Temp\.tensorboard-info
INFO: os.stat(...): os.stat_result(st_mode=16895, st_ino=8444249301749551, st_dev=3098128582, st_nlink=1, st_uid=0, st_gid=0, st_size=0, st_atime=1570466520, st_mtime=1570466520, st_ctime=1570466517)
INFO: mode: 0o40777

--- check: source_trees_without_genfiles
INFO: tensorboard_roots (1): ['C:\\Python37\\lib\\site-packages']; bad_roots (0): []

--- check: full_pip_freeze
INFO: pip freeze --all:
absl-py==0.7.1

alembic==1.0.8

appdirs==1.4.3

astor==0.8.0

astroid==2.3.1

async-generator==1.10

atomicwrites==1.3.0

attrs==19.1.0

backcall==0.1.0

bleach==3.1.0

boto==2.49.0

boto3==1.9.220

botocore==1.12.220

certifi==2019.3.9

chardet==3.0.4

cloudpickle==0.8.0

colorama==0.4.1

colorclass==2.2.0

cycler==0.10.0

Cython==0.29.13

dask==1.1.4

decorator==4.3.2

defusedxml==0.5.0

doc8==0.8.0

docutils==0.15.2

entrypoints==0.3

gast==0.2.2

gensim==3.8.1

google-pasta==0.1.6

graphviz==0.8.4

grpcio==1.21.1

h5py==2.9.0

idna==2.6

imageio==2.5.0

importlib-metadata==0.23

intel-openmp==2019.0

ipykernel==5.1.0

ipython==7.5.0

ipython-genutils==0.2.0

ipywidgets==7.4.2

isort==4.3.15

jedi==0.15.1

Jinja2==2.10

jmespath==0.9.4

joblib==0.13.2

json5==0.8.4

jsonschema==3.0.1

jupyter==1.0.0

jupyter-client==5.2.4

jupyter-console==6.0.0

jupyter-core==4.4.0

jupyterlab==1.1.4

jupyterlab-server==1.0.0

jupyterthemes==0.20.0

Keras-Applications==1.0.8

Keras-Preprocessing==1.1.0

kiwisolver==1.0.1

lazy-object-proxy==1.4.2

lesscpy==0.13.0

lib==3.0.0

Mako==1.0.7

Markdown==3.1.1

MarkupSafe==1.1.1

matplotlib==3.1.1

mccabe==0.6.1

mistune==0.8.4

mkl==2019.0

mock==3.0.5

more-itertools==7.2.0

mpmath==1.1.0

mxnet-cu100mkl==1.5.0

nbconvert==5.4.1

nbformat==4.4.0

networkx==2.3

nose==1.3.7

notebook==5.7.8

numpy==1.16.5

opencv-python==4.1.1.26

opt-einsum==3.1.0

packaging==19.1

pamela==1.0.0

pandas==0.25.1

pandocfilters==1.4.2

parso==0.5.1

pbr==5.2.0

pickleshare==0.7.5

Pillow==6.2.0

pip==19.2.3

pip-autoremove==0.9.1

pip-check==2.5.2

pip-date==1.0.3

pipdeptree==0.13.2

pluggy==0.13.0

ply==3.11

prometheus-client==0.6.0

prompt-toolkit==2.0.9

protobuf==3.8.0

py==1.8.0

pycodestyle==2.5.0

pygame==1.9.4

Pygments==2.3.1

pylint==2.4.2

pyparsing==2.3.1

pyrsistent==0.14.11

pytest==5.2.0

python-dateutil==2.8.0

python-editor==1.0.4

python-oauth2==1.1.0

pytools==2019.1

pytz==2018.9

PyWavelets==1.0.2

pywinpty==0.5.5

pyzmq==18.0.1

qtconsole==4.4.3

requests==2.18.4

restructuredtext-lint==1.3.0

s3transfer==0.2.1

scikit-image==0.15.0

scikit-learn==0.21.3

scipy==1.3.1

seaborn==0.9.0

Send2Trash==1.5.0

setuptools==41.2.0

six==1.12.0

sklearn==0.0

smart-open==1.8.4

SQLAlchemy==1.3.9

stevedore==1.30.1

sympy==1.4

tensorboard==2.0.0

tensorflow-estimator==2.0.0

tensorflow-gpu==2.0.0

termcolor==1.1.0

terminado==0.8.1

terminaltables==3.1.0

testpath==0.4.2

toolz==0.9.0

torch==1.1.0

torchvision==0.3.0

tornado==6.0.3

traitlets==4.3.2

typed-ast==1.4.0

urllib3==1.22

wcwidth==0.1.7

webencodings==0.5.1

Werkzeug==0.15.4

wget==3.2

wheel==0.33.6

widgetsnbextension==3.4.2

wrapt==1.11.1

xgboost==0.90

xlrd==1.2.0

zipp==0.6.0


Next steps

No action items identified. Please copy ALL of the above output, including the lines containing only backticks, into your GitHub issue or comment. Be sure to redact any sensitive information.

For browser-related issues, please additionally specify:

  • Browser type and version (e.g., Chrome 64.0.3282.140): Firefox Quantum 69.0.2 (64bit)
  • Screenshot, if it’s a visual issue:

Issue description

Please describe the bug as clearly as possible. How can we reproduce the problem without additional resources (including external data files and proprietary Python modules)?

Just using the code cells below (similar to what is described at tensorflow.org)

import tensorflow, datetime, os
from tensorflow.keras import applications, datasets
from sklearn import model_selection
(x_train, y_train), (x_test, y_test) = datasets.cifar10.load_data()
x_train, x_validation, y_train, y_validation = model_selection.train_test_split(x_train, y_train, test_size=0.25, random_state=42)
mobilenet = applications.MobileNet(input_shape=x_train.shape[1:], pooling="avg", classes=10, include_top=False)
mobilenet.compile(tensorflow.optimizers.Adam(learning_rate=0.001), loss="sparse_categorical_crossentropy", metrics=["accuracy"])
log_dir = os.path.join("logs", datetime.datetime.now().strftime("%Y%m%d-%H%M%S"))
tensorboard_callback = tensorflow.keras.callbacks.TensorBoard(log_dir=log_dir, histogram_freq=1)
mobilenet.fit(x_train, y_train, batch_size=128, epochs=10, validation_data=(x_validation, y_validation), callbacks=[tensorboard_callback])
%load_ext tensorboard
%tensorboard --logdir logs

Gives the output:

image

But when I go to http://localhost:6006/ the TensorBoard instance is running as seen here:

image

And the process does exist as a subprocess of the Jupyter kernel instance:

image

But it’s not shown in the Jupyter interface.

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Reactions:7
  • Comments:14 (4 by maintainers)

github_iconTop GitHub Comments

4reactions
wchargincommented, Oct 7, 2019

Sometimes this can happen if the TensorBoard process just takes more than 10 seconds to start. If you re-run the %tensorboard cell with the same arguments, it should find the existing TensorBoard and attach to it immediately. Does this work for you, or does it still give an error even when the TensorBoard process was running prior to running the cell?

0reactions
beijiguang94commented, Dec 8, 2022

We think that we may have fixed this in latest nightlies (#4300). If you’re affected by this issue, could you please uninstall all copies of TensorBoard, then install tb-nightly

pip uninstall -y tensorboard tb-nightly
pip install -U tb-nightly

—and see if this fixes the problem?

(You should run these commands from the same virtualenv that you use for Jupyter notebooks.)

Thanks. It did work for the error with Google Colab.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Cannot start tensorboard in Jupyter Notebook - Stack Overflow
But I get the following error: ERROR: Timed out waiting for TensorBoard to start. It may still be running as pid 28048.
Read more >
The server at kkb-production.jupyter-proxy.kaggle.net is taking ...
TensorBoard has been temporarily disabled because it was slowing down Jupyter notebooks boot time for all users. They said they were working on...
Read more >
Using TensorBoard in Notebooks - TensorFlow
Start by installing TF 2.0 and loading the TensorBoard notebook extension: For Jupyter users: If you've installed Jupyter and TensorBoard ...
Read more >
How to run TensorBoard in Jupyter Notebook - DLology
Start by installing TF 2.0 and loading the TensorBoard notebook extension: ... Then you can start TensorBoard before training to monitor it in...
Read more >
Using Tensorboard in Tensorflow-Keras (windows version)
... temp dir ERROR: Timed out waiting for TensorBoard to start. It may still be running as pid 6284. If it has timed...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found