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.

About why jupyter_tensorboard=0.1.8 and tensorboard>=1.12 are incompatible

See original GitHub issue

About

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).

https://github.com/lspvic/jupyter_tensorboard/blob/bb33ce64098dcb6de2833af4003f4696fd360fb6/jupyter_tensorboard/tensorboard_manager.py#L100-L114

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

https://github.com/lspvic/jupyter_tensorboard/blob/bb33ce64098dcb6de2833af4003f4696fd360fb6/jupyter_tensorboard/tensorboard_manager.py#L100-L114

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:closed
  • Created 5 years ago
  • Reactions:1
  • Comments:6 (1 by maintainers)

github_iconTop GitHub Comments

3reactions
asianzhangcommented, Jan 1, 2019

I have the same problem; is this package going to be updated anytime soon?

1reaction
lspviccommented, Feb 2, 2019

jupyter-tensorboard 0.1.9 has tf 1.2 support, please upgrade via pip install -U jupyter-tensorboard

Read more comments on GitHub >

github_iconTop Results From Across the Web

tensorflow 1.8.0 has requirement tensorboard<1.9.0 ... - GitHub
tensorflow 1.8.0 has requirement tensorboard<1.9.0,>=1.8.0, but you'll have tensorboard 1.6.0 which is incompatible. #1255.
Read more >
incompatible numpy and html5lib for tensorflow - Stack Overflow
The error showing up because. installing lxml require installing numpy-1.11.0; tensorflow (already installed) require numpy>=1.13.3 (already installed).
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