Remove all TB build references that circumvent TF's public API.

This doesn't actually remove all the code references, lots of code references continue to work despite the BUILD references being removed. I think this is because depending on the public api transitively makes all of TensorFlow's guts available too.

PiperOrigin-RevId: 157502987
This commit is contained in:
Dandelion Man? 2017-05-30 13:21:01 -07:00 committed by TensorFlower Gardener
parent dcc3cdce8d
commit a6cd4e7358
5 changed files with 13 additions and 35 deletions

View File

@ -11,7 +11,6 @@ py_binary(
data = [":assets"],
srcs_version = "PY2AND3",
deps = [
"//tensorflow/python:platform",
"//tensorflow/tensorboard/backend:application",
"//tensorflow/tensorboard/backend/event_processing:event_file_inspector",
"//tensorflow/tensorboard/plugins/histograms:histograms_plugin",

View File

@ -18,7 +18,6 @@ py_library(
"//tensorflow:internal",
],
deps = [
"//tensorflow/python:summary",
"//tensorflow/tensorboard/backend:http_util",
"//tensorflow/tensorboard/backend/event_processing:event_accumulator",
"//tensorflow/tensorboard/plugins:base_plugin",
@ -35,11 +34,7 @@ py_test(
srcs_version = "PY2AND3",
deps = [
":histograms_plugin",
"//tensorflow/python:array_ops",
"//tensorflow/python:client",
"//tensorflow/python:client_testlib",
"//tensorflow/python:platform",
"//tensorflow/python:summary",
"//tensorflow:tensorflow_py",
"//tensorflow/tensorboard/backend:application",
"//tensorflow/tensorboard/backend/event_processing:event_accumulator",
"//tensorflow/tensorboard/backend/event_processing:event_multiplexer",

View File

@ -22,20 +22,14 @@ from __future__ import print_function
import os.path
from six.moves import xrange # pylint: disable=redefined-builtin
import tensorflow as tf
from tensorflow.python.client import session
from tensorflow.python.framework import dtypes
from tensorflow.python.framework import ops
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import math_ops
from tensorflow.python.platform import test
from tensorflow.python.summary import summary
from tensorflow.tensorboard.backend.event_processing import event_accumulator
from tensorflow.tensorboard.backend.event_processing import event_multiplexer
from tensorflow.tensorboard.plugins.histograms import histograms_plugin
class HistogramsPluginTest(test.TestCase):
class HistogramsPluginTest(tf.test.TestCase):
_STEPS = 99
@ -66,17 +60,17 @@ class HistogramsPluginTest(test.TestCase):
(use_histogram, use_scalars) = (False, True)
else:
assert False, 'Invalid run name: %r' % run_name
ops.reset_default_graph()
sess = session.Session()
placeholder = array_ops.placeholder(dtypes.float32, shape=[3])
tf.reset_default_graph()
sess = tf.Session()
placeholder = tf.placeholder(tf.float32, shape=[3])
if use_histogram:
summary.histogram(self._HISTOGRAM_TAG, placeholder)
tf.summary.histogram(self._HISTOGRAM_TAG, placeholder)
if use_scalars:
summary.scalar(self._SCALAR_TAG, math_ops.reduce_mean(placeholder))
summ = summary.merge_all()
tf.summary.scalar(self._SCALAR_TAG, tf.reduce_mean(placeholder))
summ = tf.summary.merge_all()
subdir = os.path.join(self.logdir, run_name)
writer = summary.FileWriter(subdir)
writer = tf.summary.FileWriter(subdir)
writer.add_graph(sess.graph)
for step in xrange(self._STEPS):
feed_dict = {placeholder: [1 + step, 2 + step, 3 + step]}
@ -130,4 +124,4 @@ class HistogramsPluginTest(test.TestCase):
if __name__ == '__main__':
test.main()
tf.test.main()

View File

@ -35,11 +35,7 @@ py_test(
srcs_version = "PY2AND3",
deps = [
":scalars_plugin",
"//tensorflow/python:array_ops",
"//tensorflow/python:client",
"//tensorflow/python:client_testlib",
"//tensorflow/python:platform",
"//tensorflow/python:summary",
"//tensorflow:tensorflow_py",
"//tensorflow/tensorboard/backend:application",
"//tensorflow/tensorboard/backend/event_processing:event_multiplexer",
"@org_pocoo_werkzeug//:werkzeug",

View File

@ -12,13 +12,7 @@ py_binary(
srcs = ["generate_testdata.py"],
srcs_version = "PY2AND3",
deps = [
"//tensorflow/core:protos_all_py",
"//tensorflow/python", # TODO(b/34059704): remove when fixed
"//tensorflow/python:array_ops",
"//tensorflow/python:client",
"//tensorflow/python:logging_ops",
"//tensorflow/python:platform",
"//tensorflow/python:summary",
"//tensorflow:tensorflow_py",
"//third_party/py/numpy",
"@six_archive//:six",
],