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

Running on Google Cloud found : No module named tensorflow.tensorboard #392

Closed
paweeda opened this issue Aug 21, 2017 · 6 comments
Closed

Comments

@paweeda
Copy link

paweeda commented Aug 21, 2017

I've followed this sample https://cloud.google.com/ml-engine/docs/how-tos/getting-started-training-prediction by running python -m tensorflow.tensorboard --logdir=$MODEL_DIR --port=8080.
I have got this error : /usr/bin/python: No module named tensorflow.tensorboard
How should I do? I can't find any solution via google.

@wchargin
Copy link
Contributor

wchargin commented Aug 21, 2017

Could you try using python -m tensorboard --logdir "${MODEL_DIR}" --port 8080 instead? I suspect that this will fix your issue.

(As of TensorFlow 1.3, TensorBoard code is available as tensorboard.* instead of tensorflow.tensorboard.*.)

Please let us know if this fixes the issue, so that we can update the docs.

@paweeda
Copy link
Author

paweeda commented Aug 21, 2017

It doesn't work. It return error as :
/usr/bin/python: No module named tensorboard.main; 'tensorboard' is a package and cannot be directly executed

@wchargin
Copy link
Contributor

Sorry, my mistake—I should have written tensorboard.main instead of TensorBoard:

python -m tensorboard.main --logdir "${MODEL_DIR}" --port 8080

Does this work?

@paweeda
Copy link
Author

paweeda commented Aug 22, 2017

It return this error :
veeda_ch@cloudshell:~/cloudml-samples-master/census/estimator$ python -m tensorboard.main --logdir=output --port=8080
W0822 08:46:38.819151 Reloader event_accumulator.py:303] Found more than one graph event per run, or there was a metagraph containing a graph_def, as well as one or more gra
ph events. Overwriting the graph with the newest event.
W0822 08:46:38.859276 Reloader event_accumulator.py:311] Found more than one metagraph event per run. Overwriting the metagraph with the newest event.
W0822 08:46:38.862222 Reloader event_accumulator.py:303] Found more than one graph event per run, or there was a metagraph containing a graph_def, as well as one or more gra
ph events. Overwriting the graph with the newest event.
W0822 08:46:38.863882 Reloader event_accumulator.py:311] Found more than one metagraph event per run. Overwriting the metagraph with the newest event.
W0822 08:46:39.038057 Reloader event_accumulator.py:303] Found more than one graph event per run, or there was a metagraph containing a graph_def, as well as one or more gra
ph events. Overwriting the graph with the newest event.
W0822 08:46:39.055238 Reloader event_accumulator.py:311] Found more than one metagraph event per run. Overwriting the metagraph with the newest event.
TensorBoard 0.1.4 at http://cs-6000-devshell-vm-65897b58-a94a-4403-9d60-b8a53e9b855c-4f:8080 (Press CTRL+C to quit) ^C

@wchargin
Copy link
Contributor

Right, okay. So TensorBoard is working properly, but you have bad data. It looks like you wrote multiple TensorBoard runs into the same directory, with something like

$ cat my_script.py
import tensorflow as tf
writer = tf.summary.FileWriter("./output")
summary = tf.summary.scalar(321.0)
with tf.Session() as sess:
  writer.add_graph(sess.graph)
  writer.add_summary(sess.run(summary))
writer.close()
$ python my_script.py
$ python my_script.py  # now you have conflicting data!!

TensorBoard is behaving as expected. The easiest way to resolve this is to ensure that you are writing to distinct directories with each FileWriter. If you're careful, you can ensure the looser condition that across all FileWriters for a single directory you only call add_graph once, and each time you call add_summary you pass a globally unique value for global_step.

@chihuahua can close this

@ranjiewwen
Copy link

  • although i use can launch tensorboard 'python -m tensorboard.main --logdir "${MODEL_DIR}" --port 8080'

  • but i meet another proble: it load file failed

  • and the flie is in the exist

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

4 participants