chesterli29 / jupyterlab_tensorboard

Tensorboard extension for jupyterlab.
MIT License
315 stars 36 forks source link

[Solution] 500 Internal Server Error due to tensorboard update #25

Open NanoCode012 opened 4 years ago

NanoCode012 commented 4 years ago

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.

RW21 commented 4 years ago

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

qrtt1 commented 3 years ago

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

rragundez commented 3 years ago

any update on this one? is it solved yet?

drykovanov commented 3 years ago

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

rragundez commented 3 years ago

so how do I install it @drykovanov ?

rragundez commented 3 years ago

ping @drykovanov

drykovanov commented 3 years ago

so how do I install it @drykovanov ?

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

RW21 commented 3 years ago

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

monsieurborges commented 3 years ago

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