From 7933ceb0f9850575f8eca3f463e82a35c830b1f7 Mon Sep 17 00:00:00 2001 From: Alexandre Passos Date: Thu, 3 Aug 2017 13:51:48 -0700 Subject: Removing subscribe from the framework_lib BUILD target as it creates a cyclic dependency. subscribe depends on ops and ops depend on framework. PiperOrigin-RevId: 164176287 --- tensorflow/python/BUILD | 15 ++++++++++++++- tensorflow/python/__init__.py | 1 + tensorflow/python/framework/framework_lib.py | 1 - 3 files changed, 15 insertions(+), 2 deletions(-) diff --git a/tensorflow/python/BUILD b/tensorflow/python/BUILD index af41e0e547..5738561a17 100644 --- a/tensorflow/python/BUILD +++ b/tensorflow/python/BUILD @@ -80,6 +80,7 @@ py_library( ":training", ":ops", ":saver_test_utils", + ":subscribe", ":test_ops", # TODO: Break testing code out into separate rule. ":util", ":weights_broadcast_ops", @@ -403,6 +404,18 @@ py_library( ], ) +py_library( + name = "subscribe", + srcs = ["framework/subscribe.py"], + srcs_version = "PY2AND3", + deps = [ + ":array_ops", + ":framework_ops", + ":platform", + ":variables", + ], +) + py_library( name = "framework", srcs = [ @@ -411,7 +424,6 @@ py_library( "framework/importer.py", "framework/load_library.py", "framework/meta_graph.py", - "framework/subscribe.py", ], srcs_version = "PY2AND3", deps = [ @@ -729,6 +741,7 @@ py_test( ":math_ops", ":platform_test", ":script_ops", + ":subscribe", ], ) diff --git a/tensorflow/python/__init__.py b/tensorflow/python/__init__.py index 2fd8fc8688..3c7bc73b35 100644 --- a/tensorflow/python/__init__.py +++ b/tensorflow/python/__init__.py @@ -114,6 +114,7 @@ from tensorflow.python.util.all_util import make_all from tensorflow.python.client import client_lib from tensorflow.python.framework import constant_op from tensorflow.python.framework import framework_lib +from tensorflow.python.framework import subscribe from tensorflow.python.ops import array_ops from tensorflow.python.ops import check_ops from tensorflow.python.ops import confusion_matrix as confusion_matrix_m diff --git a/tensorflow/python/framework/framework_lib.py b/tensorflow/python/framework/framework_lib.py index 56ac56ba42..d16fe979e6 100644 --- a/tensorflow/python/framework/framework_lib.py +++ b/tensorflow/python/framework/framework_lib.py @@ -99,7 +99,6 @@ from tensorflow.python.framework.ops import convert_to_tensor_or_indexed_slices from tensorflow.python.framework.random_seed import get_seed from tensorflow.python.framework.random_seed import set_random_seed from tensorflow.python.framework.sparse_tensor import convert_to_tensor_or_sparse_tensor -from tensorflow.python.framework.subscribe import subscribe from tensorflow.python.framework.importer import import_graph_def # Utilities for working with Tensors -- cgit v1.2.3