jupyterlab_tensorboard icon indicating copy to clipboard operation
jupyterlab_tensorboard copied to clipboard

[Solution] 500 Internal Server Error due to tensorboard update

Open NanoCode012 opened this issue 4 years ago • 9 comments

Some info redacted.

Uncaught exception POST /api/tensorboard?XXXX
    HTTPServerRequest(protocol='http', host='', method='POST', uri='/api/tensorboard?XXXX', version='HTTP/1.1', remote_ip='')
    Traceback (most recent call last):
      File "/opt/conda/lib/python3.6/site-packages/tornado/web.py", line 1701, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "/opt/conda/lib/python3.6/site-packages/tornado/web.py", line 3178, in wrapper
        return method(self, *args, **kwargs)
      File "/opt/conda/lib/python3.6/site-packages/jupyter_tensorboard/api_handlers.py", line 40, in post
        .new_instance(data["logdir"], reload_interval=reload_interval)
      File "/opt/conda/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 221, in new_instance
        purge_orphaned_data=purge_orphaned_data)
      File "/opt/conda/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 44, in create_tb_app
        return application.standard_tensorboard_wsgi(
    AttributeError: module 'tensorboard.backend.application' has no attribute 'standard_tensorboard_wsgi'

After some digging around, latest version of tensorboard does not have that attribute in error above: https://github.com/tensorflow/tensorboard/blob/master/tensorboard/backend/application.py

The latest one I saw was tensorboard==2.2

https://github.com/tensorflow/tensorboard/blob/2.2/tensorboard/backend/application.py .

Simple solution would be to tell users to pip install tensorboard==2.2.

NanoCode012 avatar Aug 23 '20 08:08 NanoCode012

Its due to this PR https://github.com/tensorflow/tensorboard/pull/3643

RW21 avatar Sep 25 '20 12:09 RW21

We fixed the serverside extension in the main branch https://github.com/InfuseAI/jupyter_tensorboard

However, the frontend requests to the incorrect path after tf 2.3 : image

qrtt1 avatar Nov 30 '20 03:11 qrtt1

any update on this one? is it solved yet?

rragundez avatar Dec 05 '20 05:12 rragundez

I had to patch jupyter_tensorboard to run with tf 2.3.x: https://github.com/drykovanov/jupyter_tensorboard/tree/tf230

drykovanov avatar Dec 14 '20 09:12 drykovanov

so how do I install it @drykovanov ?

rragundez avatar Dec 21 '20 18:12 rragundez

ping @drykovanov

rragundez avatar Jan 06 '21 06:01 rragundez

so how do I install it @drykovanov ?

Hi @rragundez , you can just checkout the patched branch and pip install . in the jupyter_tensorboard directory.

drykovanov avatar Jan 07 '21 09:01 drykovanov

Are the new patches going to be merged into this branch?

RW21 avatar Jan 14 '21 05:01 RW21

For me it is working correctly using the following configuration (with TensorFlow 2.4.1 installed):

# Keep compatibility with jupyterlab_tensorboard
# jupyterlab==2.2.9 < 3.x
pip install jupyterlab==2.2.9 jupyterlab_widgets ipywidgets

# Tensorboard
pip install tensorboard==2.4.1 tensorboard_plugin_profile jupyter-tensorboard==0.2.0
jupyter labextension install jupyterlab_tensorboard --no-build

jupyter lab clean
jupyter lab build

jupyter labextension list

MonsieurBorges avatar Mar 15 '21 18:03 MonsieurBorges