diff options
author | Dandelion Man? <dandelion@google.com> | 2017-05-26 20:02:02 -0700 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2017-05-26 20:52:41 -0700 |
commit | c1e8c71418a225a70286d6f9ce7207865a25cf71 (patch) | |
tree | d6aea368de9b6eb70f13df59899fe6142f2e045d /tensorflow/contrib/tensorboard | |
parent | cfeb709d5b6cba45740492afa8039bba0d35956d (diff) |
Shift TensorBoard to depend on TensorFlow via `import tensorflow as tf`.
This is in preparation for TensorBoard leaving github/tensorflow/tensorflow
and moving into its own repository.
There is a little trickiness around tf.contrib.tensorboard, which
has the potential to generate circular dependencies because it depends on
tensorboard.plugins, which now depends on tensorflow, which depends on
contrib. I disconnected the only circle at tensorboard.backend.json_util.
Eventually, I hope for tensorboard to have no dependencies on
//tensorflow except for files within tensorboard, and on the
tensorflow_py target.
We need to port or make public a few utility functions (e.g.
tensor_util.MakeNdarray) and solve the contrib circular dep before
that will be the case.
PiperOrigin-RevId: 157288184
Diffstat (limited to 'tensorflow/contrib/tensorboard')
-rw-r--r-- | tensorflow/contrib/tensorboard/BUILD | 1 | ||||
-rw-r--r-- | tensorflow/contrib/tensorboard/plugins/projector/__init__.py | 8 |
2 files changed, 5 insertions, 4 deletions
diff --git a/tensorflow/contrib/tensorboard/BUILD b/tensorflow/contrib/tensorboard/BUILD index db6b313138..7794dc6e06 100644 --- a/tensorflow/contrib/tensorboard/BUILD +++ b/tensorflow/contrib/tensorboard/BUILD @@ -44,7 +44,6 @@ py_library( srcs_version = "PY2AND3", deps = [ "//tensorflow/python:lib", - "//tensorflow/tensorboard/plugins/projector:projector_plugin", "//tensorflow/tensorboard/plugins/projector:protos_all_py", ], ) diff --git a/tensorflow/contrib/tensorboard/plugins/projector/__init__.py b/tensorflow/contrib/tensorboard/plugins/projector/__init__.py index 635c569d73..771685229d 100644 --- a/tensorflow/contrib/tensorboard/plugins/projector/__init__.py +++ b/tensorflow/contrib/tensorboard/plugins/projector/__init__.py @@ -29,10 +29,9 @@ import os from google.protobuf import text_format from tensorflow.python.lib.io import file_io -from tensorflow.tensorboard.plugins.projector import projector_plugin +from tensorflow.tensorboard.plugins.projector import projector_config_pb2 # pylint: disable=wildcard-import from tensorflow.tensorboard.plugins.projector.projector_config_pb2 import * -from tensorflow.tensorboard.plugins.projector.projector_plugin import * # pylint: enable=wildcard-import @@ -58,5 +57,8 @@ def visualize_embeddings(summary_writer, config): # Saving the config file in the logdir. config_pbtxt = text_format.MessageToString(config) + # FYI - the 'projector_config.pbtxt' string is hardcoded in the projector + # plugin. + # TODO(dandelion): Restore this to a reference to the projector plugin file_io.write_string_to_file( - os.path.join(logdir, projector_plugin.PROJECTOR_FILENAME), config_pbtxt) + os.path.join(logdir, 'projector_config.pbtxt'), config_pbtxt) |