TensorFlow logging made easy
Easy TensorFlow Logging
Are you prototyping something and want to be able to magically graph some value without going through all the usual steps to set up TensorFlow logging properly?
easy-tf-log is a simple module to do just that.
from easy_tf_log import tflog
then you can do
for i in range(10): tflog('really_interesting_variable_name', i)
and you'll find a directory
logs that you can point TensorBoard to
$ tensorboard --logdir logs
Based on logging code from OpenAI's baselines.
pip install easy-tf-log
Note that TensorFlow must be installed separately.
easy-tf-log saves event files to a directory
To change the directory, call
easy-tf-log also supports writing using an existing
by e.g. an instance of
easy_tf_log.set_writer(file_writer.event_writer). (However, not that because
EventsFileWriter uses a sub-thread to write events, this is not fork-safe. If
you set this in one process and then try to use
easy-tf-log a child process,
it will hang.)
To log a value, use
demo.py for a full demo.