Skip to content

Commit 7933ceb

Browse files
alextptensorflower-gardener
authored andcommitted
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
1 parent e5da84d commit 7933ceb

3 files changed

Lines changed: 15 additions & 2 deletions

File tree

tensorflow/python/BUILD

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,6 +80,7 @@ py_library(
8080
":training",
8181
":ops",
8282
":saver_test_utils",
83+
":subscribe",
8384
":test_ops", # TODO: Break testing code out into separate rule.
8485
":util",
8586
":weights_broadcast_ops",
@@ -403,6 +404,18 @@ py_library(
403404
],
404405
)
405406

407+
py_library(
408+
name = "subscribe",
409+
srcs = ["framework/subscribe.py"],
410+
srcs_version = "PY2AND3",
411+
deps = [
412+
":array_ops",
413+
":framework_ops",
414+
":platform",
415+
":variables",
416+
],
417+
)
418+
406419
py_library(
407420
name = "framework",
408421
srcs = [
@@ -411,7 +424,6 @@ py_library(
411424
"framework/importer.py",
412425
"framework/load_library.py",
413426
"framework/meta_graph.py",
414-
"framework/subscribe.py",
415427
],
416428
srcs_version = "PY2AND3",
417429
deps = [
@@ -729,6 +741,7 @@ py_test(
729741
":math_ops",
730742
":platform_test",
731743
":script_ops",
744+
":subscribe",
732745
],
733746
)
734747

tensorflow/python/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,7 @@
114114
from tensorflow.python.client import client_lib
115115
from tensorflow.python.framework import constant_op
116116
from tensorflow.python.framework import framework_lib
117+
from tensorflow.python.framework import subscribe
117118
from tensorflow.python.ops import array_ops
118119
from tensorflow.python.ops import check_ops
119120
from tensorflow.python.ops import confusion_matrix as confusion_matrix_m

tensorflow/python/framework/framework_lib.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -99,7 +99,6 @@
9999
from tensorflow.python.framework.random_seed import get_seed
100100
from tensorflow.python.framework.random_seed import set_random_seed
101101
from tensorflow.python.framework.sparse_tensor import convert_to_tensor_or_sparse_tensor
102-
from tensorflow.python.framework.subscribe import subscribe
103102
from tensorflow.python.framework.importer import import_graph_def
104103

105104
# Utilities for working with Tensors

0 commit comments

Comments
 (0)