About why jupyter_tensorboard=0.1.8 and tensorboard>=1.12 are incompatible
See original GitHub issueAbout
I debugged an issue I got with the jupyter-tensorboard plugin.
Versions
$ pip list | grep tensor
jupyter-tensorboard 0.1.8
tensorboard 1.12.0
tensorflow 1.12.0
Error
[E 2018-12-21 16:09:55.174 SingleUserLabApp web:1670] Uncaught exception POST /user/erik.sundell/api/tensorboard?1545408595205 (10.132.0.6)
HTTPServerRequest(protocol='https', host='jupyter.allting.com', method='POST', uri='/user/erik.sundell/api/tensorboard?1545408595205', version='HTTP/1.1', remote_ip='10.132.0.6')
Traceback (most recent call last):
File "/opt/conda/lib/python3.6/site-packages/tornado/web.py", line 1590, in _execute
result = method(*self.path_args, **self.path_kwargs)
File "/opt/conda/lib/python3.6/site-packages/tornado/web.py", line 3006, in wrapper
return method(self, *args, **kwargs)
File "/opt/conda/lib/python3.6/site-packages/jupyter_tensorboard/api_handlers.py", line 36, in post
.new_instance(data["logdir"], reload_interval=reload_interval)
File "/opt/conda/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 137, in new_instance
purge_orphaned_data=purge_orphaned_data)
File "/opt/conda/lib/python3.6/site-packages/jupyter_tensorboard/tensorboard_manager.py", line 35, in create_tb_app
tensorboard.assets_zip_provider)
File "/opt/conda/lib/python3.6/site-packages/tensorboard/backend/application.py", line 158, in standard_tensorboard_wsgi
reload_task)
TypeError: TensorBoardWSGIApp() takes from 4 to 5 positional arguments but 6 were given
Hypothesis
This repo is overriding a function called TensorBoardWSGIApp
in the application class imported from tensorboard
, this can be seen below (notice the scroll wheel).
But when the internal methods of tensorboard.application
runs, such as the standard_tensorboard_wsgi
method, it results in an error as it is passing 6 arguments as would make sense with their new function signature, see:
return TensorBoardWSGIApp(flags.logdir, plugins, loading_multiplexer,
reload_interval, flags.path_prefix,
reload_task)
def TensorBoardWSGIApp(logdir, plugins, multiplexer, reload_interval,
path_prefix='', reload_task='auto'):
Solution idea
We investigate if it is enough to simply add the missing reload_task='auto'
to the function signature we define and override the old one with.
Preliminary investigation
jupyter-tensorboard - currently not matching tensorboard as it should
tensorboard
def TensorBoardWSGIApp(logdir, plugins, multiplexer, reload_interval, path_prefix=""):
path_to_run = parse_event_files_spec(logdir)
if reload_interval >= 0:
# We either reload the multiplexer once when TensorBoard starts up, or we
# continuously reload the multiplexer.
start_reloading_multiplexer(multiplexer, path_to_run, reload_interval, reload_task)
return TensorBoardWSGI(plugins, path_prefix)
Conclusion
Adding reload_task
to the TensorBoardWSGIApp
function signature, add passing it forward to start_reloading_multiplexer
as the last argument would resolve this issue.
UPDATE: Okay, I need to iterate as we have apparently also overridden start_reloading_multiplexer
.
Action
~Creating a PR to fix it.~
UPDATE: This was not a as easy I had hoped, I need more experience with these repositories to continue - but lack the time to invest in it. Anyhow. We are calling application.reload_multiplexer
from start_reloading_multiplexer
but that isn’t available since this commit that is part of the 1.12.0 release of tensorboard
.
Current status
The jupyter-tensorboard
package requires tensorboard(-gpu)<1.12
as far as I understand.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:1
- Comments:6 (1 by maintainers)
Top GitHub Comments
I have the same problem; is this package going to be updated anytime soon?
jupyter-tensorboard 0.1.9 has tf 1.2 support, please upgrade via
pip install -U jupyter-tensorboard