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( py_test(
name = updated_name, name = updated_name,
srcs = srcs, srcs = srcs,
srcs_version = "PY2AND3", srcs_version = "PY3",
args = backend_args, args = backend_args,
main = "{}.py".format(name) if main == None else main, main = "{}.py".format(name) if main == None else main,
data = data + backend_data, data = data + backend_data,

View File

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

View File

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

View File

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

View File

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

View File

@ -12,7 +12,7 @@ py_binary(
srcs = ["accuracy_utils.py"], srcs = ["accuracy_utils.py"],
main = "accuracy_utils.py", main = "accuracy_utils.py",
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
"//tensorflow:tensorflow_py", "//tensorflow:tensorflow_py",
"//third_party/py/numpy", "//third_party/py/numpy",
@ -25,7 +25,7 @@ py_binary(
srcs = ["recognize_commands.py"], srcs = ["recognize_commands.py"],
main = "recognize_commands.py", main = "recognize_commands.py",
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
"//tensorflow:tensorflow_py", "//tensorflow:tensorflow_py",
"//third_party/py/numpy", "//third_party/py/numpy",
@ -38,7 +38,7 @@ py_binary(
srcs = ["test_streaming_accuracy.py"], srcs = ["test_streaming_accuracy.py"],
main = "test_streaming_accuracy.py", main = "test_streaming_accuracy.py",
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [ deps = [
":accuracy_utils_py", ":accuracy_utils_py",
":recognize_commands_py", ":recognize_commands_py",
@ -106,7 +106,7 @@ py_binary(
name = "train", name = "train",
srcs = ["train.py"], srcs = ["train.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [":train_main_lib"], deps = [":train_main_lib"],
) )
@ -143,7 +143,7 @@ py_binary(
name = "freeze", name = "freeze",
srcs = ["freeze.py"], srcs = ["freeze.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [":freeze_main_lib"], deps = [":freeze_main_lib"],
) )
@ -188,7 +188,7 @@ py_binary(
name = "wav_to_features", name = "wav_to_features",
srcs = ["wav_to_features.py"], srcs = ["wav_to_features.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [":wav_to_features_main_lib"], deps = [":wav_to_features_main_lib"],
) )
@ -230,7 +230,7 @@ py_binary(
name = "generate_streaming_test_wav", name = "generate_streaming_test_wav",
srcs = ["generate_streaming_test_wav.py"], srcs = ["generate_streaming_test_wav.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [":generate_streaming_test_wav_main_lib"], deps = [":generate_streaming_test_wav_main_lib"],
) )
@ -288,7 +288,7 @@ py_binary(
name = "label_wav", name = "label_wav",
srcs = ["label_wav.py"], srcs = ["label_wav.py"],
python_version = "PY3", python_version = "PY3",
srcs_version = "PY2AND3", srcs_version = "PY3",
deps = [":label_wav_main_lib"], 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, "--target_ops=%s" % target_op_sets,
] + args, ] + args,
data = data, data = data,
srcs_version = "PY2AND3", srcs_version = "PY3",
python_version = "PY3", python_version = "PY3",
tags = [ tags = [
"no_gpu", # Executing with TF GPU configurations is redundant. "no_gpu", # Executing with TF GPU configurations is redundant.

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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

View File

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