How to open TensorBoard from datalab when proxy port number indicated - tensorflow

I’m using a python notebook in gGloud datalab to re-train a neural network.
From the notebook I call retrain.py with
!python -m retrain --bottleneck_dir=../tf_files/bottlenecks --how_many_training_steps=500 --model_dir=../tf_files/models/ --summaries_dir=../tf_files/training_summaries/'mobilenet_1.0_224' --output_graph=../tf_files/retrained_graph.pb --output_labels=../tf_files/retrained_labels.txt --architecture='mobilenet_1.0_224' --image_dir=../tf_files/flower_photos
Within retrain.py I import the Tensorboard with
from google.datalab.ml import TensorBoard as tb
followed by the main function that does a bunch of things for the training process followed by:
inti=tf.global_variables_initializer()
sess.run(init)
tb.start('./tmp/retrain_logs’)
Executing retrain.py, a neural network will be trained, and TensorBoard will be activated (as stated in the output of my notebook copied below)
TensorBoard 1.8.0 at http://3439c553be9b:59199 (Press CTRL+C to quit)
{'text/html':TensorBoard was started successfully with pid 7707. Click here to access it.}
I tried to see the TensorBoard by:
clicking on the link provided (http://3439c553be9b:59199). A site on my web-brower opens but is empty.
I used gCloud Shell to connect with 'datalab connect --port=59199 .' This brings me to my files on gCloud, but not to a TensorBoard.
Can someone tell me how to access the TensorBoard please?
Thank you,
Julia

Just clicking on the link should work.
Could you check to see if you have a firewall rule that is preventing this?

I think the first string "TensorBoard 1.8.0 at http://3439c553be9b:59199 (Press CTRL+C to quit) " was output by the new tensorboard version. The direct link won't work.
The second string "TensorBoard was started successfully with pid 7707. Click here to access it.", the word "here" should be backed up by a hyperlink. See code https://github.com/googledatalab/pydatalab/blob/master/google/datalab/ml/_tensorboard.py#L73. That link should work. Do you get that link?

Related

Google Collab incompatibility with TensorBoard

In a Google Collab notebook once I execute the commands:
%load_ext tensorboard
%tensorboard --logdir <data_directory>
I am unable to save the model in the cloud, not only automatically but also manually.
Someone has an idea on why this can be happening?
If its helpful for someone else; executing in an independent module at the beginning the command:
%load_ext tensorboard
And at the end of the program in a separated module
%tensorboard --logdir <folder_name>
Worked for me and allows to save my work despite the TensorBoard module being loaded in the system

Couldn't open tensorboard with localhost?

I use a google instance to train my model.
I want to check the performance via tensorboard
I ran : tensorboard --logdir ./data/log and got : TensorBoard 2.1.1 at http://localhost:6006/ (Press CTRL+C to quit)
But trying to access http://localhost:6006/ in chorme, it doesnt work ( This site can’t be reached )
NOTE : I'm running this in google server instance and want to access it on my local chorme.

tensorboard: cannot open subgraph

Recently I wrote a my custom operator (and its gradient) in python following this post
Tensorflow: Custom operation used in two networks simultaneously produces nan
Tensorflow runs with no error and the prediction gives expected accuracy. However, when I want to visualize this graph with tensorboard. I find that I cannot open the subgraph to see its structures. But it's gradient subgraph can be opened and seen. Does anyone has some idea about this problem?
Fig.1: subgraph fc1 cannot be opened but gradient/fc1 can be opened.
I can open the fc1 metanode on TensorBoard 0.1.8.
What version of TensorBoard you are using? You can find the version via running
python -c 'from tensorboard import version; print(version.VERSION)'
After that, could you try upgrading tensorboard via
pip install --upgrade tensorflow-tensorboard
and let me know if the issue persists?

Tensorflow Tensorboard on Windows shows a blank page

I'm using Tensorflow on Windows but when I try to launch Tensorboard opening http://localhost:6006 the browser shows a blank page
I have added the codeline
writer = tf.train.SummaryWriter('mypath/my_graph', sess.graph)
to my Tensorflow model and launched tensorboard with
tensorboard --logdir="mypath/my_graph"
Here the console output:
Following mrry suggestion I have updated to 0.12.0rc1 and now the Tensorboard page is shown but unfortunately I cannot see any graph, and is missing also the left panel to upload a graph file manually that I can see in some screenshots of the official guide.
Tried also to use
writer = tf.summary.FileWriter('mypath/my_graph', sess.graph)
following the deprecation hint
EDIT
I have found the problem. If I launch tensorboard --logdir="mypath/my_graph" TensorBoard is unable to load the path and looks always for the graph files in the default user path C:\Users\andrew\mygraph\ if I run console as user or C:\Windows\System32 if I run console as administrator. This is a bug and should be fixed.
The 0.12.0rc0 (Release Candidate 0) release of TensorFlow on Windows contains a broken version of TensorBoard. We recently made a new release (0.12.0rc1, Release Candidate 1) that contains a fix for TensorBoard on Windows. You can upgrade by following the instructions for installing the latest release on Windows, or simply typing pip install --upgrade tensorflow at the command prompt.
In ubuntu we can use:
tensorboard --logdir=/home/user/graph/
In Windows we have to change the command prompt to the directory in which the graph file is placed and then use:
tensorboard --logdir=\home\user\graph\

TensorBoard not working

I'm able to use TensorFlow just fine. But I can't yet use TensorBoard at all. I'm following the instructions on tensorflow.org's Visualizing Learning page.
When I run
tensorboard --logdir=/tmp/mnist_logs --debug
I get the following
INFO:tensorflow:TensorBoard is in debug mode.
INFO:tensorflow:Starting TensorBoard in directory /private/tmp/mnist_logs
INFO:tensorflow:TensorBoard path_to_run is: {'/tmp/mnist_logs': None}
INFO:tensorflow:Adding events from directory /tmp/mnist_logs
INFO:tensorflow:Constructing EventAccumulator for /tmp/mnist_logs
DEBUG:tensorflow:Opening a record reader pointing at /tmp/mnist_logs/events.out.tfevents.1457792617.Rafaels-MacBook-Air
WARNING:tensorflow:IOError [Errno 2] No such file or directory: '/usr/local/lib/python3.5/site-packages/tensorflow/tensorboard/TAG' on path /usr/local/lib/python3.5/site-packages/tensorflow/tensorboard/TAG
WARNING:tensorflow:Unable to read TensorBoard tag
Starting TensorBoard on port 6006
(You can navigate to http://0.0.0.0:6006)
DEBUG:tensorflow:No more events in /tmp/mnist_logs/events.out.tfevents.1457792617.Rafaels-MacBook-Air
INFO:tensorflow:No more files in /tmp/mnist_logs
DEBUG:tensorflow:No more events in /tmp/mnist_logs/events.out.tfevents.1457792617.Rafaels-MacBook-Air
INFO:tensorflow:No more files in /tmp/mnist_logs
INFO:tensorflow:Multiplexer done loading. Load took 0.9 secs
If I nagivate to http://0.0.0.0:6006, I see a blank white page.
[Stack: OSX, Google Chrome, Python 3, TensorFlow installed via pip]
Try navigating to localhost:6006 instead (equivalent to http://127.0.0.1:6006/).
It works fine for me while http://0.0.0.0:6006 yields no result.
I had a similar issue with TensorBoard 1.4 (no errors on start but black page in browser). In my case it helped to set the host explicitly to 127.0.0.1 with --host