Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

--host does not work anymore #5648

Closed
Daniel-01 opened this issue Apr 4, 2022 · 7 comments
Closed

--host does not work anymore #5648

Daniel-01 opened this issue Apr 4, 2022 · 7 comments

Comments

@Daniel-01
Copy link

Issue description

Using Tensorboard 2.8.0:

tensorboard --logdir my_dir --host 0.0.0.0
TensorFlow installation not found - running with reduced feature set.
Error: Must not specify both --host and --bind_all.

Note that I did NOT specify --bind_all. Yet it complains that I have done so.
The above command works fins in tensorboard 2.5.0 and was the most convinent way to make the board accessible from a remote computer.

@bileschi
Copy link
Collaborator

bileschi commented Apr 5, 2022

Sorry for the trouble:
Tried to reproduce locally and the command appears to work for me. Both in clean venv with 2.8.0 and at HEAD

$ tensorboard --logdir ~/tensorboard-logdirs/scalars_demo --host 0.0.0.0
...
NOTE: Using experimental fast data loading logic. To disable, pass
    "--load_fast=false" and report issues on GitHub. More details:
    https://github.com/tensorflow/tensorboard/issues/4784

TensorBoard 2.8.0 at http://0.0.0.0:6006/ (Press CTRL+C to quit)

Is it possible that your shell is somehow adding the --bind_all arg?

Can you try the following in a clean virtual env

make a clean virtual env:

$ deactivate
$ python3 -m venv /tmp/tb-venv
$ pip3 install tensorboard

Test the fresh TensorBoard install

$ tensorboard --version
$ tensorboard --logdir my_dir --host 0.0.0.0

@Daniel-01
Copy link
Author

Yes, that works.
Must be something weird in the docker l am using: nvcr.io/nvidia/pytorch:22.01-py3
Maybe Nvidia adds --bind_all automatically somehow?
Sorry for the false alarm.

@bileschi
Copy link
Collaborator

bileschi commented Apr 5, 2022

No worries! Glad you're back into a working state. Closing the issue for now, please reopen if this is not actually complete.

@bileschi bileschi closed this as completed Apr 5, 2022
@huxuan
Copy link

huxuan commented Jun 10, 2022

For folks using the nvidia NGC Pytorch docker image, the source code of the built-in tensorboard seems to be changed by some reason. The following sed command will revert the inconsistent behavior.

sed -i "s/\"--bind_all\", default=True,/\"--bind_all\",/g" /opt/conda/lib/python3.8/site-packages/tensorboard/plugins/core/core_plugin.py

@guunergooner
Copy link

  • I followed @huxuan suggestion and modified the default parameters of bind_all to solve this problem
root@localhost:~$ pip show tensorboard
Name: tensorboard
Version: 2.9.0
Summary: TensorBoard lets you watch Tensors Flow
Home-page: https://github.com/tensorflow/tensorboard
Author: Google Inc.
Author-email: packages@tensorflow.org
License: Apache 2.0
Location: /usr/local/lib/python3.8/dist-packages
Requires: absl-py, google-auth, google-auth-oauthlib, grpcio, markdown, numpy, protobuf, requests, setuptools, tensorboard-data-server, tensorboard-plugin-wit, werkzeug, wheel
Required-by: tensorflow

root@localhost:~$ tensorboard --version
2.9.0

root@localhost:~$ grep bind_all /usr/local/lib/python3.8/dist-packages/tensorboard/plugins/core/core_plugin.py
            default=None,  # like localhost, but prints a note about `--bind_all`
network on both IPv4 and IPv6, see `--bind_all`, with which this option is
            "--bind_all", default=False,
        elif flags.host is not None and flags.bind_all:
            raise FlagsError("Must not specify both --host and --bind_all.")

@aisensiy
Copy link

aisensiy commented Aug 4, 2023

No one is trying to fix this? I have to sed it myself??

@bileschi
Copy link
Collaborator

bileschi commented Aug 8, 2023

Is this an actual issue with TensorBoard, or is it an issue with some vended version of TensorBoard?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants