Skip to content

Conversation

@orionr
Copy link
Contributor

@orionr orionr commented Apr 22, 2019

In testing TensorBoard for PyTorch in Colab I saw an error when running

# Install latest version of libraries
!pip install -q torch_nightly -f https://download.pytorch.org/whl/nightly/cpu/torch_nightly.html
!pip install -q tb-nightly

# Start colab TensorBoard instance
%load_ext tensorboard 

%tensorboard --logdir pytorch_logs

The error was

ERROR: Failed to launch TensorBoard (exited with 1).
Contents of stderr:
Traceback (most recent call last):
  File "/usr/local/bin/tensorboard", line 10, in <module>
    sys.exit(run_main())
  File "/usr/local/lib/python3.6/dist-packages/tensorboard/main.py", line 77, in run_main
    sys.exit(tensorboard.main())
  File "/usr/local/lib/python3.6/dist-packages/tensorboard/program.py", line 228, in main
    server = self._make_server()
  File "/usr/local/lib/python3.6/dist-packages/tensorboard/program.py", line 309, in _make_server
    self.assets_zip_provider)
  File "/usr/local/lib/python3.6/dist-packages/tensorboard/backend/application.py", line 153, in standard_tensorboard_wsgi
    plugin = loader.load(context)
  File "/usr/local/lib/python3.6/dist-packages/tensorboard/plugins/profile/profile_plugin_loader.py", line 57, in load
    from tensorboard.plugins.profile.profile_plugin import ProfilePlugin
  File "/usr/local/lib/python3.6/dist-packages/tensorboard/plugins/profile/profile_plugin.py", line 30, in <module>
    from tensorflow.python.eager import profiler_client
ImportError: cannot import name 'profiler_client'

A workaround is to install another version of TensorFlow like

!pip install -q tf-nightly-2.0-preview

cc @nfelt, @wchargin, @lanpa on this one.

@nfelt
Copy link
Contributor

nfelt commented Apr 22, 2019

Hmm, so there was a tensorflow installation available but the tensorflow.python.eager.profiler_client import failed? Could you share more details about the exact version of TF that was installed, e.g. the output of pip freeze?

@orionr
Copy link
Contributor Author

orionr commented Apr 22, 2019

Colab example that reproduces the issue linked below. Looks like tensorflow==1.13.1 on colab.

https://colab.research.google.com/drive/1hgR69kUw4aRwdIl8GXR3IHRX7p9mXkNM#scrollTo=9EnfwEVuZbeW

@qiuminxu
Copy link
Contributor

I think the API is available for tf-nightly, tensorflow >= 1.14 and tf-nightly-2.0-preview

@nfelt
Copy link
Contributor

nfelt commented Apr 25, 2019

@orionr It sounds like this API should be available in sufficiently recent TF versions. Perhaps we can change this import check to raise an exception like the one in #2032 for the debugger, which tells the user that TF >= 1.14 (or no TF at all) is required.

I'd be reluctant to just suppress the missing import as we have it here, because the message in the UI instructs users to "pip install tensorflow" but in this case they already have it installed. Or alternatively we could change that message just for the profile dashboard to instruct users to pip install tensorflow >= TF 1.14.

@orionr orionr force-pushed the add-profile-import-check branch from 6998123 to 03db59a Compare April 29, 2019 21:49
@orionr
Copy link
Contributor Author

orionr commented Apr 29, 2019

@nfelt added minimum version popup for the profile plugin.

Copy link
Contributor

@nfelt nfelt left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM from me. @qiuminxu does this seem reasonable to you?

@qiuminxu
Copy link
Contributor

The minimum version pop up LGTM, thanks!

@nfelt nfelt merged commit 7a45f98 into tensorflow:master Apr 30, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants