Skip to content

Commit 8d8bf2f

Browse files
tf-transform-teamtfx-copybara
authored andcommitted
Simplify PartitionedCall to PartitionedCallOp
PiperOrigin-RevId: 521546933
1 parent 63d2bb7 commit 8d8bf2f

File tree

1 file changed

+0
-24
lines changed

1 file changed

+0
-24
lines changed

tensorflow_transform/graph_tools_test.py

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -25,9 +25,7 @@
2525
from tfx_bsl.types import tfx_namedtuple
2626

2727
# pylint: disable=g-direct-tensorflow-import
28-
from tensorflow.python.framework import function
2928
from tensorflow.python.ops import control_flow_ops
30-
from tensorflow.python.ops import functional_ops
3129
# pylint: disable=g-enable-tensorflow-import
3230
mock = tf.compat.v1.test.mock
3331

@@ -60,22 +58,6 @@ def foo(x, y):
6058
return {'x': x, 'y': y, 'z': a + b + c, 'r': a, 'q': foo(x, x)[0]}
6159

6260

63-
def _create_graph_with_tf_defun():
64-
x = tf.compat.v1.placeholder(tf.int64)
65-
y = tf.compat.v1.placeholder(tf.int64)
66-
67-
@tf.function
68-
def identity(x):
69-
return x
70-
71-
@function.Defun(tf.int64, tf.int64)
72-
def foo(x, y):
73-
return identity(x * 2), identity(x + y), identity(y * 2)
74-
75-
a, b, c = functional_ops.partitioned_call([x, y], foo)
76-
return {'x': x, 'y': y, 'z': a + b + c, 'r': a, 'q': foo(x, x)[0]}
77-
78-
7961
def _create_graph_with_tf2_saved_model_with_table():
8062

8163
def export_saved_model_v2():
@@ -674,12 +656,6 @@ def testInitializableGraphAnalyzerReadyToRunRaises(
674656
feeds=['x', 'y'],
675657
fetches=['z'],
676658
expected_dependent_inputs=['x', 'y']),
677-
dict(
678-
testcase_name='_tf_defun',
679-
create_graph_fn=_create_graph_with_tf_defun,
680-
feeds=['x', 'y'],
681-
fetches=['z'],
682-
expected_dependent_inputs=['x', 'y']),
683659
dict(
684660
testcase_name='_tf_function_signature_forces_dependencies',
685661
create_graph_fn=_create_graph_with_tf_function,

0 commit comments

Comments
 (0)