add BUILD file for python/util and refactor python/BUILD
PiperOrigin-RevId: 347652147 Change-Id: I97aa24d6a109ed5aec8fca9a9b5e3b2b1a96b760
This commit is contained in:
parent
e43e307952
commit
112778a924
@ -1245,6 +1245,7 @@ cc_library(
|
||||
visibility = [
|
||||
"//tensorflow/core:__pkg__",
|
||||
"//tensorflow/python:__pkg__",
|
||||
"//tensorflow/python/util:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -274,6 +274,7 @@ filegroup(
|
||||
visibility = [
|
||||
"//tensorflow/core:__pkg__",
|
||||
"//tensorflow/python:__pkg__",
|
||||
"//tensorflow/python/util:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
@ -460,6 +461,7 @@ cc_library(
|
||||
visibility = [
|
||||
"//tensorflow/core:__pkg__",
|
||||
"//tensorflow/python:__pkg__",
|
||||
"//tensorflow/python/util:__pkg__",
|
||||
],
|
||||
alwayslink = 1,
|
||||
)
|
||||
@ -474,6 +476,7 @@ cc_library(
|
||||
"//tensorflow/core/platform:__pkg__",
|
||||
"//tensorflow/python:__pkg__",
|
||||
"//tensorflow/python/eager:__pkg__",
|
||||
"//tensorflow/python/util:__pkg__",
|
||||
],
|
||||
deps = [
|
||||
"//tensorflow/core/platform:status",
|
||||
|
File diff suppressed because it is too large
Load Diff
@ -11,7 +11,7 @@ py_library(
|
||||
srcs_version = "PY2AND3",
|
||||
deps = [
|
||||
"//tensorflow/python:pywrap_mlir",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -56,9 +56,9 @@ py_library(
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tensor_spec",
|
||||
"//tensorflow/python:tf2",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/data/util:convert",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -37,8 +37,8 @@ from __future__ import print_function
|
||||
|
||||
import six as _six
|
||||
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python.framework import sparse_tensor as _sparse_tensor
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util.compat import collections_abc as _collections_abc
|
||||
|
||||
|
||||
|
@ -48,10 +48,10 @@ py_library(
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:tensor_util",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/eager:def_function",
|
||||
"//tensorflow/python/eager:executor",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//tensorflow/tools/docs:doc_controls",
|
||||
"@enum34_archive//:enum",
|
||||
"@six_archive//:six",
|
||||
@ -255,7 +255,6 @@ py_library(
|
||||
"//tensorflow/python:pywrap_tfe",
|
||||
"//tensorflow/python:summary_ops_v2",
|
||||
"//tensorflow/python:tensor_util",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:training",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variable_scope",
|
||||
@ -263,6 +262,7 @@ py_library(
|
||||
"//tensorflow/python/autograph/impl",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/eager:def_function",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -286,7 +286,6 @@ py_library(
|
||||
"//tensorflow/python:pywrap_tfe",
|
||||
"//tensorflow/python:summary_ops_v2",
|
||||
"//tensorflow/python:tensor_util",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:training",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variable_scope",
|
||||
@ -294,6 +293,7 @@ py_library(
|
||||
"//tensorflow/python/autograph/impl",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/eager:def_function",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -345,12 +345,12 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:training",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python/distribute/cluster_resolver:cluster_resolver_lib",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -408,11 +408,11 @@ py_library(
|
||||
"//tensorflow/python:errors",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:training",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/distribute/cluster_resolver:cluster_resolver_lib",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -715,7 +715,6 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:type_spec",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python:variables",
|
||||
@ -725,6 +724,7 @@ py_library(
|
||||
"//tensorflow/python/training/saving:saveable_object_util",
|
||||
"//tensorflow/python/training/tracking:base",
|
||||
"//tensorflow/python/types",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -836,12 +836,12 @@ py_library(
|
||||
":tpu_strategy",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:tf2",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/distribute/cluster_resolver:cluster_resolver_lib",
|
||||
"//tensorflow/python/distribute/cluster_resolver:tpu_cluster_resolver_py",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/eager:remote",
|
||||
"//tensorflow/python/tpu:tpu_lib",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -1087,13 +1087,13 @@ py_library(
|
||||
"//tensorflow/python:partitioned_variables",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:type_spec",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/saved_model:save_context",
|
||||
"//tensorflow/python/training/saving:saveable_object_util",
|
||||
"//tensorflow/python/training/tracking:base",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -64,16 +64,16 @@ cc_library(
|
||||
"//tensorflow/core/platform:types",
|
||||
"//tensorflow/core/profiler/lib:traceme",
|
||||
"//tensorflow/core/util:abstract_stack_trace",
|
||||
"//tensorflow/python:cpp_python_util",
|
||||
"//tensorflow/python:ndarray_tensor",
|
||||
"//tensorflow/python:ndarray_tensor_bridge",
|
||||
"//tensorflow/python:numpy_lib",
|
||||
"//tensorflow/python:py_exception_registry",
|
||||
"//tensorflow/python:stack_trace",
|
||||
"//tensorflow/python/lib/core:py_seq_tensor",
|
||||
"//tensorflow/python/lib/core:py_util",
|
||||
"//tensorflow/python/lib/core:safe_ptr",
|
||||
"//tensorflow/python/lib/core:safe_pyobject_ptr",
|
||||
"//tensorflow/python/util:cpp_python_util",
|
||||
"//tensorflow/python/util:stack_trace",
|
||||
"//third_party/py/numpy:headers",
|
||||
"//third_party/python_runtime:headers",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
@ -232,10 +232,10 @@ tf_python_pybind_extension(
|
||||
"//tensorflow/c/eager:c_api",
|
||||
"//tensorflow/c/eager:c_api_experimental",
|
||||
"//tensorflow/c/eager:custom_device_testutil",
|
||||
"//tensorflow/python:cpp_python_util",
|
||||
"//tensorflow/python:pybind11_lib",
|
||||
"//tensorflow/python/lib/core:pybind11_status",
|
||||
"//tensorflow/python/lib/core:safe_ptr",
|
||||
"//tensorflow/python/util:cpp_python_util",
|
||||
"//third_party/python_runtime:headers",
|
||||
"@pybind11",
|
||||
],
|
||||
|
@ -28,7 +28,6 @@ import sys
|
||||
import six
|
||||
|
||||
from tensorflow.python import pywrap_tfe
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python.eager import backprop_util
|
||||
from tensorflow.python.eager import context
|
||||
from tensorflow.python.eager import execute
|
||||
@ -49,6 +48,7 @@ from tensorflow.python.ops import math_ops
|
||||
from tensorflow.python.ops import resource_variable_ops
|
||||
from tensorflow.python.ops.unconnected_gradients import UnconnectedGradients
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util import nest
|
||||
from tensorflow.python.util import tf_contextlib
|
||||
from tensorflow.python.util import tf_inspect
|
||||
|
@ -33,7 +33,6 @@ from six.moves import map
|
||||
|
||||
from tensorflow.core.framework import attr_value_pb2
|
||||
from tensorflow.core.framework import function_pb2
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python import pywrap_tfe
|
||||
from tensorflow.python.client import pywrap_tf_session
|
||||
from tensorflow.python.eager import backprop
|
||||
@ -67,6 +66,7 @@ from tensorflow.python.ops import resource_variable_ops
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
from tensorflow.python.profiler import trace
|
||||
from tensorflow.python.saved_model import save_context
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util import compat
|
||||
from tensorflow.python.util import function_utils
|
||||
from tensorflow.python.util import lazy_loader
|
||||
|
@ -84,7 +84,6 @@ py_library(
|
||||
"//tensorflow/python:sparse_tensor",
|
||||
"//tensorflow/python:string_ops",
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:training",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variable_scope",
|
||||
@ -92,6 +91,7 @@ py_library(
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/training/tracking",
|
||||
"//tensorflow/python/training/tracking:data_structures",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
|
@ -22,8 +22,8 @@ import abc
|
||||
|
||||
import six
|
||||
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util import nest
|
||||
from tensorflow.python.util.tf_export import tf_export
|
||||
|
||||
|
@ -18,8 +18,8 @@ from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from tensorflow.python import _pywrap_tensor_float_32_execution
|
||||
from tensorflow.python.eager import context
|
||||
from tensorflow.python.util import _pywrap_tensor_float_32_execution
|
||||
from tensorflow.python.util import deprecation
|
||||
from tensorflow.python.util.tf_export import tf_export
|
||||
|
||||
|
@ -26,13 +26,13 @@ from tensorflow.core.framework import attr_value_pb2
|
||||
from tensorflow.core.framework import tensor_pb2
|
||||
from tensorflow.core.framework import tensor_shape_pb2
|
||||
from tensorflow.core.framework import types_pb2
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python.framework import dtypes
|
||||
from tensorflow.python.framework import op_callbacks
|
||||
from tensorflow.python.framework import op_def_registry
|
||||
from tensorflow.python.framework import ops
|
||||
from tensorflow.python.framework import tensor_shape
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util import compat
|
||||
from tensorflow.python.util import tf_contextlib
|
||||
|
||||
|
@ -23,7 +23,6 @@ import collections
|
||||
import numpy as np
|
||||
|
||||
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python import tf2
|
||||
from tensorflow.python.framework import composite_tensor
|
||||
from tensorflow.python.framework import constant_op
|
||||
@ -35,6 +34,7 @@ from tensorflow.python.framework import tensor_util
|
||||
from tensorflow.python.framework import type_spec
|
||||
from tensorflow.python.ops import gen_sparse_ops
|
||||
from tensorflow.python.types import internal
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util.tf_export import tf_export
|
||||
|
||||
# pylint: disable=protected-access
|
||||
|
@ -20,12 +20,12 @@ from __future__ import print_function
|
||||
|
||||
import numpy as np
|
||||
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python.framework import common_shapes
|
||||
from tensorflow.python.framework import dtypes
|
||||
from tensorflow.python.framework import ops
|
||||
from tensorflow.python.framework import tensor_shape
|
||||
from tensorflow.python.framework import type_spec
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util.tf_export import tf_export
|
||||
|
||||
|
||||
|
@ -43,7 +43,6 @@ from google.protobuf import text_format
|
||||
|
||||
from tensorflow.core.framework import graph_pb2
|
||||
from tensorflow.core.protobuf import rewriter_config_pb2
|
||||
from tensorflow.python import _pywrap_util_port
|
||||
from tensorflow.python import tf2
|
||||
from tensorflow.python.client import device_lib
|
||||
from tensorflow.python.client import pywrap_tf_session
|
||||
@ -82,6 +81,7 @@ from tensorflow.python.platform import _pywrap_stacktrace_handler
|
||||
from tensorflow.python.platform import googletest
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
from tensorflow.python.training import server_lib
|
||||
from tensorflow.python.util import _pywrap_util_port
|
||||
from tensorflow.python.util import compat
|
||||
from tensorflow.python.util import deprecation
|
||||
from tensorflow.python.util import nest
|
||||
|
@ -20,16 +20,16 @@ from __future__ import print_function
|
||||
|
||||
import abc
|
||||
import collections
|
||||
|
||||
import re
|
||||
|
||||
import numpy as np
|
||||
import six
|
||||
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python.framework import composite_tensor
|
||||
from tensorflow.python.framework import dtypes
|
||||
from tensorflow.python.framework import tensor_shape
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util import compat
|
||||
from tensorflow.python.util import nest
|
||||
from tensorflow.python.util import tf_decorator
|
||||
|
@ -41,7 +41,6 @@ py_library(
|
||||
deps = [
|
||||
"//tensorflow/python:lib",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/keras:activations",
|
||||
"//tensorflow/python/keras:backend",
|
||||
"//tensorflow/python/keras:models",
|
||||
@ -49,6 +48,7 @@ py_library(
|
||||
"//tensorflow/python/keras/layers",
|
||||
"//tensorflow/python/keras/utils:data_utils",
|
||||
"//tensorflow/python/keras/utils:layer_utils",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
|
@ -897,11 +897,11 @@ py_library(
|
||||
"//tensorflow/python:dtypes",
|
||||
"//tensorflow/python:errors",
|
||||
"//tensorflow/python:summary_ops_v2",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:training_lib",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/training/tracking:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -1,7 +1,10 @@
|
||||
# Description:
|
||||
# Contains the Keras engine API (internal TensorFlow version).
|
||||
|
||||
# buildifier: disable=same-origin-load
|
||||
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
||||
|
||||
# buildifier: disable=same-origin-load
|
||||
load("//tensorflow:tensorflow.bzl", "cuda_py_test")
|
||||
|
||||
package(
|
||||
@ -135,7 +138,7 @@ py_library(
|
||||
"//tensorflow/python:tensor_spec",
|
||||
"//tensorflow/python:tensor_util",
|
||||
"//tensorflow/python:tf2",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/autograph/core",
|
||||
|
@ -45,10 +45,10 @@ py_library(
|
||||
deps = [
|
||||
":base_feature_layer",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/feature_column:feature_column_v2",
|
||||
"//tensorflow/python/keras:backend",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -61,8 +61,8 @@ py_library(
|
||||
":base_feature_layer",
|
||||
":dense_features",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/feature_column:feature_column_v2",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -125,9 +125,9 @@ py_library(
|
||||
"//tensorflow/python:array_ops",
|
||||
"//tensorflow/python:check_ops",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/feature_column:feature_column_v2",
|
||||
"//tensorflow/python/keras:backend",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -58,11 +58,11 @@ py_library(
|
||||
"//tensorflow/python:resources",
|
||||
"//tensorflow/python:sparse_tensor",
|
||||
"//tensorflow/python:tensor_spec",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/keras/engine",
|
||||
"//tensorflow/python/keras/utils:tf_utils",
|
||||
"//tensorflow/python/ops/parallel_for:control_flow_ops",
|
||||
"//tensorflow/python/ops/ragged:ragged_functional_ops",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
@ -81,11 +81,11 @@ py_library(
|
||||
"//tensorflow/python:sparse_tensor",
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tensor_spec",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/keras/engine",
|
||||
"//tensorflow/python/keras/utils:tf_utils",
|
||||
"//tensorflow/python/ops/ragged:ragged_array_ops",
|
||||
"//tensorflow/python/ops/ragged:ragged_tensor",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
@ -105,11 +105,11 @@ py_library(
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tensor_spec",
|
||||
"//tensorflow/python:tensor_util",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/keras/engine",
|
||||
"//tensorflow/python/keras/utils:tf_utils",
|
||||
"//tensorflow/python/ops/ragged:ragged_functional_ops",
|
||||
"//tensorflow/python/ops/ragged:ragged_tensor",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
@ -132,7 +132,6 @@ py_library(
|
||||
"//tensorflow/python:stateless_random_ops",
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tensor_util",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/compat",
|
||||
"//tensorflow/python/eager:context",
|
||||
@ -140,6 +139,7 @@ py_library(
|
||||
"//tensorflow/python/keras/engine",
|
||||
"//tensorflow/python/keras/engine:input_spec",
|
||||
"//tensorflow/python/keras/utils:control_flow_util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
@ -179,10 +179,10 @@ py_library(
|
||||
"//tensorflow/python:init_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/keras:backend",
|
||||
"//tensorflow/python/keras/engine",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
@ -198,8 +198,8 @@ py_library(
|
||||
":index_lookup",
|
||||
":table_utils",
|
||||
"//tensorflow/python:dtypes",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/keras/engine",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -242,7 +242,6 @@ py_library(
|
||||
"//tensorflow/python:string_ops",
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tensor_spec",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/data/ops:dataset_ops",
|
||||
"//tensorflow/python/keras:backend",
|
||||
"//tensorflow/python/keras/engine",
|
||||
@ -250,6 +249,7 @@ py_library(
|
||||
"//tensorflow/python/keras/utils:tf_utils",
|
||||
"//tensorflow/python/ops/ragged:ragged_functional_ops",
|
||||
"//tensorflow/python/ops/ragged:ragged_string_ops",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
@ -272,13 +272,13 @@ py_library(
|
||||
"//tensorflow/python:sparse_tensor",
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tensor_spec",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/keras:backend",
|
||||
"//tensorflow/python/keras/engine",
|
||||
"//tensorflow/python/keras/engine:input_spec",
|
||||
"//tensorflow/python/keras/utils:layer_utils",
|
||||
"//tensorflow/python/ops/ragged:ragged_tensor",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
@ -308,8 +308,8 @@ py_library(
|
||||
":index_lookup",
|
||||
":table_utils",
|
||||
"//tensorflow/python:dtypes",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/keras/engine",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -83,8 +83,8 @@ py_library(
|
||||
"//tensorflow/python:dtypes",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -27,7 +27,6 @@ import numpy as np
|
||||
|
||||
from tensorflow.core.framework import attr_value_pb2
|
||||
from tensorflow.core.framework import variable_pb2
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python.client import pywrap_tf_session
|
||||
from tensorflow.python.eager import context
|
||||
from tensorflow.python.eager import tape
|
||||
@ -53,6 +52,7 @@ from tensorflow.python.ops.gen_resource_variable_ops import *
|
||||
# pylint: enable=wildcard-import
|
||||
from tensorflow.python.training.tracking import base as trackable
|
||||
from tensorflow.python.types import core
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util import compat
|
||||
from tensorflow.python.util.deprecation import deprecated
|
||||
|
||||
|
@ -27,7 +27,6 @@ import six
|
||||
from tensorflow.core.framework import attr_value_pb2
|
||||
from tensorflow.core.framework import variable_pb2
|
||||
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python.eager import context
|
||||
from tensorflow.python.framework import dtypes
|
||||
from tensorflow.python.framework import ops
|
||||
@ -41,6 +40,7 @@ from tensorflow.python.ops import math_ops
|
||||
from tensorflow.python.ops import state_ops
|
||||
from tensorflow.python.platform import tf_logging as logging
|
||||
from tensorflow.python.training.tracking import base as trackable
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util import compat
|
||||
from tensorflow.python.util import object_identity
|
||||
from tensorflow.python.util import tf_should_use
|
||||
|
@ -46,10 +46,10 @@ py_library(
|
||||
deps = [
|
||||
":build_info",
|
||||
"//tensorflow/core:protos_all_py",
|
||||
"//tensorflow/python:_pywrap_util_port",
|
||||
"//tensorflow/python:pywrap_tfe",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/lib/io:lib",
|
||||
"//tensorflow/python/util:_pywrap_util_port",
|
||||
"@absl_py//absl/flags",
|
||||
"@rules_python//python/runfiles",
|
||||
"@six_archive//:six",
|
||||
|
@ -88,8 +88,8 @@ py_library(
|
||||
":option_builder",
|
||||
":tfprof_logger",
|
||||
"//tensorflow/core/profiler:protos_all_py",
|
||||
"//tensorflow/python:_pywrap_tfprof",
|
||||
"//tensorflow/python:errors",
|
||||
"//tensorflow/python/util:_pywrap_tfprof",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
@ -229,8 +229,8 @@ py_library(
|
||||
"//tensorflow:internal",
|
||||
],
|
||||
deps = [
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/profiler/internal:_pywrap_traceme",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -19,7 +19,6 @@ from __future__ import print_function
|
||||
|
||||
import contextlib
|
||||
|
||||
from tensorflow.python import _pywrap_tfprof as print_mdl
|
||||
from tensorflow.python.framework import dtypes
|
||||
from tensorflow.python.ops import array_ops
|
||||
from tensorflow.python.ops import init_ops
|
||||
@ -32,6 +31,7 @@ from tensorflow.python.ops import tensor_array_grad # pylint: disable=unused-im
|
||||
from tensorflow.python.ops import variable_scope
|
||||
from tensorflow.python.profiler import model_analyzer
|
||||
from tensorflow.python.training import gradient_descent
|
||||
from tensorflow.python.util import _pywrap_tfprof as print_mdl
|
||||
from tensorflow.python.util import compat
|
||||
|
||||
|
||||
|
@ -27,12 +27,12 @@ import six
|
||||
from google.protobuf import message
|
||||
from tensorflow.core.profiler import tfprof_options_pb2
|
||||
from tensorflow.core.profiler import tfprof_output_pb2
|
||||
from tensorflow.python import _pywrap_tfprof as print_mdl
|
||||
from tensorflow.python.eager import context
|
||||
from tensorflow.python.framework import errors
|
||||
from tensorflow.python.framework import ops
|
||||
from tensorflow.python.profiler import option_builder
|
||||
from tensorflow.python.profiler import tfprof_logger
|
||||
from tensorflow.python.util import _pywrap_tfprof as print_mdl
|
||||
from tensorflow.python.util.tf_export import tf_export
|
||||
|
||||
_DEFAULT_PROFILE_OPTIONS = 0
|
||||
|
@ -25,12 +25,12 @@ import sys
|
||||
import threading
|
||||
|
||||
from tensorflow.core.protobuf import config_pb2
|
||||
from tensorflow.python import _pywrap_tfprof as print_mdl
|
||||
from tensorflow.python.client import session
|
||||
from tensorflow.python.framework import errors
|
||||
from tensorflow.python.framework import ops
|
||||
from tensorflow.python.platform import gfile
|
||||
from tensorflow.python.profiler import model_analyzer
|
||||
from tensorflow.python.util import _pywrap_tfprof as print_mdl
|
||||
from tensorflow.python.util import compat
|
||||
|
||||
WARMUP_STEPS = 10
|
||||
|
@ -42,21 +42,21 @@ py_strict_library(
|
||||
name = "constants",
|
||||
srcs = ["constants.py"],
|
||||
srcs_version = "PY2AND3",
|
||||
deps = ["//tensorflow/python:tf_export"],
|
||||
deps = ["//tensorflow/python/util:tf_export"],
|
||||
)
|
||||
|
||||
py_strict_library(
|
||||
name = "signature_constants",
|
||||
srcs = ["signature_constants.py"],
|
||||
srcs_version = "PY2AND3",
|
||||
deps = ["//tensorflow/python:tf_export"],
|
||||
deps = ["//tensorflow/python/util:tf_export"],
|
||||
)
|
||||
|
||||
py_strict_library(
|
||||
name = "tag_constants",
|
||||
srcs = ["tag_constants.py"],
|
||||
srcs_version = "PY2AND3",
|
||||
deps = ["//tensorflow/python:tf_export"],
|
||||
deps = ["//tensorflow/python/util:tf_export"],
|
||||
)
|
||||
|
||||
py_strict_library(
|
||||
@ -75,9 +75,9 @@ py_strict_library(
|
||||
"//tensorflow/python:lib",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:saver",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -97,9 +97,9 @@ py_strict_library(
|
||||
"//tensorflow/python:lib",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:saver",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -137,8 +137,8 @@ py_strict_library(
|
||||
":signature_def_utils",
|
||||
":tag_constants",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -153,9 +153,9 @@ py_strict_library(
|
||||
"//tensorflow/python:control_flow_ops",
|
||||
"//tensorflow/python:framework_for_generated_wrappers",
|
||||
"//tensorflow/python:lookup_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -205,9 +205,9 @@ py_strict_library(
|
||||
"//tensorflow/python:framework_for_generated_wrappers",
|
||||
"//tensorflow/python:lib",
|
||||
"//tensorflow/python:sparse_tensor",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -238,8 +238,8 @@ py_strict_library(
|
||||
"//tensorflow/core:protos_all_py",
|
||||
"//tensorflow/python:errors",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -347,7 +347,6 @@ py_strict_library(
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:tensor_util",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:versions",
|
||||
"//tensorflow/python/eager:context",
|
||||
@ -360,6 +359,7 @@ py_strict_library(
|
||||
"//tensorflow/python/training/tracking:base",
|
||||
"//tensorflow/python/training/tracking:graph_view",
|
||||
"//tensorflow/python/training/tracking:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@absl_py//absl/logging",
|
||||
],
|
||||
)
|
||||
@ -407,7 +407,6 @@ py_library(
|
||||
"//tensorflow/python:lookup_ops",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:tensor_util",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/distribute:distribute_lib",
|
||||
@ -421,6 +420,7 @@ py_library(
|
||||
"//tensorflow/python/training/tracking:base",
|
||||
"//tensorflow/python/training/tracking:graph_view",
|
||||
"//tensorflow/python/training/tracking:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -604,8 +604,8 @@ py_strict_library(
|
||||
name = "save_options",
|
||||
srcs = ["save_options.py"],
|
||||
deps = [
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@enum34_archive//:enum",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
@ -615,7 +615,7 @@ py_strict_library(
|
||||
name = "load_options",
|
||||
srcs = ["load_options.py"],
|
||||
deps = [
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -628,8 +628,8 @@ py_strict_library(
|
||||
":loader",
|
||||
"//tensorflow/python:lib",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -274,8 +274,8 @@ py_library(
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//tensorflow/python", # TODO(b/34059704): remove when fixed
|
||||
"//tensorflow/python:_pywrap_kernel_registry",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python/util:_pywrap_kernel_registry",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -28,9 +28,9 @@ import sys
|
||||
|
||||
from google.protobuf import text_format
|
||||
from tensorflow.core.framework import graph_pb2
|
||||
from tensorflow.python import _pywrap_kernel_registry
|
||||
from tensorflow.python.platform import gfile
|
||||
from tensorflow.python.platform import tf_logging
|
||||
from tensorflow.python.util import _pywrap_kernel_registry
|
||||
|
||||
# Usually, we use each graph node to induce registration of an op and
|
||||
# corresponding kernel; nodes without a corresponding kernel (perhaps due to
|
||||
|
@ -97,7 +97,7 @@ pytype_library(
|
||||
deps = [
|
||||
":topology",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -171,7 +171,7 @@ pytype_library(
|
||||
srcs_version = "PY2AND3",
|
||||
deps = [
|
||||
"//tensorflow/core/protobuf/tpu:topology_proto_py",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
@ -288,12 +288,12 @@ pytype_library(
|
||||
"//tensorflow/python:function",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python/compiler/xla",
|
||||
"//tensorflow/python/distribute:device_util",
|
||||
"//tensorflow/python/distribute:distribute_lib",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
"@absl_py//absl/logging",
|
||||
"@enum34_archive//:enum",
|
||||
@ -478,7 +478,7 @@ py_library(
|
||||
name = "tpu_name_util",
|
||||
srcs = ["tpu_name_util.py"],
|
||||
deps = [
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -113,9 +113,9 @@ py_library(
|
||||
":warm_starting_util",
|
||||
"//tensorflow/python:learning_rate_decay",
|
||||
"//tensorflow/python:sdca_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/training/experimental:loss_scale_optimizer",
|
||||
"//tensorflow/python/training/experimental:mixed_precision",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -139,7 +139,7 @@ py_library(
|
||||
":training_ops",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -154,7 +154,7 @@ py_library(
|
||||
"//tensorflow/python:constant_op",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -170,7 +170,7 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:init_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -186,8 +186,8 @@ py_library(
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:state_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -197,7 +197,7 @@ py_library(
|
||||
srcs_version = "PY2AND3",
|
||||
deps = [
|
||||
"//tensorflow/python:errors",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -226,11 +226,11 @@ py_library(
|
||||
"//tensorflow/python:io_ops",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/distribute:distribute_lib",
|
||||
"//tensorflow/python/training/saving:saveable_object_util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
@ -242,8 +242,8 @@ py_library(
|
||||
deps = [
|
||||
"//tensorflow/python:errors",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
@ -256,7 +256,7 @@ py_library(
|
||||
":server_lib",
|
||||
"//tensorflow/python:device",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
@ -297,7 +297,7 @@ py_library(
|
||||
"//tensorflow/python:constant_op",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -311,7 +311,7 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -335,10 +335,10 @@ py_library(
|
||||
"//tensorflow/python:sparse_tensor",
|
||||
"//tensorflow/python:summary",
|
||||
"//tensorflow/python:tensor_shape",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
@ -352,7 +352,7 @@ py_library(
|
||||
":training_ops",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -368,11 +368,11 @@ py_library(
|
||||
"//tensorflow/python:init_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:state_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/distribute:distribute_lib",
|
||||
"//tensorflow/python/distribute:reduce_util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -390,7 +390,6 @@ py_library(
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:state_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python:variables",
|
||||
@ -399,6 +398,7 @@ py_library(
|
||||
"//tensorflow/python/eager:backprop",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/training/tracking:base",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
@ -413,7 +413,7 @@ py_library(
|
||||
"//tensorflow/python:constant_op",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -426,7 +426,7 @@ py_library(
|
||||
":training_ops",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -436,8 +436,8 @@ py_library(
|
||||
srcs_version = "PY2AND3",
|
||||
deps = [
|
||||
"//tensorflow/python:_pywrap_quantize_training",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -450,9 +450,9 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:session",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -474,7 +474,7 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:init_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -488,8 +488,8 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:session",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/distribute:distribute_lib",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
@ -532,11 +532,11 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:state_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/distribute:distribute_lib",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -573,10 +573,10 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:state_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/training/saving:saveable_object_util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
@ -795,11 +795,11 @@ py_library(
|
||||
name = "py_checkpoint_reader",
|
||||
srcs = ["py_checkpoint_reader.py"],
|
||||
deps = [
|
||||
"//tensorflow/python:_pywrap_checkpoint_reader",
|
||||
"//tensorflow/python:dtypes",
|
||||
"//tensorflow/python:errors",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/util:_pywrap_checkpoint_reader",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -818,10 +818,10 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:lib",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -867,13 +867,13 @@ py_library(
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:session",
|
||||
"//tensorflow/python:string_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/training/saving:saveable_object",
|
||||
"//tensorflow/python/training/saving:saveable_object_util",
|
||||
"//tensorflow/python/training/tracking:base",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
],
|
||||
)
|
||||
@ -996,8 +996,8 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:init_ops",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
@ -1007,7 +1007,7 @@ py_library(
|
||||
name = "session_run_hook",
|
||||
srcs = ["session_run_hook.py"],
|
||||
srcs_version = "PY2AND3",
|
||||
deps = ["//tensorflow/python:tf_export"],
|
||||
deps = ["//tensorflow/python/util:tf_export"],
|
||||
)
|
||||
|
||||
py_library(
|
||||
@ -1025,10 +1025,10 @@ py_library(
|
||||
"//tensorflow/python:lookup_ops",
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:summary",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -1065,8 +1065,8 @@ py_library(
|
||||
deps = [
|
||||
"//tensorflow/python:errors",
|
||||
"//tensorflow/python:pywrap_tf_session",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -1082,10 +1082,10 @@ py_library(
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:resource_variable_ops",
|
||||
"//tensorflow/python:state_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
@ -1351,10 +1351,10 @@ py_library(
|
||||
"//tensorflow/python:platform",
|
||||
"//tensorflow/python:resources",
|
||||
"//tensorflow/python:summary",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variables",
|
||||
"//tensorflow/python/distribute:distribute_coordinator_context",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
|
@ -15,7 +15,6 @@ py_library(
|
||||
"//tensorflow/python:dtypes",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python:variable_scope",
|
||||
"//tensorflow/python:variables",
|
||||
@ -23,6 +22,7 @@ py_library(
|
||||
"//tensorflow/python/distribute:reduce_util",
|
||||
"//tensorflow/python/eager:context",
|
||||
"//tensorflow/python/training/tracking:base",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
@ -37,9 +37,9 @@ py_library(
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//tensorflow/python:smart_cond",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/distribute:distribute_lib",
|
||||
"//tensorflow/python/training:optimizer",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -17,10 +17,10 @@ from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from tensorflow.python._pywrap_checkpoint_reader import CheckpointReader
|
||||
from tensorflow.python.framework import dtypes
|
||||
from tensorflow.python.framework import errors_impl
|
||||
from tensorflow.python.util import compat
|
||||
from tensorflow.python.util._pywrap_checkpoint_reader import CheckpointReader
|
||||
from tensorflow.python.util.tf_export import tf_export
|
||||
|
||||
|
||||
|
@ -16,7 +16,7 @@ py_library(
|
||||
name = "checkpoint_options",
|
||||
srcs = ["checkpoint_options.py"],
|
||||
deps = [
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -33,7 +33,7 @@ py_strict_library(
|
||||
],
|
||||
deps = [
|
||||
":doc_typealias",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"//third_party/py/numpy",
|
||||
"@typing_extensions_archive//:typing_extensions",
|
||||
],
|
||||
|
627
tensorflow/python/util/BUILD
Normal file
627
tensorflow/python/util/BUILD
Normal file
@ -0,0 +1,627 @@
|
||||
# Tensorflow util package
|
||||
|
||||
load("//tensorflow:tensorflow.bzl", "py_strict_library")
|
||||
|
||||
# buildifier: disable=same-origin-load
|
||||
load("//tensorflow:tensorflow.bzl", "get_compatible_with_portable")
|
||||
|
||||
# buildifier: disable=same-origin-load
|
||||
load("//tensorflow:tensorflow.bzl", "tf_python_pybind_extension")
|
||||
|
||||
# buildifier: disable=same-origin-load
|
||||
load("//tensorflow:tensorflow.bzl", "tf_py_test")
|
||||
|
||||
# buildifier: disable=same-origin-load
|
||||
load("//tensorflow/core/platform:build_config.bzl", "tf_proto_library") # @unused
|
||||
load("//tensorflow/core/platform:build_config_root.bzl", "if_static")
|
||||
|
||||
visibility = [
|
||||
"//engedu/ml/tf_from_scratch:__pkg__",
|
||||
"//third_party/cloud_tpu/convergence_tools:__subpackages__",
|
||||
"//third_party/mlperf:__subpackages__",
|
||||
"//tensorflow:internal",
|
||||
"//tensorflow/lite/toco/python:__pkg__",
|
||||
"//tensorflow_models:__subpackages__",
|
||||
"//tensorflow_model_optimization:__subpackages__",
|
||||
"//third_party/py/cleverhans:__subpackages__",
|
||||
"//third_party/py/launchpad:__subpackages__",
|
||||
"//third_party/py/reverb:__subpackages__",
|
||||
"//third_party/py/neural_structured_learning:__subpackages__",
|
||||
"//third_party/py/tensorflow_examples:__subpackages__",
|
||||
"//third_party/py/tf_agents:__subpackages__", # For benchmarks.
|
||||
"//third_party/py/tf_slim:__subpackages__",
|
||||
"//third_party/py/tensorflow_docs:__subpackages__",
|
||||
"//third_party/py/keras:__subpackages__",
|
||||
]
|
||||
|
||||
package(
|
||||
default_visibility = visibility,
|
||||
licenses = ["notice"], # Apache 2.0
|
||||
)
|
||||
|
||||
# TODO(mdan): Move this utility outside of TF.
|
||||
cc_library(
|
||||
name = "kernel_registry",
|
||||
srcs = ["kernel_registry.cc"],
|
||||
hdrs = ["kernel_registry.h"],
|
||||
deps = [
|
||||
"//tensorflow/core:framework",
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core:protos_all_cc",
|
||||
],
|
||||
alwayslink = 1,
|
||||
)
|
||||
|
||||
tf_python_pybind_extension(
|
||||
name = "_pywrap_tfprof",
|
||||
srcs = ["tfprof_wrapper.cc"],
|
||||
module_name = "_pywrap_tfprof",
|
||||
deps = [
|
||||
"//tensorflow/core:framework_headers_lib",
|
||||
"//tensorflow/core:lib_headers_for_pybind",
|
||||
"//tensorflow/core/profiler/internal:print_model_analysis_hdr",
|
||||
"//third_party/eigen3",
|
||||
"//third_party/python_runtime:headers",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@pybind11",
|
||||
],
|
||||
)
|
||||
|
||||
tf_python_pybind_extension(
|
||||
name = "_pywrap_utils",
|
||||
srcs = ["util_wrapper.cc"],
|
||||
hdrs = ["util.h"],
|
||||
module_name = "_pywrap_utils",
|
||||
deps = [
|
||||
"//tensorflow/python:pybind11_lib",
|
||||
"//third_party/python_runtime:headers",
|
||||
"@pybind11",
|
||||
],
|
||||
)
|
||||
|
||||
tf_python_pybind_extension(
|
||||
name = "_pywrap_kernel_registry",
|
||||
srcs = ["kernel_registry_wrapper.cc"],
|
||||
hdrs = ["kernel_registry.h"],
|
||||
module_name = "_pywrap_kernel_registry",
|
||||
deps = [
|
||||
"//tensorflow/core:framework_headers_lib",
|
||||
"//tensorflow/core:lib_headers_for_pybind",
|
||||
"//tensorflow/core:protos_all_cc",
|
||||
"//tensorflow/python:pybind11_lib",
|
||||
"//third_party/python_runtime:headers",
|
||||
"@pybind11",
|
||||
],
|
||||
)
|
||||
|
||||
tf_python_pybind_extension(
|
||||
name = "_pywrap_stat_summarizer",
|
||||
srcs = ["stat_summarizer_wrapper.cc"],
|
||||
module_name = "_pywrap_stat_summarizer",
|
||||
deps = [
|
||||
"//tensorflow/core:framework_headers_lib",
|
||||
"//tensorflow/core:protos_all_cc",
|
||||
"//third_party/eigen3",
|
||||
"//third_party/python_runtime:headers",
|
||||
"@com_google_absl//absl/memory",
|
||||
"@pybind11",
|
||||
],
|
||||
)
|
||||
|
||||
tf_python_pybind_extension(
|
||||
name = "_pywrap_tensor_float_32_execution",
|
||||
srcs = ["tensor_float_32.cc"],
|
||||
hdrs = ["//tensorflow/core/platform:tensor_float_32_hdr"],
|
||||
compatible_with = get_compatible_with_portable(),
|
||||
module_name = "_pywrap_tensor_float_32_execution",
|
||||
deps = [
|
||||
"@pybind11",
|
||||
],
|
||||
)
|
||||
|
||||
tf_python_pybind_extension(
|
||||
name = "_pywrap_util_port",
|
||||
srcs = ["port_wrapper.cc"],
|
||||
hdrs = ["//tensorflow/core/util:port_hdrs"],
|
||||
module_name = "_pywrap_util_port",
|
||||
deps = [
|
||||
"//tensorflow/core/util:port",
|
||||
"//third_party/python_runtime:headers",
|
||||
"@pybind11",
|
||||
],
|
||||
)
|
||||
|
||||
tf_python_pybind_extension(
|
||||
name = "_pywrap_transform_graph",
|
||||
srcs = ["transform_graph_wrapper.cc"],
|
||||
hdrs = ["//tensorflow/tools/graph_transforms:transform_graph_hdrs"],
|
||||
module_name = "_pywrap_transform_graph",
|
||||
deps = [
|
||||
"//tensorflow/core:framework_headers_lib",
|
||||
"//tensorflow/core:lib_headers_for_pybind",
|
||||
"//tensorflow/core:protos_all_cc",
|
||||
"//tensorflow/python/lib/core:pybind11_status",
|
||||
"//third_party/python_runtime:headers",
|
||||
"@pybind11",
|
||||
],
|
||||
)
|
||||
|
||||
tf_python_pybind_extension(
|
||||
name = "_pywrap_checkpoint_reader",
|
||||
srcs = ["py_checkpoint_reader_wrapper.cc"],
|
||||
hdrs = [
|
||||
"//tensorflow/c:checkpoint_reader_hdrs",
|
||||
"//tensorflow/c:headers",
|
||||
"//tensorflow/c/eager:headers",
|
||||
"//tensorflow/python/lib/core:ndarray_tensor_hdr",
|
||||
"//tensorflow/python/lib/core:py_exception_registry_hdr",
|
||||
"//tensorflow/python/lib/core:safe_ptr_hdr",
|
||||
],
|
||||
module_name = "_pywrap_checkpoint_reader",
|
||||
deps = [
|
||||
"//tensorflow/core:lib_headers_for_pybind",
|
||||
"//tensorflow/core:op_gen_lib",
|
||||
"//tensorflow/core:protos_all_cc",
|
||||
"//tensorflow/core/util/tensor_bundle:tensor_bundle_headers_lib",
|
||||
"//tensorflow/python:pybind11_lib",
|
||||
"//tensorflow/python:pybind11_status",
|
||||
"//tensorflow/python/lib/core:safe_pyobject_ptr",
|
||||
"//third_party/py/numpy:headers",
|
||||
"//third_party/python_runtime:headers",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@pybind11",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "cpp_python_util",
|
||||
srcs = ["util.cc"],
|
||||
hdrs = ["util.h"],
|
||||
deps = [
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/core:lib_internal",
|
||||
"//tensorflow/python/lib/core:safe_ptr",
|
||||
"//tensorflow/python/lib/core:safe_pyobject_ptr",
|
||||
"//third_party/python_runtime:headers",
|
||||
"@com_google_absl//absl/memory",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "decorator_utils_test",
|
||||
srcs = ["decorator_utils_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
"//tensorflow/python:platform",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "deprecation_test",
|
||||
srcs = ["deprecation_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
"//tensorflow/python:platform",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "dispatch_test",
|
||||
srcs = ["dispatch_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
"//tensorflow/python:platform",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "keyword_args_test",
|
||||
srcs = ["keyword_args_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
],
|
||||
)
|
||||
|
||||
py_strict_library(
|
||||
name = "tf_export",
|
||||
srcs = ["tf_export.py"],
|
||||
compatible_with = get_compatible_with_portable(),
|
||||
srcs_version = "PY2AND3",
|
||||
visibility = ["//tensorflow:__subpackages__"],
|
||||
deps = [
|
||||
":tf_decorator",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "tf_export_test",
|
||||
srcs = ["tf_export_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
"//tensorflow/python:platform",
|
||||
],
|
||||
)
|
||||
|
||||
# Leaf library: may not depend on anything else inside TensorFlow.
|
||||
# TODO(mdan): Move this utility outside of TF.
|
||||
py_strict_library(
|
||||
name = "tf_decorator",
|
||||
srcs = [
|
||||
"tf_contextlib.py",
|
||||
"tf_decorator.py",
|
||||
"tf_inspect.py",
|
||||
],
|
||||
compatible_with = get_compatible_with_portable(),
|
||||
srcs_version = "PY2AND3",
|
||||
visibility = [
|
||||
"//tensorflow:__subpackages__",
|
||||
# TODO(mdan): Remove these dependencies.
|
||||
"//third_party/py/tf_slim:__subpackages__",
|
||||
"//learning/deepmind/research/language/translation/lm:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
|
||||
# Note: this is a heavyweight library specialized for TensorFlow graphs. Do not use for
|
||||
# other purposes.
|
||||
py_strict_library(
|
||||
name = "tf_stack",
|
||||
srcs = ["tf_stack.py"],
|
||||
srcs_version = "PY2AND3",
|
||||
# TODO(mdan): Remove public visibility.
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
":_tf_stack",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
|
||||
tf_python_pybind_extension(
|
||||
name = "_tf_stack",
|
||||
srcs = ["tf_stack.cc"],
|
||||
hdrs = [
|
||||
"//tensorflow/c:headers",
|
||||
"//tensorflow/c/eager:headers",
|
||||
# Using header directly is required to avoid ODR violations.
|
||||
"stack_trace.h",
|
||||
],
|
||||
# TODO(b/138203821): change to "util._tf_stack" once the bug is fixed.
|
||||
module_name = "_tf_stack",
|
||||
deps = [
|
||||
"@com_google_absl//absl/algorithm:container",
|
||||
"@com_google_absl//absl/strings",
|
||||
"@com_google_absl//absl/strings:str_format",
|
||||
"@com_google_absl//absl/types:span",
|
||||
"@pybind11",
|
||||
"//third_party/python_runtime:headers", # buildcleaner: keep
|
||||
"//tensorflow/c:pywrap_required_hdrs",
|
||||
"//tensorflow/core/common_runtime:core_cpu_headers_lib",
|
||||
"//tensorflow/core/framework:pywrap_required_hdrs",
|
||||
"//tensorflow/core/platform:path",
|
||||
] + if_static([
|
||||
":stack_trace",
|
||||
]),
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "tf_stack_test",
|
||||
srcs = ["tf_stack_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":tf_export",
|
||||
":tf_stack",
|
||||
"//tensorflow/python:client_testlib",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "stack_trace",
|
||||
srcs = ["stack_trace.cc"],
|
||||
hdrs = ["stack_trace.h"],
|
||||
deps = [
|
||||
"//tensorflow/core/platform:str_util",
|
||||
"//tensorflow/core/platform:stringpiece",
|
||||
"//tensorflow/core/util:abstract_stack_trace",
|
||||
"//third_party/python_runtime:headers", # buildcleaner: keep
|
||||
"@com_google_absl//absl/base:core_headers",
|
||||
"@com_google_absl//absl/container:flat_hash_map",
|
||||
"@com_google_absl//absl/container:flat_hash_set",
|
||||
"@com_google_absl//absl/container:inlined_vector",
|
||||
"@com_google_absl//absl/types:optional",
|
||||
],
|
||||
)
|
||||
|
||||
cc_library(
|
||||
name = "function_parameter_canonicalizer",
|
||||
srcs = ["function_parameter_canonicalizer.cc"],
|
||||
hdrs = ["function_parameter_canonicalizer.h"],
|
||||
deps = [
|
||||
"//tensorflow/core/platform:logging",
|
||||
"//tensorflow/core/platform:macros",
|
||||
"//tensorflow/python/lib/core:py_util",
|
||||
"//tensorflow/python/lib/core:safe_pyobject_ptr",
|
||||
"//third_party/python_runtime:headers", # buildcleaner: keep
|
||||
"@com_google_absl//absl/container:flat_hash_set",
|
||||
"@com_google_absl//absl/types:span",
|
||||
],
|
||||
)
|
||||
|
||||
tf_python_pybind_extension(
|
||||
name = "_function_parameter_canonicalizer_binding_for_test",
|
||||
testonly = True,
|
||||
srcs = ["function_parameter_canonicalizer_binding_for_test.cc"],
|
||||
hdrs = [
|
||||
"function_parameter_canonicalizer.h",
|
||||
],
|
||||
module_name = "_function_parameter_canonicalizer_binding_for_test",
|
||||
deps = [
|
||||
"//tensorflow/core:lib",
|
||||
"//tensorflow/python/lib/core:safe_pyobject_ptr_required_hdrs",
|
||||
"//third_party/python_runtime:headers", # buildcleaner: keep
|
||||
"@com_google_absl//absl/types:span",
|
||||
"@pybind11",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "function_parameter_canonicalizer_test",
|
||||
srcs = ["function_parameter_canonicalizer_test.py"],
|
||||
python_version = "PY3",
|
||||
tags = [
|
||||
"no_pip", # b/168621686
|
||||
"no_windows", # b/169275019
|
||||
],
|
||||
deps = [
|
||||
":_function_parameter_canonicalizer_binding_for_test",
|
||||
"//tensorflow/python:client_testlib",
|
||||
],
|
||||
)
|
||||
|
||||
py_library(
|
||||
name = "util",
|
||||
srcs = glob(
|
||||
["**/*.py"],
|
||||
exclude = [
|
||||
"example_parser*",
|
||||
"tf_contextlib.py",
|
||||
"tf_should_use.py",
|
||||
"tf_export.py",
|
||||
"tf_stack.py",
|
||||
"tf_decorator.py",
|
||||
"**/*_test.py",
|
||||
],
|
||||
),
|
||||
compatible_with = get_compatible_with_portable(),
|
||||
srcs_version = "PY2AND3",
|
||||
visibility = visibility + [
|
||||
"//tensorflow:__pkg__",
|
||||
"//third_party/py/tensorflow_core:__subpackages__",
|
||||
"//third_party/py/tf_agents:__subpackages__",
|
||||
"//third_party/py/tfx:__subpackages__",
|
||||
],
|
||||
deps = [
|
||||
":_pywrap_tensor_float_32_execution",
|
||||
# global_test_configuration is added here because all major tests depend on this
|
||||
# library. It isn't possible to add these test dependencies via tensorflow.bzl's
|
||||
# py_test because not all tensorflow tests use tensorflow.bzl's py_test.
|
||||
"//tensorflow/python:global_test_configuration",
|
||||
":tf_decorator",
|
||||
":tf_export",
|
||||
"@org_python_pypi_backports_weakref",
|
||||
"@com_google_protobuf//:protobuf_python",
|
||||
"//third_party/py/numpy",
|
||||
"@six_archive//:six",
|
||||
"@wrapt",
|
||||
"//tensorflow/tools/docs:doc_controls",
|
||||
"//tensorflow/tools/compatibility:all_renames_v2",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "object_identity_test",
|
||||
size = "small",
|
||||
srcs = ["object_identity_test.py"],
|
||||
python_version = "PY3",
|
||||
)
|
||||
|
||||
# Placeholder for intenal nest_test comments.
|
||||
tf_py_test(
|
||||
name = "nest_test",
|
||||
size = "small",
|
||||
srcs = ["nest_test.py"],
|
||||
main = "nest_test.py",
|
||||
python_version = "PY3",
|
||||
deps = [":nest_test_main_lib"],
|
||||
)
|
||||
|
||||
py_library(
|
||||
name = "nest_test_main_lib",
|
||||
testonly = True,
|
||||
srcs = ["nest_test.py"],
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:array_ops",
|
||||
"//tensorflow/python:client_testlib",
|
||||
"//tensorflow/python:framework",
|
||||
"//tensorflow/python:framework_for_generated_wrappers",
|
||||
"//tensorflow/python:math_ops",
|
||||
"//third_party/py/numpy",
|
||||
"@absl_py//absl/testing:parameterized",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "serialization_test",
|
||||
size = "small",
|
||||
srcs = ["serialization_test.py"],
|
||||
main = "serialization_test.py",
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "function_utils_test",
|
||||
srcs = ["function_utils_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "tf_contextlib_test",
|
||||
size = "small",
|
||||
srcs = ["tf_contextlib_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "tf_decorator_test",
|
||||
size = "small",
|
||||
srcs = ["tf_decorator_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
],
|
||||
)
|
||||
|
||||
py_library(
|
||||
name = "tf_should_use",
|
||||
srcs = ["tf_should_use.py"],
|
||||
srcs_version = "PY2AND3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python/eager:context",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "tf_should_use_test",
|
||||
size = "small",
|
||||
srcs = ["tf_should_use_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":tf_should_use",
|
||||
"//tensorflow/python:client_testlib",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "tf_inspect_test",
|
||||
size = "small",
|
||||
srcs = ["tf_inspect_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
],
|
||||
)
|
||||
|
||||
py_library(
|
||||
name = "example_parser_configuration",
|
||||
srcs = ["example_parser_configuration.py"],
|
||||
srcs_version = "PY2AND3",
|
||||
visibility = ["//visibility:public"],
|
||||
deps = [
|
||||
"//tensorflow/core:protos_all_py",
|
||||
"//tensorflow/python:framework",
|
||||
"//tensorflow/python:framework_for_generated_wrappers",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "lock_util_test",
|
||||
size = "small",
|
||||
srcs = ["lock_util_test.py"],
|
||||
main = "lock_util_test.py",
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
"@absl_py//absl/testing:parameterized",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "module_wrapper_test",
|
||||
size = "small",
|
||||
srcs = ["module_wrapper_test.py"],
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":util",
|
||||
"//tensorflow/python:client_testlib",
|
||||
"//tensorflow/tools/compatibility:all_renames_v2",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
|
||||
tf_proto_library(
|
||||
name = "compare_test_proto",
|
||||
testonly = 1,
|
||||
srcs = ["protobuf/compare_test.proto"],
|
||||
cc_api_version = 2,
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "protobuf_compare_test",
|
||||
size = "small",
|
||||
srcs = ["protobuf/compare_test.py"],
|
||||
main = "protobuf/compare_test.py",
|
||||
python_version = "PY3",
|
||||
tags = ["no_pip"], # compare_test_pb2 proto is not available in pip.
|
||||
deps = [
|
||||
":compare_test_proto_py",
|
||||
":util",
|
||||
"//tensorflow/python:platform_test",
|
||||
"@six_archive//:six",
|
||||
],
|
||||
)
|
||||
|
||||
tf_py_test(
|
||||
name = "example_parser_configuration_test",
|
||||
size = "small",
|
||||
srcs = ["example_parser_configuration_test.py"],
|
||||
main = "example_parser_configuration_test.py",
|
||||
python_version = "PY3",
|
||||
deps = [
|
||||
":example_parser_configuration",
|
||||
"//tensorflow/python:array_ops",
|
||||
"//tensorflow/python:client",
|
||||
"//tensorflow/python:client_testlib",
|
||||
"//tensorflow/python:framework_for_generated_wrappers",
|
||||
"//tensorflow/python:parsing_ops",
|
||||
],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "util_hdr",
|
||||
srcs = ["util.h"],
|
||||
)
|
||||
|
||||
filegroup(
|
||||
name = "compare_test_proto_src",
|
||||
srcs = ["protobuf/compare_test.proto"],
|
||||
)
|
@ -18,8 +18,8 @@ from __future__ import absolute_import
|
||||
from __future__ import division
|
||||
from __future__ import print_function
|
||||
|
||||
from tensorflow.python import _function_parameter_canonicalizer_binding_for_test
|
||||
from tensorflow.python.platform import test
|
||||
from tensorflow.python.util import _function_parameter_canonicalizer_binding_for_test
|
||||
|
||||
|
||||
class FunctionParameterCanonicalizerTest(test.TestCase):
|
||||
|
@ -47,10 +47,10 @@ import collections as _collections
|
||||
import six as _six
|
||||
import wrapt as _wrapt
|
||||
|
||||
from tensorflow.python import _pywrap_utils
|
||||
from tensorflow.python.platform import tf_logging
|
||||
from tensorflow.python.util import _pywrap_utils
|
||||
from tensorflow.python.util.compat import collections_abc as _collections_abc
|
||||
from tensorflow.python.util.tf_export import tf_export
|
||||
from tensorflow.python.platform import tf_logging
|
||||
|
||||
|
||||
_SHALLOW_TREE_HAS_INVALID_KEYS = (
|
||||
|
@ -25,7 +25,7 @@ import threading
|
||||
import six
|
||||
|
||||
# TODO(b/138203821): change to from ...util import ... once the bug is fixed.
|
||||
from tensorflow.python import _tf_stack
|
||||
from tensorflow.python.util import _tf_stack
|
||||
|
||||
# Generally such lookups should be done using `threading.local()`. See
|
||||
# https://blogs.gnome.org/jamesh/2008/06/11/tls-python/ for a detailed
|
||||
|
@ -1,4 +1,4 @@
|
||||
[//tensorflow/python:cpp_python_util] # util tfe
|
||||
[//tensorflow/python/util:cpp_python_util] # util tfe
|
||||
tensorflow::swig::IsSequence
|
||||
tensorflow::swig::IsSequenceOrComposite
|
||||
tensorflow::swig::IsCompositeTensor
|
||||
|
@ -183,8 +183,8 @@ py_library(
|
||||
":base_dir_oss",
|
||||
"//tensorflow:tensorflow_py",
|
||||
"//tensorflow/python:framework_ops",
|
||||
"//tensorflow/python:tf_export",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/util:tf_export",
|
||||
"@absl_py//absl:app",
|
||||
"@absl_py//absl/flags",
|
||||
],
|
||||
|
@ -223,6 +223,7 @@ filegroup(
|
||||
visibility = [
|
||||
"//tensorflow/core:__pkg__",
|
||||
"//tensorflow/python:__pkg__",
|
||||
"//tensorflow/python/util:__pkg__",
|
||||
],
|
||||
)
|
||||
|
||||
@ -336,9 +337,9 @@ py_library(
|
||||
srcs_version = "PY2AND3",
|
||||
deps = [
|
||||
"//tensorflow/core:protos_all_py",
|
||||
"//tensorflow/python:_pywrap_transform_graph",
|
||||
"//tensorflow/python:errors",
|
||||
"//tensorflow/python:util",
|
||||
"//tensorflow/python/util:_pywrap_transform_graph",
|
||||
],
|
||||
)
|
||||
|
||||
|
@ -19,8 +19,8 @@ from __future__ import print_function
|
||||
|
||||
# pylint: disable=unused-import,wildcard-import, line-too-long
|
||||
from tensorflow.core.framework import graph_pb2
|
||||
from tensorflow.python._pywrap_transform_graph import TransformGraphWithStringInputs
|
||||
from tensorflow.python.util import compat
|
||||
from tensorflow.python.util._pywrap_transform_graph import TransformGraphWithStringInputs
|
||||
|
||||
|
||||
def TransformGraph(input_graph_def, inputs, outputs, transforms):
|
||||
|
@ -46,8 +46,6 @@ transitive_hdrs(
|
||||
# Code that relies on these headers should dynamically link to
|
||||
# _pywrap_tensorflow_internal.so as well.
|
||||
"//tensorflow/python:model_analyzer_lib",
|
||||
"//tensorflow/python:kernel_registry",
|
||||
"//tensorflow/python:cpp_python_util",
|
||||
"//tensorflow/python/lib/core:py_exception_registry",
|
||||
"//tensorflow/python/lib/core:pybind11_proto",
|
||||
"//tensorflow/python/lib/core:pybind11_absl",
|
||||
@ -57,6 +55,8 @@ transitive_hdrs(
|
||||
"//tensorflow/python/lib/core:py_seq_tensor",
|
||||
"//tensorflow/python/lib/core:py_util",
|
||||
"//tensorflow/python/lib/io:py_record_reader_lib",
|
||||
"//tensorflow/python/util:cpp_python_util",
|
||||
"//tensorflow/python/util:kernel_registry",
|
||||
"//tensorflow/python:python_op_gen",
|
||||
"//tensorflow/python:tf_session_helper",
|
||||
"//third_party/eigen3",
|
||||
@ -116,7 +116,6 @@ COMMON_PIP_DEPS = [
|
||||
"//tensorflow/python/training/experimental:loss_scale_optimizer",
|
||||
"//tensorflow/python:memory_checker",
|
||||
"//tensorflow/python:meta_graph_testdata",
|
||||
"//tensorflow/python:util_example_parser_configuration",
|
||||
"//tensorflow/python/data/benchmarks:benchmark_base",
|
||||
"//tensorflow/python/data/experimental/kernel_tests/serialization:dataset_serialization_test_base",
|
||||
"//tensorflow/python/data/experimental/kernel_tests:data_service_test_base",
|
||||
@ -147,6 +146,7 @@ COMMON_PIP_DEPS = [
|
||||
"//tensorflow/python/tools:tools_pip",
|
||||
"//tensorflow/python/tools/api/generator:create_python_api",
|
||||
"//tensorflow/python/tpu",
|
||||
"//tensorflow/python/util:example_parser_configuration",
|
||||
"//tensorflow/python:image_grad_test_base",
|
||||
"//tensorflow/python:test_ops",
|
||||
"//tensorflow/python:while_v2",
|
||||
|
@ -87,7 +87,7 @@ DEPENDENCY_DENYLIST = [
|
||||
"//tensorflow/python/debug:grpc_tensorflow_server.par",
|
||||
"//tensorflow/python/feature_column:vocabulary_testdata",
|
||||
"//tensorflow/python:framework/test_file_system.so",
|
||||
"//tensorflow/python:util_nest_test_main_lib",
|
||||
"//tensorflow/python/util:nest_test_main_lib",
|
||||
# lite
|
||||
"//tensorflow/lite/experimental/examples/lstm:rnn_cell",
|
||||
"//tensorflow/lite/experimental/examples/lstm:rnn_cell.py",
|
||||
|
Loading…
Reference in New Issue
Block a user