TensorFlow - how to stop TensorBoard from command line in Windows? - tensorflow

If I put the following at the end of a TensorFlow Python program:
# show the result in TensorBoard
tfFileWriter = tf.summary.FileWriter(os.getcwd())
tfFileWriter.add_graph(sess.graph)
tfFileWriter.close()
I get a file in the same directory that is titled something like:
events.out.tfevents.1513529946.DESKTOP-KR0HCRR
Then I open a command prompt and enter:
tensorboard --logdir C:\Users\cdahms\Documents\TensorFlowExample9
I get the output from the command line:
TensorBoard 0.1.8 at http://DESKTOP-KR0HCRR:6006 (Press CTRL+C to quit)
If I open a broswer and go to http://localhost:6006 I get the expected TensorBoard graph.
Problem is, if I press CTRL+C the process from the command line does not quit as the TensorBoard output indicates. Here is a screenshot if that would be helpful:
I gather the CTRL+C must be for Linux and/or Mac but does not work in Windows. I've also tried x, Ctrl+X, Ctrl+Z, Esc, Crtl+Esc, and pretty much every other combination of keystroke to stop a process that I've ever known of.
Is there a combination of keystroke(s) that can stop TensorBoard on Windows?
To clarify I'm using Windows 10 and PyCharm as an editor (I'm not using a Jupyter Notebook)
Also, before somebody responds "just close that command line window and that will end TensorBoard, then open another command line window" yes, of course I understand I can do that, however it would be preferable to be able to stop TensorBoard from the command line and then re-start it after changing a script without having to close/re-open a new command line window.

Per this response from nfelt, I found that if I pressed Ctrl+C multiple times, usually 2 or 3, that would stop tensorboard. Also as nfelt mentioned I found that Ctrl + Pause/Break almost always stopped tensorboard immediately.

Related

How to open TensorBoard from datalab when proxy port number indicated

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?

Labview Vi's exe File not working via Python script

I made an exe file of labview project. The vi has a loop for a limited time and vi closes as the loop ends. When I open the exe file by double clicking, the vi opens and runs properly. BUT, if i try to run the exe file using Python script as below, the vi opens and stops at once and loop is not completed.
I have tried multiple python commands to run it, but nothing works. Hope someone knows the solution.
This is the code
import sys
import os
os.system("C:\\Users\\sjaved\\Desktop\\Pwm_MPC5748G_MT\\BSWs\\MCAL\\Pwm_MPC5748G\\targetTest\\NIPXI\\builds\\NI_Opponent\\Host\\Host.exe")
Some older versions of LabVIEW required the "Run when opened" option to be set in your top level VI's Execution preferences in order to auto-run when the app is executed. I tested this with a LabVIEW 2017 exe and python and the VI ran as expected (even without the "Run when opened" property set).

noob at MNIST and I do not know what to look for in the documentation

I am getting errors like
from: can't read /var/mail/tensorflow.examples.tutorials.mnist
from: can't read /var/mail/future
what am i doing wrong?
From the error messages, it sounds like you are trying to run a TensorFlow program by (i) typing commands into a bash (or other command) prompt, or (ii) running it using a command-line interpreter (e.g. by running source mnist.py).
To run a TensorFlow Python program, e.g. tensorflow/examples/tutorials/mnist/mnist.py you must run it under python, by entering the following command at a command-line prompt:
python tensorflow/examples/tutorials/mnist/mnist.py

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

tmux session stops updating screen randomly

I use tmux 1.6-2 on a Debian 7.6 (wheezy).
I open a new session and start a long running script that gives updates in form of a progress bar and an activity indicator (spinning bar: /-\|/ ).
When I detach and reattach everything is still fine. But after some random time when I reattach the screen content is stuck. No spinning bar, no progress. I looked into the following:
I can see in top that the process is still running
I can successfully enter tmux commands (like new window, detach, etc.)
I can kill the script with Ctrl-C, but the tmux screen doesn't change
Ctrl-S and Ctrl-Q (like suggested in other threads) doesn't help
Any help is very much appreciated.
I managed to unfreeze my tmux session by running choose-client command from tmux's command line <prefix> :
where prefix is C-b by default
I found the solution in the bug report (by Taisuke Yamada).