PY2 removal cleanup

PiperOrigin-RevId: 352907145
Change-Id: I82de30d92dc9c2b53215d6d5732c67afe339c23d
This commit is contained in:
A. Unique TensorFlower 2021-01-20 17:06:07 -08:00 committed by TensorFlower Gardener
parent 5c4b601d2d
commit 985ad0276a
87 changed files with 291 additions and 292 deletions

View File

@ -125,7 +125,7 @@ def tf_xla_py_test(
py_test(
name = updated_name,
srcs = srcs,
srcs_version = "PY2AND3",
srcs_version = "PY3",
args = backend_args,
main = "{}.py".format(name) if main == None else main,
data = data + backend_data,

View File

@ -271,7 +271,7 @@ tf_gen_op_wrapper_py(
tf_custom_op_py_library(
name = "trt_ops_loader",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":_pywrap_py_utils",
":trt_ops",

View File

@ -54,7 +54,7 @@ def pyx_library(
py_deps = [],
srcs = [],
testonly = None,
srcs_version = "PY2AND3",
srcs_version = "PY3",
**kwargs):
"""Compiles a group of .pyx / .pxd / .py files.
@ -454,7 +454,7 @@ def tf_proto_library_py(
deps = [],
visibility = None,
testonly = 0,
srcs_version = "PY2AND3",
srcs_version = "PY3",
use_grpc_plugin = False):
py_deps = tf_deps(protodeps, "_py")
py_name = name + "_py"
@ -552,7 +552,7 @@ def tf_proto_library(
testonly = testonly,
srcs = srcs,
protodeps = protodeps,
srcs_version = "PY2AND3",
srcs_version = "PY3",
use_grpc_plugin = has_services,
visibility = visibility,
)

View File

@ -6,8 +6,7 @@ load(
"tf_cuda_tests_tags",
"tf_exec_properties",
)
load("//tensorflow:tensorflow.bzl", "tf_custom_op_library")
load("//tensorflow:tensorflow.bzl", "tf_cc_binary")
load("//tensorflow:tensorflow.bzl", "tf_cc_binary", "tf_custom_op_library")
package(
default_visibility = ["//tensorflow:internal"],
@ -69,7 +68,7 @@ py_test(
size = "small",
srcs = ["zero_out_1_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_pip",
"notap",
@ -85,7 +84,7 @@ py_test(
size = "small",
srcs = ["zero_out_2_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_pip",
"notap",
@ -102,7 +101,7 @@ py_test(
size = "small",
srcs = ["zero_out_3_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_pip",
"notap",
@ -133,7 +132,7 @@ py_test(
srcs = ["cuda_op_test.py"],
exec_properties = tf_exec_properties({"tags": tf_cuda_tests_tags()}),
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = tf_cuda_tests_tags() + [
"notap",
"no_pip",
@ -149,7 +148,7 @@ py_test(
size = "small",
srcs = ["fact_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = ["//tensorflow:tensorflow_py"],
)

View File

@ -55,7 +55,7 @@ py_binary(
srcs = ["label_image.py"],
main = "label_image.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow:tensorflow_py",
],

View File

@ -12,7 +12,7 @@ py_binary(
srcs = ["accuracy_utils.py"],
main = "accuracy_utils.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow:tensorflow_py",
"//third_party/py/numpy",
@ -25,7 +25,7 @@ py_binary(
srcs = ["recognize_commands.py"],
main = "recognize_commands.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow:tensorflow_py",
"//third_party/py/numpy",
@ -38,7 +38,7 @@ py_binary(
srcs = ["test_streaming_accuracy.py"],
main = "test_streaming_accuracy.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":accuracy_utils_py",
":recognize_commands_py",
@ -106,7 +106,7 @@ py_binary(
name = "train",
srcs = ["train.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":train_main_lib"],
)
@ -143,7 +143,7 @@ py_binary(
name = "freeze",
srcs = ["freeze.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":freeze_main_lib"],
)
@ -188,7 +188,7 @@ py_binary(
name = "wav_to_features",
srcs = ["wav_to_features.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":wav_to_features_main_lib"],
)
@ -230,7 +230,7 @@ py_binary(
name = "generate_streaming_test_wav",
srcs = ["generate_streaming_test_wav.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":generate_streaming_test_wav_main_lib"],
)
@ -288,7 +288,7 @@ py_binary(
name = "label_wav",
srcs = ["label_wav.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":label_wav_main_lib"],
)

View File

@ -778,7 +778,7 @@ def gen_model_coverage_test(src, model_name, data, failure_type, tags, size = "m
"--target_ops=%s" % target_op_sets,
] + args,
data = data,
srcs_version = "PY2AND3",
srcs_version = "PY3",
python_version = "PY3",
tags = [
"no_gpu", # Executing with TF GPU configurations is redundant.

View File

@ -8,7 +8,7 @@ py_binary(
srcs = ["label_image.py"],
main = "label_image.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow:tensorflow_py",
],

View File

@ -79,7 +79,7 @@ py_binary(
name = "convert_binary_to_cc_source",
srcs = ["convert_binary_to_cc_source.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -51,7 +51,7 @@ py_test(
size = "medium",
srcs = ["unidirectional_sequence_lstm_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_oss",
"no_pip",
@ -74,7 +74,7 @@ py_test(
size = "medium",
srcs = ["unidirectional_sequence_rnn_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_oss",
"no_pip",
@ -97,7 +97,7 @@ py_test(
size = "medium",
srcs = ["bidirectional_sequence_lstm_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_oss",
"no_pip",
@ -120,7 +120,7 @@ py_test(
size = "medium",
srcs = ["bidirectional_sequence_rnn_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_oss",
"no_pip",

View File

@ -84,7 +84,7 @@ tf_custom_op_py_library(
kernels = [
":audio_microfrontend_op_op_lib",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":audio_microfrontend_op",
"//tensorflow/python:array_ops",

View File

@ -20,7 +20,7 @@ py_test(
name = "ops_util_test",
srcs = ["ops_util_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ops_util",
"//tensorflow/python:client_testlib",

View File

@ -37,7 +37,7 @@ py_test(
"//tensorflow/lite/python/testdata:test_delegate.so",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_mac", # TODO(b/148247402): flatbuffers import broken on Mac OS.
"no_windows",
@ -59,7 +59,7 @@ py_binary(
name = "tflite_convert",
srcs = ["tflite_convert.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
deps = [
":tflite_convert_main_lib",
@ -129,7 +129,7 @@ py_test(
python_version = "PY3",
# Increased thread count for reducing timeout failures.
shard_count = 10,
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_oss",
"no_pip",
@ -194,7 +194,7 @@ py_test(
],
python_version = "PY3",
shard_count = 4,
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
],
@ -215,7 +215,7 @@ py_test(
],
python_version = "PY3",
shard_count = 12,
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_mac", # TODO(b/148247402): flatbuffers import broken on Mac OS.
"no_windows",
@ -251,7 +251,7 @@ py_test(
name = "lite_flex_test",
srcs = ["lite_flex_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":lite",
":test_util",
@ -291,7 +291,7 @@ py_test(
name = "util_test",
srcs = ["util_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_mac", # TODO(b/148247402): flatbuffers import broken on Mac OS.
"no_windows",
@ -385,7 +385,7 @@ py_test(
name = "convert_test",
srcs = ["convert_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":convert",
":interpreter",
@ -417,7 +417,7 @@ py_test(
name = "convert_saved_model_test",
srcs = ["convert_saved_model_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
],
@ -438,7 +438,7 @@ py_binary(
name = "convert_file_to_c_source",
srcs = ["convert_file_to_c_source.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
deps = [
":util",

View File

@ -65,7 +65,7 @@ py_test(
"//tensorflow/lite:testdata/multi_add.bin",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["no_oss"],
deps = [
":calibrator",

View File

@ -134,7 +134,7 @@ tf_custom_op_py_library(
srcs = ["double_op.py"],
dso = [":_double_op.so"],
kernels = [":double_op_and_kernels"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":gen_double_op_wrapper",
"//tensorflow/python:framework_for_generated_wrappers",

View File

@ -54,7 +54,7 @@ py_test(
size = "small",
srcs = ["upgrade_schema_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"manual",
"no_oss",

View File

@ -152,7 +152,7 @@ py_binary(
name = "generate_examples",
srcs = ["generate_examples.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":generate_examples_lib",
":toco_convert",

View File

@ -7,7 +7,7 @@ licenses(["notice"]) # Apache 2.0
py_library(
name = "model_coverage_lib",
srcs = ["model_coverage_lib.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["no_pip"],
deps = [
"//tensorflow:tensorflow_py",
@ -20,7 +20,7 @@ py_test(
name = "model_coverage_lib_test",
srcs = ["model_coverage_lib_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"manual",
"no_oss",

View File

@ -82,7 +82,7 @@ py_test(
"//tensorflow/lite/toco/logging/testdata:toco_tflite_graph.dot",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":gen_html",
":toco_conversion_log_proto_py",

View File

@ -90,7 +90,7 @@ py_binary(
name = "toco_from_protos",
srcs = ["toco_from_protos.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/python:_pywrap_toco_api",
"//tensorflow/python:platform",

View File

@ -17,7 +17,7 @@ py_binary(
name = "visualize",
srcs = ["visualize.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/lite/python:schema_py",
"//third_party/py/numpy",
@ -28,7 +28,7 @@ py_test(
name = "visualize_test",
srcs = ["visualize_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_mac", # TODO(b/148247402): flatbuffers import broken on Mac OS.
],
@ -44,7 +44,7 @@ py_binary(
name = "convert_image_to_csv",
srcs = ["convert_image_to_csv.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/python:errors",
"//tensorflow/python:framework_ops",
@ -61,7 +61,7 @@ py_test(
srcs = ["convert_image_to_csv_test.py"],
data = ["//tensorflow/core:image_testdata"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":convert_image_to_csv",
"//tensorflow/python:client_testlib",
@ -76,7 +76,7 @@ py_binary(
name = "strip_strings",
srcs = ["strip_strings.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":flatbuffer_utils",
"@absl_py//absl:app",
@ -88,7 +88,7 @@ py_binary(
name = "reverse_xxd_dump_from_cc",
srcs = ["reverse_xxd_dump_from_cc.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":flatbuffer_utils",
"@absl_py//absl:app",
@ -100,7 +100,7 @@ py_binary(
name = "randomize_weights",
srcs = ["randomize_weights.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":flatbuffer_utils",
"@absl_py//absl:app",
@ -123,7 +123,7 @@ py_test(
name = "flatbuffer_utils_test",
srcs = ["flatbuffer_utils_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_mac", # TODO(b/148247402): flatbuffers import broken on Mac OS.
],

View File

@ -12,7 +12,7 @@ py_binary(
name = "preprocess_coco_minival",
srcs = ["preprocess_coco_minival.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
deps = [
"//tensorflow/lite/tools/evaluation/proto:evaluation_stages_py",

View File

@ -83,7 +83,7 @@ py_test(
srcs = ["signature_def_utils_test.py"],
data = ["//tensorflow/lite:testdata/add.bin"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_mac",
],

View File

@ -1653,7 +1653,7 @@ py_test(
srcs = ["framework/composite_tensor_test.py"],
main = "framework/composite_tensor_test.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":composite_tensor",
":framework",
@ -1863,7 +1863,7 @@ py_test(
name = "test_combinations_test",
srcs = ["framework/test_combinations_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":framework_test_combinations_lib",
"//tensorflow/python/eager:test",
@ -2003,7 +2003,7 @@ py_test(
name = "functional_ops_test",
srcs = ["ops/functional_ops_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":client_testlib",
":dtypes",
@ -2669,7 +2669,7 @@ cuda_py_test(
size = "small",
srcs = ["ops/batch_ops_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"manual",
"no_cuda_asan", # b/177916286
@ -4631,7 +4631,7 @@ py_test(
name = "op_selector_test",
srcs = ["ops/op_selector_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":client_testlib",
":constant_op",
@ -5868,7 +5868,7 @@ py_test(
name = "ops/array_ops_test",
srcs = ["ops/array_ops_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":array_ops",
":client_testlib",
@ -6430,7 +6430,7 @@ py_binary(
"grappler/cost_analyzer_tool.py",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":cost_analyzer",
":framework_for_generated_wrappers",
@ -6739,7 +6739,7 @@ py_binary(
"grappler/graph_analyzer.py",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":_pywrap_graph_analyzer",
":framework_for_generated_wrappers",
@ -6793,7 +6793,7 @@ py_test(
name = "tf2_test",
srcs = ["framework/tf2_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":client_testlib",
":framework_combinations",

View File

@ -12,7 +12,7 @@ py_binary(
srcs = ["autotune_benchmark.py"],
main = "autotune_benchmark.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/python:client_testlib",
"//tensorflow/python:math_ops",

View File

@ -22,7 +22,7 @@ py_test(
size = "small",
srcs = ["nest_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":nest",
"//tensorflow/python:array_ops",
@ -55,7 +55,7 @@ py_test(
size = "small",
srcs = ["sparse_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":nest",
":sparse",
@ -91,7 +91,7 @@ py_test(
size = "small",
srcs = ["structure_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":nest",
":structure",
@ -128,7 +128,7 @@ py_test(
size = "small",
srcs = ["options_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":options",
"//tensorflow/python:client_testlib",
@ -152,7 +152,7 @@ py_test(
size = "small",
srcs = ["convert_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":convert",
"//tensorflow/python:client_testlib",
@ -177,7 +177,7 @@ py_test(
size = "small",
srcs = ["random_seed_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":random_seed",
"//tensorflow/python:client_testlib",
@ -199,7 +199,7 @@ py_test(
size = "small",
srcs = ["traverse_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":traverse",
"//tensorflow/python:client_testlib",

View File

@ -207,7 +207,7 @@ py_binary(
name = "grpc_tensorflow_server",
srcs = ["lib/grpc_tensorflow_server.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":grpc_tensorflow_server_lib"],
)
@ -482,7 +482,7 @@ py_binary(
name = "offline_analyzer",
srcs = ["cli/offline_analyzer.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":offline_analyzer_lib"],
)
@ -524,7 +524,7 @@ py_binary(
name = "debug_fibonacci",
srcs = ["examples/v1/debug_fibonacci.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":debug_fibonacci_lib"],
)
@ -532,7 +532,7 @@ py_binary(
name = "debug_fibonacci_v2",
srcs = ["examples/v2/debug_fibonacci_v2.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":debug_fibonacci_lib"],
)
@ -555,7 +555,7 @@ py_binary(
name = "debug_errors",
srcs = ["examples/v1/debug_errors.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":debug_errors_lib"],
)
@ -574,7 +574,7 @@ py_binary(
name = "debug_mnist",
srcs = ["examples/debug_mnist.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":debug_mnist_lib"],
)
@ -582,7 +582,7 @@ py_binary(
name = "debug_mnist_v1",
srcs = ["examples/v1/debug_mnist_v1.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":debug_mnist_lib"],
)
@ -590,7 +590,7 @@ py_binary(
name = "debug_mnist_v2",
srcs = ["examples/v2/debug_mnist_v2.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":debug_mnist_lib"],
)
@ -612,7 +612,7 @@ py_binary(
name = "debug_tflearn_iris",
srcs = ["examples/v1/debug_tflearn_iris.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":debug_tflearn_iris_lib"],
)
@ -631,7 +631,7 @@ py_binary(
name = "debug_keras",
srcs = ["examples/v1/debug_keras.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":debug_keras_lib"],
)
@ -651,7 +651,7 @@ py_test(
size = "small",
srcs = ["lib/common_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":common",
"//tensorflow/python:client",
@ -666,7 +666,7 @@ py_test(
size = "medium",
srcs = ["lib/debug_events_monitors_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows", # b/142475891
],
@ -688,7 +688,7 @@ py_test(
size = "medium",
srcs = ["lib/debug_events_writer_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows", # b/142475891
],
@ -707,7 +707,7 @@ py_test(
size = "small",
srcs = ["lib/debug_graphs_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":debug_graphs",
"//tensorflow/python:client_testlib",
@ -720,7 +720,7 @@ py_test(
size = "small",
srcs = ["lib/debug_data_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":debug_data",
"//tensorflow/core:protos_all_py",
@ -820,7 +820,7 @@ py_test(
size = "small",
srcs = ["lib/debug_utils_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":debug_utils",
"//tensorflow/core:protos_all_py",
@ -840,7 +840,7 @@ py_test(
size = "small",
srcs = ["lib/source_utils_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
],
@ -870,7 +870,7 @@ py_test(
size = "small",
srcs = ["lib/source_remote_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
"oss_serial",
@ -897,7 +897,7 @@ py_test(
size = "medium",
srcs = ["wrappers/framework_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["no_rocm"],
deps = [
":debug_data",
@ -923,7 +923,7 @@ py_test(
size = "small",
srcs = ["lib/profiling_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":profiling",
"//tensorflow/core:protos_all_py",
@ -937,7 +937,7 @@ py_test(
size = "small",
srcs = ["cli/curses_ui_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
],
@ -958,7 +958,7 @@ py_test(
size = "small",
srcs = ["cli/readline_ui_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":cli_config",
":debugger_cli_common",
@ -1118,7 +1118,7 @@ py_test(
size = "small",
srcs = ["cli/debugger_cli_common_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":debugger_cli_common",
"//tensorflow/python:framework_test_lib",
@ -1134,7 +1134,7 @@ py_test(
size = "small",
srcs = ["cli/cli_config_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":cli_config",
"//tensorflow/python:framework_test_lib",
@ -1148,7 +1148,7 @@ py_test(
size = "small",
srcs = ["cli/command_parser_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":command_parser",
"//tensorflow/python:framework_test_lib",
@ -1161,7 +1161,7 @@ py_test(
size = "small",
srcs = ["cli/tensor_format_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":cli_test_utils",
":debug_data",
@ -1179,7 +1179,7 @@ py_test(
size = "small",
srcs = ["cli/cli_shared_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":cli_shared",
":debugger_cli_common",
@ -1199,7 +1199,7 @@ py_test(
"cli/evaluator_test.py",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":debug_data",
":evaluator",
@ -1252,7 +1252,7 @@ py_test(
size = "small",
srcs = ["cli/profile_analyzer_cli_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":debugger_cli_common",
":profile_analyzer_cli",
@ -1361,7 +1361,7 @@ py_test(
size = "small",
srcs = ["wrappers/dumping_wrapper_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":debug_data",
":dumping_wrapper",
@ -1384,7 +1384,7 @@ py_test(
size = "small",
srcs = ["wrappers/local_cli_wrapper_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":cli_shared",
":debugger_cli_common",
@ -1412,7 +1412,7 @@ py_test(
size = "small",
srcs = ["wrappers/disk_usage_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":dumping_wrapper",
":hooks",

View File

@ -161,7 +161,7 @@ py_test(
size = "small",
srcs = ["distribute_lib_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":combinations",
":distribute_lib",
@ -210,7 +210,7 @@ py_test(
size = "medium",
srcs = ["distribute_coordinator_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":distribute_coordinator",
"//tensorflow/core:protos_all_py",
@ -487,7 +487,7 @@ py_test(
size = "small",
srcs = ["numpy_dataset_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":numpy_dataset",
"//tensorflow/python:framework_test_lib",
@ -547,7 +547,7 @@ py_test(
name = "multi_worker_util_test",
srcs = ["multi_worker_util_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":multi_worker_util",
"//tensorflow/core:protos_all_py",
@ -702,7 +702,7 @@ py_test(
name = "shared_variable_creator_test",
srcs = ["shared_variable_creator_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":shared_variable_creator",
"//tensorflow/python:framework_test_lib",
@ -939,7 +939,7 @@ py_library(
tf_py_test(
name = "multi_worker_test_base_test",
srcs = ["multi_worker_test_base_test.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_oss", # TODO(b/170834611)
],

View File

@ -18,7 +18,7 @@ py_library(
cuda_py_test(
name = "dlpack_test",
srcs = ["dlpack_test.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_tfrt", # TODO(b/177356372)
],

View File

@ -343,7 +343,7 @@ py_test(
name = "profiler_client_test",
srcs = ["profiler_client_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_pip",
"no_windows",
@ -1135,7 +1135,7 @@ py_binary(
name = "gradient_input_output_exclusions",
srcs = ["gradient_input_output_exclusions.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow:tensorflow_py",
],
@ -1153,7 +1153,7 @@ py_test(
"//tensorflow/python/eager:pywrap_gradient_exclusions.cc",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_pip", # No point linking the gen script in the pip package.
],

View File

@ -232,7 +232,7 @@ py_test(
name = "sequence_feature_column_integration_test",
srcs = ["sequence_feature_column_integration_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["no_pip"],
deps = [
":feature_column_v2",

View File

@ -162,7 +162,7 @@ tf_py_test(
name = "sequence_feature_column_integration_test",
srcs = ["sequence_feature_column_integration_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["no_pip"],
deps = [
":dense_features",

View File

@ -68,7 +68,7 @@ tf_py_test(
"policy_test.py",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["no_rocm"],
deps = [
":policy",
@ -93,7 +93,7 @@ py_library(
cuda_py_test(
name = "device_compatibility_check_test",
srcs = ["device_compatibility_check_test.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
tfrt_enabled = True,
deps = [
":device_compatibility_check",
@ -114,7 +114,7 @@ py_library(
tf_py_test(
name = "get_layer_policy_test",
srcs = ["get_layer_policy_test.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":get_layer_policy",
":policy",

View File

@ -53,7 +53,7 @@ tf_py_test(
srcs = ["wide_deep_test.py"],
python_version = "PY3",
shard_count = 2,
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":premade",
"//tensorflow/python:client_testlib",

View File

@ -14,7 +14,7 @@ filegroup(
py_strict_library(
name = "types",
srcs = ["types.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"@six_archive//:six",
],

View File

@ -36,7 +36,7 @@ py_test(
size = "small",
srcs = ["util_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":losses",
"//tensorflow/python:client_testlib",

View File

@ -493,7 +493,7 @@ py_test(
name = "ragged_tensor_test",
srcs = ["ragged_tensor_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
],
@ -528,7 +528,7 @@ py_test(
srcs = ["ragged_getitem_test.py"],
python_version = "PY3",
shard_count = 4,
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
],
@ -559,7 +559,7 @@ py_test(
name = "row_partition_test",
srcs = ["row_partition_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
],
@ -586,7 +586,7 @@ py_test(
size = "medium",
srcs = ["ragged_eager_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
"//tensorflow/python:framework_ops",
@ -600,7 +600,7 @@ py_test(
name = "ragged_range_op_test",
srcs = ["ragged_range_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_math_ops",
"//tensorflow/python:errors",
@ -613,7 +613,7 @@ py_test(
name = "ragged_tensor_bounding_shape_op_test",
srcs = ["ragged_tensor_bounding_shape_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
":ragged_tensor",
@ -626,7 +626,7 @@ py_test(
name = "ragged_row_lengths_op_test",
srcs = ["ragged_row_lengths_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
":ragged_tensor",
@ -642,7 +642,7 @@ py_test(
srcs = ["ragged_gather_op_test.py"],
python_version = "PY3",
shard_count = 4,
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"notsan", # TODO(b/170902201): Flaky
],
@ -664,7 +664,7 @@ py_test(
name = "ragged_batch_gather_op_test",
srcs = ["ragged_batch_gather_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_batch_gather_ops",
":ragged_batch_gather_with_default_op",
@ -685,7 +685,7 @@ py_test(
name = "ragged_gather_nd_op_test",
srcs = ["ragged_gather_nd_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
":ragged_gather_ops",
@ -704,7 +704,7 @@ py_test(
name = "ragged_row_splits_to_segment_ids_op_test",
srcs = ["ragged_row_splits_to_segment_ids_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":segment_id_ops",
"//tensorflow/python:constant_op",
@ -717,7 +717,7 @@ py_test(
name = "ragged_segment_ids_to_row_splits_op_test",
srcs = ["ragged_segment_ids_to_row_splits_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":segment_id_ops",
"//tensorflow/python:constant_op",
@ -730,7 +730,7 @@ py_test(
name = "ragged_from_tensor_op_test",
srcs = ["ragged_from_tensor_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_tensor",
"//tensorflow/python:array_ops",
@ -746,7 +746,7 @@ py_test(
name = "ragged_to_sparse_op_test",
srcs = ["ragged_to_sparse_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
],
@ -770,7 +770,7 @@ py_test(
name = "ragged_from_sparse_op_test",
srcs = ["ragged_from_sparse_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_tensor",
"//tensorflow/python:array_ops",
@ -787,7 +787,7 @@ py_test(
name = "ragged_to_tensor_op_test",
srcs = ["ragged_to_tensor_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
"//tensorflow/python:framework_ops",
@ -807,7 +807,7 @@ py_test(
name = "ragged_segment_op_test",
srcs = ["ragged_segment_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
":ragged_math_ops",
@ -825,7 +825,7 @@ py_test(
name = "ragged_reduce_op_test",
srcs = ["ragged_reduce_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
":ragged_math_ops",
@ -844,7 +844,7 @@ py_test(
name = "ragged_map_flat_values_op_test",
srcs = ["ragged_map_flat_values_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
":ragged_functional_ops",
@ -863,7 +863,7 @@ py_test(
name = "ragged_const_op_test",
srcs = ["ragged_const_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged",
":ragged_factory_ops",
@ -880,7 +880,7 @@ py_test(
name = "strings_reduce_join_op_test",
srcs = ["strings_reduce_join_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged",
":ragged_factory_ops",
@ -899,7 +899,7 @@ py_test(
name = "ragged_constant_value_op_test",
srcs = ["ragged_constant_value_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
],
@ -917,7 +917,7 @@ py_test(
name = "convert_to_tensor_or_ragged_tensor_op_test",
srcs = ["convert_to_tensor_or_ragged_tensor_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
":ragged_tensor",
@ -934,7 +934,7 @@ py_test(
name = "ragged_boolean_mask_op_test",
srcs = ["ragged_boolean_mask_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_array_ops",
":ragged_factory_ops",
@ -952,7 +952,7 @@ py_test(
name = "ragged_concat_op_test",
srcs = ["ragged_concat_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_concat_ops",
":ragged_factory_ops",
@ -971,7 +971,7 @@ py_test(
name = "ragged_stack_op_test",
srcs = ["ragged_stack_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_concat_ops",
":ragged_factory_ops",
@ -986,7 +986,7 @@ py_test(
name = "ragged_rank_op_test",
srcs = ["ragged_rank_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_array_ops",
":ragged_factory_ops",
@ -1000,7 +1000,7 @@ py_test(
name = "ragged_tile_op_test",
srcs = ["ragged_tile_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_array_ops",
":ragged_factory_ops",
@ -1017,7 +1017,7 @@ py_test(
name = "ragged_util_test",
srcs = ["ragged_util_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_util",
"//tensorflow/python:array_ops",
@ -1033,7 +1033,7 @@ py_test(
name = "ragged_expand_dims_op_test",
srcs = ["ragged_expand_dims_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_array_ops",
":ragged_factory_ops",
@ -1047,7 +1047,7 @@ py_test(
name = "ragged_where_op_test",
srcs = ["ragged_where_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
":ragged_where_op",
@ -1061,7 +1061,7 @@ py_test(
name = "ragged_dispatch_test",
srcs = ["ragged_dispatch_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged", # fixdeps: keep
":ragged_dispatch",
@ -1090,7 +1090,7 @@ py_test(
name = "ragged_operators_test",
srcs = ["ragged_operators_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged", # fixdeps: keep
":ragged_factory_ops",
@ -1104,7 +1104,7 @@ py_test(
size = "small",
srcs = ["ragged_map_fn_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged", # fixdeps: keep
":ragged_factory_ops",
@ -1128,7 +1128,7 @@ py_test(
name = "ragged_tensor_shape_test",
srcs = ["ragged_tensor_shape_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged", # fixdeps: keep
":ragged_factory_ops",
@ -1146,7 +1146,7 @@ py_test(
name = "ragged_size_op_test",
srcs = ["ragged_size_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_array_ops",
":ragged_factory_ops",
@ -1160,7 +1160,7 @@ py_test(
name = "ragged_placeholder_op_test",
srcs = ["ragged_placeholder_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
"//tensorflow/python:dtypes",
@ -1175,7 +1175,7 @@ py_test(
name = "ragged_squeeze_op_test",
srcs = ["ragged_squeeze_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_conversion_ops",
":ragged_factory_ops",
@ -1193,7 +1193,7 @@ py_test(
name = "ragged_dynamic_partition_op_test",
srcs = ["ragged_dynamic_partition_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_array_ops",
":ragged_factory_ops",
@ -1210,7 +1210,7 @@ py_test(
name = "ragged_merge_dims_op_test",
srcs = ["ragged_merge_dims_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_array_ops",
":ragged_factory_ops",
@ -1228,7 +1228,7 @@ py_test(
size = "small",
srcs = ["string_ngrams_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_string_ops",
"//tensorflow/python:client_testlib",
@ -1239,7 +1239,7 @@ py_test(
name = "ragged_reverse_op_test",
srcs = ["ragged_reverse_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_array_ops",
"//tensorflow/python:constant_op",
@ -1253,7 +1253,7 @@ py_test(
name = "ragged_cross_op_test",
srcs = ["ragged_cross_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows", # TODO(b/150702952): Reenable windows test once fixed.
],
@ -1270,7 +1270,7 @@ py_test(
name = "ragged_one_hot_op_test",
srcs = ["ragged_one_hot_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_array_ops",
":ragged_factory_ops",
@ -1290,7 +1290,7 @@ py_test(
name = "ragged_print_op_test",
srcs = ["ragged_print_op_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged", # fixdeps: keep
":ragged_factory_ops",
@ -1310,7 +1310,7 @@ py_test(
name = "ragged_tensor_supported_values_test",
srcs = ["ragged_tensor_supported_values_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ragged_factory_ops",
":ragged_tensor",

View File

@ -207,7 +207,7 @@ py_test(
srcs = ["pprof_profiler_test.py"],
main = "pprof_profiler_test.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["no_pip"], # TODO(annarev): get it working with pip.
deps = [
":pprof_profiler",

View File

@ -43,7 +43,7 @@ py_test(
name = "print_model_analysis_test",
srcs = ["print_model_analysis_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/core/profiler:protos_all_py",
"//tensorflow/python:array_ops",

View File

@ -19,7 +19,7 @@ exports_files(["LICENSE"])
py_strict_library(
name = "saved_model",
srcs = ["saved_model.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//tensorflow:internal"],
deps = [
":builder",
@ -41,21 +41,21 @@ py_strict_library(
py_strict_library(
name = "constants",
srcs = ["constants.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = ["//tensorflow/python/util:tf_export"],
)
py_strict_library(
name = "signature_constants",
srcs = ["signature_constants.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = ["//tensorflow/python/util:tf_export"],
)
py_strict_library(
name = "tag_constants",
srcs = ["tag_constants.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = ["//tensorflow/python/util:tf_export"],
)
@ -65,7 +65,7 @@ py_strict_library(
"builder.py",
"builder_impl.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":constants",
":signature_def_utils",
@ -87,7 +87,7 @@ py_strict_library(
"loader.py",
"loader_impl.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":constants",
":signature_def_utils",
@ -130,7 +130,7 @@ py_strict_library(
srcs = [
"simple_save.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":builder",
":signature_constants",
@ -148,7 +148,7 @@ py_strict_library(
"main_op.py",
"main_op_impl.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/python:control_flow_ops",
"//tensorflow/python:framework_for_generated_wrappers",
@ -196,7 +196,7 @@ py_strict_library(
"utils.py",
"utils_impl.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":constants",
":nested_structure_coder",
@ -231,7 +231,7 @@ py_strict_library(
"signature_def_utils.py",
"signature_def_utils_impl.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":signature_constants",
":utils",
@ -278,7 +278,7 @@ py_strict_library(
srcs = [
"signature_serialization.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":function_serialization",
":revived_types",
@ -299,14 +299,14 @@ py_strict_library(
srcs = [
"save_context.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [],
)
tf_py_test(
name = "save_context_test",
srcs = ["save_context_test.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":save_context",
":save_options",
@ -320,7 +320,7 @@ py_strict_library(
srcs = [
"save.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":builder",
":constants",
@ -428,7 +428,7 @@ py_strict_library(
srcs = [
"load_v1_in_v2.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":function_deserialization",
":loader",
@ -508,7 +508,7 @@ py_strict_library(
srcs = [
"revived_types.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/core:protos_all_py",
],
@ -529,7 +529,7 @@ py_strict_library(
srcs = [
"function_serialization.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":nested_structure_coder",
"//tensorflow/core:protos_all_py",
@ -544,7 +544,7 @@ py_strict_library(
srcs = [
"function_deserialization.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":nested_structure_coder",
"//tensorflow/core:protos_all_py",
@ -621,7 +621,7 @@ py_strict_library(
py_strict_library(
name = "method_name_updater",
srcs = ["method_name_updater.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":constants",
":loader",

View File

@ -32,7 +32,7 @@ exports_files(["LICENSE"])
py_strict_library(
name = "model_utils",
srcs = ["__init__.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":export_output",
":export_utils",
@ -43,7 +43,7 @@ py_strict_library(
py_strict_library(
name = "export_output",
srcs = ["export_output.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/python:constant_op",
"//tensorflow/python:dtypes",
@ -58,7 +58,7 @@ py_strict_test(
name = "export_output_test",
srcs = ["export_output_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":export_output",
"//tensorflow/core:protos_all_py",
@ -79,7 +79,7 @@ py_strict_test(
py_strict_library(
name = "export_utils",
srcs = ["export_utils.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":export_output",
":mode_keys",
@ -96,7 +96,7 @@ py_strict_test(
name = "export_test",
srcs = ["export_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":export_output",
":export_utils",
@ -115,7 +115,7 @@ py_strict_test(
py_strict_library(
name = "mode_keys",
srcs = ["mode_keys.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = ["//tensorflow/python:util"],
)
@ -123,7 +123,7 @@ py_strict_test(
name = "mode_keys_test",
srcs = ["mode_keys_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":mode_keys",
"//tensorflow/python:client_testlib",

View File

@ -50,7 +50,7 @@ py_test(
size = "small",
srcs = ["saved_model_utils_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["no_windows"], # TODO: needs investigation on Windows
visibility = ["//visibility:private"],
deps = [
@ -84,7 +84,7 @@ py_binary(
name = "freeze_graph",
srcs = ["freeze_graph.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":freeze_graph_main_lib"],
)
@ -101,7 +101,7 @@ py_binary(
name = "import_pb_to_tensorboard",
srcs = ["import_pb_to_tensorboard.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":import_pb_to_tensorboard_lib"],
)
@ -125,7 +125,7 @@ py_test(
size = "small",
srcs = ["freeze_graph_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":freeze_graph_lib",
"//tensorflow/core:protos_all_py",
@ -145,7 +145,7 @@ py_binary(
name = "inspect_checkpoint",
srcs = ["inspect_checkpoint.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":inspect_checkpoint_lib"],
)
@ -181,7 +181,7 @@ py_binary(
name = "strip_unused",
srcs = ["strip_unused.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":strip_unused_lib",
"//tensorflow/python:framework_for_generated_wrappers",
@ -195,7 +195,7 @@ py_test(
size = "small",
srcs = ["strip_unused_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["notap"],
deps = [
":strip_unused_lib",
@ -228,7 +228,7 @@ py_binary(
name = "optimize_for_inference",
srcs = ["optimize_for_inference.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":optimize_for_inference_main_lib"],
)
@ -252,7 +252,7 @@ py_test(
size = "small",
srcs = ["optimize_for_inference_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":optimize_for_inference_lib",
"//tensorflow/core:protos_all_py",
@ -284,7 +284,7 @@ py_binary(
name = "print_selective_registration_header",
srcs = ["print_selective_registration_header.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
deps = [":print_selective_registration_header_lib"],
)
@ -304,7 +304,7 @@ py_test(
name = "print_selective_registration_header_test",
srcs = ["print_selective_registration_header_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":selective_registration_header_lib",
"//tensorflow/python:client_testlib",
@ -316,7 +316,7 @@ py_binary(
name = "saved_model_cli",
srcs = ["saved_model_cli.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [":saved_model_cli_lib"],
)
@ -355,7 +355,7 @@ py_test(
"//tensorflow/cc/saved_model:saved_model_half_plus_two",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"manual",
"no-internal-py3",

View File

@ -45,7 +45,7 @@ py_test(
"create_python_api_test.py",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":doc_srcs",
"//tensorflow/python:client_testlib",
@ -62,7 +62,7 @@ py_test(
] + KERAS_API_INIT_FILES + KERAS_API_INIT_FILES_V1 + TENSORFLOW_API_INIT_FILES + TENSORFLOW_API_INIT_FILES_V1,
main = "doc_srcs_test.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":doc_srcs",
"//tensorflow/python:client_testlib",
@ -78,7 +78,7 @@ py_test(
"api_init_files_v1.bzl",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_pip",
],

View File

@ -100,7 +100,7 @@ def gen_api_init_files(
srcs = ["//tensorflow/python/tools/api/generator:create_python_api.py"],
main = "//tensorflow/python/tools/api/generator:create_python_api.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
deps = package_deps + [
"//tensorflow/python:util",

View File

@ -45,7 +45,7 @@ py_test(
pytype_library(
name = "tpu_ops",
srcs = ["ops/tpu_ops.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":tpu_function",
"//tensorflow/python:framework_for_generated_wrappers",
@ -56,7 +56,7 @@ pytype_library(
pytype_library(
name = "async_checkpoint",
srcs = ["async_checkpoint.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/python:array_ops",
"//tensorflow/python:control_flow_ops",
@ -103,7 +103,7 @@ pytype_library(
pytype_library(
name = "preempted_hook_py",
srcs = ["preempted_hook.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/python:errors",
"//tensorflow/python:platform",
@ -167,7 +167,7 @@ py_library(
pytype_library(
name = "topology",
srcs = ["topology.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/core/protobuf/tpu:topology_proto_py",
"//tensorflow/python/util:tf_export",
@ -221,7 +221,7 @@ pytype_library(
"tpu_strategy_util.py",
"training_loop.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":datasets",
":device_assignment",
@ -351,7 +351,7 @@ pytype_library(
srcs = [
"datasets.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/python:dtypes",
"//tensorflow/python:function",
@ -442,7 +442,7 @@ pytype_library(
"tpu_embedding.py",
"tpu_embedding_gradient.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":tpu_lib",
"//tensorflow/core/protobuf/tpu:tpu_embedding_configuration_proto_py",
@ -556,7 +556,7 @@ tf_py_test(
pytype_library(
name = "tpu_embedding_v2_utils",
srcs = ["tpu_embedding_v2_utils.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow/python:init_ops_v2",
"//tensorflow/python:variable_scope",
@ -572,7 +572,7 @@ pytype_library(
pytype_library(
name = "tpu_embedding_v2",
srcs = ["tpu_embedding_v2.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":tpu_embedding_v2_utils",
"//tensorflow/python:variable_scope",
@ -596,7 +596,7 @@ tpu_py_test(
disable_mlir_bridge = False,
python_version = "PY3",
shard_count = 4,
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":tpu_embedding",
":tpu_embedding_v2",
@ -628,7 +628,7 @@ tpu_py_test(
disable_mlir_bridge = False,
python_version = "PY3",
shard_count = 4,
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":tpu_embedding",
":tpu_embedding_v2",
@ -654,7 +654,7 @@ tf_py_test(
"tpu_embedding_v2_cpu_test.py",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":tpu_embedding_v2",
"//tensorflow/python:init_ops_v2",
@ -670,7 +670,7 @@ tf_py_test(
"tpu_embedding_v2_utils_test.py",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":tpu_embedding_v2",
"//tensorflow/python/compat:v2_compat",

View File

@ -26,7 +26,7 @@ py_strict_library(
"distribute.py",
"internal.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = [
"//tensorflow:__subpackages__",
"//tensorflow:types_whitelist",
@ -44,7 +44,7 @@ py_strict_library(
srcs = [
"doc_typealias.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = [
"//tensorflow:__subpackages__",
],

View File

@ -244,7 +244,7 @@ py_strict_library(
name = "tf_export",
srcs = ["tf_export.py"],
compatible_with = get_compatible_with_portable(),
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//tensorflow:__subpackages__"],
deps = [
":tf_decorator",
@ -272,7 +272,7 @@ py_strict_library(
"tf_inspect.py",
],
compatible_with = get_compatible_with_portable(),
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = [
"//tensorflow:__subpackages__",
# TODO(mdan): Remove these dependencies.
@ -289,7 +289,7 @@ py_strict_library(
py_strict_library(
name = "tf_stack",
srcs = ["tf_stack.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
# TODO(mdan): Remove public visibility.
visibility = ["//visibility:public"],
deps = [

View File

@ -3,8 +3,8 @@
load(
"//tensorflow:tensorflow.bzl",
"py_test",
"tf_cc_binary",
)
load("//tensorflow:tensorflow.bzl", "tf_cc_binary")
package(
default_visibility = ["//tensorflow/tools/api:__subpackages__"],
@ -27,7 +27,7 @@ py_test(
"//third_party/py/numpy/tf_numpy_api:api_golden",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_pip",
"no_rocm",
@ -49,7 +49,7 @@ py_test(
name = "module_test",
srcs = ["module_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows", # Failing due to missing API symbols.
],

View File

@ -11,7 +11,7 @@ py_binary(
srcs = ["gen_build_info.py"],
exec_compatible_with = ["@local_execution_config_platform//:platform_constraint"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["no-remote-exec"],
deps = [
"@local_config_cuda//cuda:cuda_config_py",

View File

@ -22,7 +22,7 @@ py_test(
name = "public_api_test",
srcs = ["public_api_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":public_api",
"//tensorflow/python:platform_test",
@ -43,7 +43,7 @@ py_test(
name = "traverse_test",
srcs = ["traverse_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":test_module1",
":test_module2",

View File

@ -32,7 +32,7 @@ py_test(
name = "ast_edits_test",
srcs = ["ast_edits_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ast_edits",
"//tensorflow/python:client_testlib",
@ -45,7 +45,7 @@ py_binary(
name = "tf_upgrade",
srcs = ["tf_upgrade.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":tf_upgrade_lib",
"@six_archive//:six",
@ -66,7 +66,7 @@ py_test(
name = "tf_upgrade_test",
srcs = ["tf_upgrade_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_pip",
],
@ -107,7 +107,7 @@ py_test(
name = "all_renames_v2_test",
srcs = ["all_renames_v2_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":all_renames_v2",
"//tensorflow/python:client_testlib",
@ -152,7 +152,7 @@ py_binary(
srcs = ["tf_upgrade_v2_main.py"],
main = "tf_upgrade_v2_main.py",
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":ast_edits",
":ipynb",
@ -166,7 +166,7 @@ py_test(
name = "tf_upgrade_v2_test",
srcs = ["tf_upgrade_v2_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
"v1only",
@ -187,7 +187,7 @@ py_test(
name = "tf_upgrade_v2_safety_test",
srcs = ["tf_upgrade_v2_safety_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":tf_upgrade_v2_safety_lib",
"//tensorflow/python:client_testlib",
@ -201,7 +201,7 @@ py_test(
# name = "test_file_v0_11",
# size = "small",
# srcs = ["testdata/test_file_v0_11.py"],
# srcs_version = "PY2AND3",
# srcs_version = "PY3",
# deps = [
# "//tensorflow:tensorflow_py",
# ],
@ -227,7 +227,7 @@ py_test(
size = "small",
srcs = ["test_file_v1_0.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow:tensorflow_py",
],
@ -254,7 +254,7 @@ py_test(
size = "small",
srcs = ["testdata/test_file_v1_12.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"no_windows",
"v1only",
@ -269,7 +269,7 @@ py_test(
size = "small",
srcs = ["test_file_v2_0.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow:tensorflow_py",
],

View File

@ -7,7 +7,7 @@ py_binary(
name = "generate_v2_renames_map",
srcs = ["generate_v2_renames_map.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow:tensorflow_py",
"//tensorflow/python:lib",
@ -23,7 +23,7 @@ py_binary(
name = "generate_v2_reorders_map",
srcs = ["generate_v2_reorders_map.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"//tensorflow:tensorflow_py",
"//tensorflow/python:lib",

View File

@ -11,7 +11,7 @@ package(default_visibility = ["//visibility:public"])
py_binary(
name = "def_file_filter",
srcs = ["def_file_filter.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
)
filegroup(

View File

@ -141,7 +141,7 @@ py_test(
size = "medium",
srcs = ["generate2_test.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = [
"manual",
# No reason to run sanitizers or fastbuild for this test.

View File

@ -13,6 +13,6 @@ py_binary(
srcs = ["gen_git_source.py"],
exec_compatible_with = ["@local_execution_config_platform//:platform_constraint"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
tags = ["no-remote-exec"],
)

View File

@ -68,7 +68,7 @@ transitive_hdrs(
py_binary(
name = "simple_console",
srcs = ["simple_console.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = ["//tensorflow:tensorflow_py"],
)
@ -168,7 +168,7 @@ py_binary(
data = COMMON_PIP_DEPS + [
"//tensorflow/python:pywrap_tensorflow_import_lib_file",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = ["//tensorflow:tensorflow_py"],
)

View File

@ -15,7 +15,7 @@ py_binary(
"//tensorflow/tools/tensorflow_builder/config_detector/data/golden:cuda_cc_golden",
],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":cuda_compute_capability",
"@absl_py//absl:app",
@ -28,7 +28,7 @@ py_binary(
name = "cuda_compute_capability",
srcs = ["data/cuda_compute_capability.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
"@absl_py//absl:app",
"@absl_py//absl/flags",

View File

@ -35,7 +35,7 @@ py_binary(
name = "system_info",
srcs = ["system_info.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = [
":system_info_lib",
"//tensorflow/python:platform",
@ -60,7 +60,7 @@ py_binary(
name = "run_and_gather_logs",
srcs = ["run_and_gather_logs.py"],
python_version = "PY3",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
deps = [
":run_and_gather_logs_main_lib",

View File

@ -19,6 +19,6 @@ py_library(
"astor/string_repr.py",
"astor/tree_walk.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -12,7 +12,7 @@ py_library(
"astunparse/printer.py",
"astunparse/unparser.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
)
genrule(

View File

@ -11,7 +11,7 @@ py_library(
"backports/__init__.py",
"backports/weakref.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
)
genrule(

View File

@ -12,5 +12,5 @@ exports_files(["LICENSE"])
py_library(
name = "com_github_andreif_codegen",
srcs = glob(["codegen.py"]),
srcs_version = "PY2AND3",
srcs_version = "PY3",
)

View File

@ -13,7 +13,7 @@ py_library(
"Cython/Utility/*.*",
"Cython/Includes/**/*.pxd",
]),
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)
@ -22,7 +22,7 @@ py_binary(
name = "cython_binary",
srcs = ["cython.py"],
main = "cython.py",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
deps = ["cython_lib"],
)

View File

@ -5,6 +5,6 @@ exports_files(["LICENSE"])
py_library(
name = "dill",
srcs = glob(["dill/*.py"]),
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -8,6 +8,6 @@ exports_files(["LICENSE"])
py_library(
name = "enum",
srcs = ["__init__.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -447,7 +447,7 @@ def flatbuffer_py_library(
srcs = [
":{}".format(concat_py_srcs),
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = deps + [
"@flatbuffers//:runtime_py",
],

View File

@ -13,6 +13,6 @@ py_library(
"functools32/functools32.py",
"functools32/reprlib32.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -14,6 +14,6 @@ py_library(
"gast/astn.py",
"gast/gast.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -1,7 +1,7 @@
py_binary(
name = "expand_cmake_vars",
srcs = ["expand_cmake_vars.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = [
"@llvm-project//:__subpackages__",
"@llvm_openmp//:__subpackages__",

View File

@ -24,6 +24,6 @@ py_library(
"opt_einsum/paths.py",
"opt_einsum/sharing.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -26,6 +26,6 @@ py_library(
"base/test_utils.py",
"base/token_generator.py",
]),
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -13,6 +13,6 @@ py_proto_library(
srcs = ["proto/profile.proto"],
default_runtime = "@com_google_protobuf//:protobuf_python",
protoc = "@com_google_protobuf//:protoc",
srcs_version = "PY2AND3",
srcs_version = "PY3",
deps = ["@com_google_protobuf//:protobuf_python"],
)

View File

@ -5,7 +5,7 @@ package(default_visibility = ["//visibility:public"])
py_library(
name = "numpy",
srcs = ["tf_numpy_dummy.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
)
alias(

View File

@ -9,6 +9,6 @@ exports_files(["LICENSE"])
py_library(
name = "six",
srcs = ["six.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -58,6 +58,6 @@ cc_library(
# This is a Copybara sync helper for Google.
py_library(
name = "python",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -7,6 +7,6 @@ filegroup(
py_library(
name = "astor",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -7,6 +7,6 @@ filegroup(
py_library(
name = "dill",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -11,5 +11,5 @@ filegroup(
py_library(
name = "functools32",
srcs_version = "PY2AND3",
srcs_version = "PY3",
)

View File

@ -7,6 +7,6 @@ filegroup(
py_library(
name = "gast",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -101,7 +101,7 @@ proto_gen(
py_library(
name = "protobuf_python",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -10,6 +10,6 @@ cc_library(
# This is a Copybara sync helper for Google.
py_library(
name = "python",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -7,6 +7,6 @@ filegroup(
py_library(
name = "tblib",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -7,6 +7,6 @@ filegroup(
py_library(
name = "termcolor",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -6,7 +6,7 @@ licenses(["notice"]) # PSF
py_library(
name = "typing_extensions",
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -6,6 +6,6 @@ py_library(
name = "tblib",
srcs = glob(["src/tblib/*.py"]),
imports = ["src"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -10,6 +10,6 @@ py_library(
srcs = [
"termcolor.py",
],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)

View File

@ -7,7 +7,7 @@ licenses(["notice"]) # PSF
py_library(
name = "typing_extensions",
srcs = ["typing_extensions.py"],
srcs_version = "PY2AND3",
srcs_version = "PY3",
visibility = ["//visibility:public"],
)