Avoid adding information in tensorboard while validating or testing

I noticed that while validation or testing, information are passed to Tensorboard and because of that the graphs does not make sense. Is there any condition I could introduce before log_grads_and_vars (or somewhere else) to identify that I am in validation mode or testing mode and avoid writing stuff in tensorboard?

is tensor board officially supported ? I dont see it anywhere in the docs or code. I would love to use tensorboard with training.

tf.summary adds the summaries for use in tensorboard. Change summary_dir and summary_secs to extract them.