aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/tensorboard
diff options
context:
space:
mode:
authorGravatar Dan Smilkov <smilkov@google.com>2016-11-22 14:46:41 -0800
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2016-11-22 15:04:59 -0800
commit395004d2f2be5786712979a81906458b7a952b4e (patch)
tree30ec24877e5042677d432a211489963553149862 /tensorflow/tensorboard
parentaf9e0c6776bb83358104e87b6ee82e04cc6769a5 (diff)
Embedding projector: Detect changes regarding checkpoint files.
Lauching TB and the embeddings tab before the checkpoint file is available resulted in TB never detecting the checkpoint file. Now refreshing the embeddings tab after the checkpoint file is ready should show the embeddings. Change: 139957355
Diffstat (limited to 'tensorflow/tensorboard')
-rw-r--r--tensorflow/tensorboard/components/tf_dashboard_common/tf-no-data-warning.html20
-rw-r--r--tensorflow/tensorboard/plugins/projector/plugin.py11
2 files changed, 11 insertions, 20 deletions
diff --git a/tensorflow/tensorboard/components/tf_dashboard_common/tf-no-data-warning.html b/tensorflow/tensorboard/components/tf_dashboard_common/tf-no-data-warning.html
index 6a1a76bd26..20d6e4f3b1 100644
--- a/tensorflow/tensorboard/components/tf_dashboard_common/tf-no-data-warning.html
+++ b/tensorflow/tensorboard/components/tf_dashboard_common/tf-no-data-warning.html
@@ -42,29 +42,17 @@ Display a warning when there is no data found.
</template>
<template is="dom-if" if="[[_isProjector(dataType)]]">
<h3>
- No projector data was found.
+ No checkpoint was found.
</h3>
<p>
Probable causes:
<ul>
<li>
- There is no <code>projector_config.pbtxt</code> in the <code>logdir</code>.
- To store a config file, create a
- <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/tensorboard/plugins/projector/projector_config.proto">
- <code>projector.ProjectorConfig</code>
- </a>
- proto and a
- <a href="https://www.tensorflow.org/versions/master/api_docs/python/train.html#SummaryWriter">
- <code>tf.train.SummaryWriter</code>
- </a> and pass them to
- <code>projector.visualize_embeddings()</code>.
- The <code>projector</code> module lives in
- <a href="https://github.com/tensorflow/tensorflow/blob/master/tensorflow/contrib/tensorboard/plugins/projector/__init__.py">
- <code>tensorflow.contrib.tensorboard.plugins</code>.
- </a>
+ No checkpoint has been saved yet. Please refresh the page periodically.
</li>
<li>
- There is no checkpoint file. To save your model, create a
+ You are not saving any checkpoint. To save your model,
+ create a
<a href="https://www.tensorflow.org/versions/master/api_docs/python/state_ops.html#Saver">
<code>tf.train.Saver</code>
</a>
diff --git a/tensorflow/tensorboard/plugins/projector/plugin.py b/tensorflow/tensorboard/plugins/projector/plugin.py
index 50c6789ba5..7c10bab620 100644
--- a/tensorflow/tensorboard/plugins/projector/plugin.py
+++ b/tensorflow/tensorboard/plugins/projector/plugin.py
@@ -64,10 +64,13 @@ def _latest_checkpoints_changed(configs, run_path_pairs):
"""Returns true if the latest checkpoint has changed in any of the runs."""
for run_name, logdir in run_path_pairs:
if run_name not in configs:
- continue
- config = configs[run_name]
- if not config.model_checkpoint_path:
- continue
+ config = ProjectorConfig()
+ config_fpath = os.path.join(logdir, PROJECTOR_FILENAME)
+ if file_io.file_exists(config_fpath):
+ file_content = file_io.read_file_to_string(config_fpath).decode('utf-8')
+ text_format.Merge(file_content, config)
+ else:
+ config = configs[run_name]
# See if you can find a checkpoint file in the logdir.
ckpt_path = latest_checkpoint(logdir)