提交 395004d2 编写于 作者: D Dan Smilkov 提交者: TensorFlower Gardener

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
上级 af9e0c67
......@@ -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>
......
......@@ -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)
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册