load("@xla//third_party/rules_python/python:py_library.bzl", "py_library") load("//tensorflow:tensorflow.bzl", "py_test") # Definitions are loaded separately so that copybara can pattern match (and modify) each definition. load("//tensorflow:tensorflow.default.bzl", "cuda_py_strict_test", "tf_py_strict_test") package( # copybara:uncomment default_applicable_licenses = ["//tensorflow:license"], default_visibility = ["//tensorflow:internal"], licenses = ["notice"], ) tf_py_strict_test( name = "as_numpy_iterator_test", size = "medium", srcs = ["as_numpy_iterator_test.py"], deps = [ ":test_base", "//tensorflow/python/checkpoint", "//tensorflow/python/checkpoint:checkpoint_options", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:test", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:sparse_ops", "//tensorflow/python/ops/ragged:ragged_factory_ops", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "batch_test", size = "medium", srcs = ["batch_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/checkpoint", "//tensorflow/python/checkpoint:checkpoint_management", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/data/util:nest", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:script_ops", "//tensorflow/python/ops/ragged:ragged_concat_ops", "//tensorflow/python/ops/ragged:ragged_factory_ops", "//tensorflow/python/ops/ragged:ragged_math_ops", "//tensorflow/python/ops/ragged:ragged_tensor", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "bucket_by_sequence_length_test", size = "medium", srcs = ["bucket_by_sequence_length_test.py"], deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:context", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/ops:array_ops", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "cache_test", size = "medium", srcs = ["cache_test.py"], tags = [ "noasan", # TODO(b/231479582): re-enable after flakiness resolved. "notap", # TODO(b/231479582): re-enable after flakiness resolved. "notsan", # TODO(b/206452257): re-enable after flakiness resolved. ], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/checkpoint", "//tensorflow/python/checkpoint:checkpoint_management", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/eager:context", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:variables", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "cardinality_test", size = "medium", srcs = ["cardinality_test.py"], deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/framework:combinations", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "checkpoint_test", size = "medium", srcs = ["checkpoint_test.py"], grpc_enabled = True, deps = [ ":test_base", "//tensorflow/python/checkpoint", "//tensorflow/python/checkpoint:checkpoint_management", "//tensorflow/python/checkpoint:checkpoint_options", "//tensorflow/python/data/experimental/ops:grouping", "//tensorflow/python/data/experimental/ops:interleave_ops", "//tensorflow/python/data/experimental/ops:scan_ops", "//tensorflow/python/data/experimental/ops:take_while_ops", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/eager:test", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/ops:dataset_ops_gen", "//tensorflow/python/ops:io_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:parsing_ops", "//tensorflow/python/ops:random_ops", "//tensorflow/python/ops:script_ops", "//tensorflow/python/ops:variables", "//tensorflow/python/platform:gfile", "@absl_py//absl/testing:parameterized", ], ) py_library( name = "checkpoint_test_base", srcs = ["checkpoint_test_base.py"], strict_deps = True, deps = [ "//tensorflow/python/checkpoint", "//tensorflow/python/checkpoint:checkpoint_management", "//tensorflow/python/checkpoint:checkpoint_options", "//tensorflow/python/data/experimental/ops:iterator_ops", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/eager:context", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:tensor", "//tensorflow/python/ops:lookup_ops", "//tensorflow/python/ops:variables", "//tensorflow/python/ops/ragged:ragged_tensor_value", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/platform:gfile", "//tensorflow/python/training:saver", "//tensorflow/python/util:nest", "//third_party/py/numpy", ], ) tf_py_strict_test( name = "choose_from_datasets_test", size = "medium", srcs = ["choose_from_datasets_test.py"], shard_count = 12, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python:extra_py_tests_deps", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/ops:stateless_random_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "concatenate_test", size = "medium", srcs = ["concatenate_test.py"], shard_count = 20, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/data/util:nest", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "counter_test", size = "medium", srcs = ["counter_test.py"], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "dataset_spec_test", size = "medium", srcs = ["dataset_spec_test.py"], deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/framework:tensor_spec", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "dataset_test", size = "medium", srcs = ["dataset_test.py"], deps = [ ":test_base", "//tensorflow/core/framework:graph_proto_py_proto", "//tensorflow/python/data/experimental/ops:testing", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:debug_mode", "//tensorflow/python/data/ops:optional_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/data/ops:readers", "//tensorflow/python/data/util:nest", "//tensorflow/python/data/util:structure", "//tensorflow/python/eager:context", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/framework:tensor_spec", "//tensorflow/python/lib/io:tf_record", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:lookup_ops", "//tensorflow/python/ops:random_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "enumerate_test", size = "medium", srcs = ["enumerate_test.py"], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "filter_test", size = "medium", srcs = ["filter_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:map_fn", "//tensorflow/python/ops:math_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "fingerprint_test", size = "medium", srcs = ["fingerprint_test.py"], deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:readers", "//tensorflow/python/framework:combinations", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "fixed_length_record_dataset_test", size = "medium", srcs = ["fixed_length_record_dataset_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:readers", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/util:compat", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "flat_map_test", size = "medium", srcs = ["flat_map_test.py"], grpc_enabled = True, shard_count = 8, tags = [ "nomac", # b/284304023 ], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/core:protos_all_py", "//tensorflow/python/client:session", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:function", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:random_ops", "//tensorflow/python/ops:sparse_ops", "//tensorflow/python/ops:stateless_random_ops", "//tensorflow/python/ops:tensor_array_ops", "//tensorflow/python/ops:variable_scope", "//tensorflow/python/ops/ragged:ragged_conversion_ops", "//tensorflow/python/ops/ragged:ragged_tensor", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/training:server_lib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "from_generator_test", size = "medium", srcs = ["from_generator_test.py"], shard_count = 8, deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:tensor_spec", "//tensorflow/python/ops:script_ops", "//tensorflow/python/ops:sparse_ops", "//tensorflow/python/ops/ragged:ragged_factory_ops", "//tensorflow/python/ops/ragged:ragged_tensor", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "from_sparse_tensor_slices_test", size = "medium", srcs = ["from_sparse_tensor_slices_test.py"], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:array_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "from_tensor_slices_test", size = "medium", srcs = ["from_tensor_slices_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/ops/ragged:ragged_factory_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "from_tensors_test", size = "medium", srcs = ["from_tensors_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/core:protos_all_py", "//tensorflow/python/client:session", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/data/util:nest", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/ops:array_ops_stack", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:resource_variable_ops", "//tensorflow/python/ops:tensor_array_ops", "//tensorflow/python/ops/ragged:ragged_factory_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "get_single_element_test", size = "medium", srcs = ["get_single_element_test.py"], deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:variables", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "group_by_window_test", size = "medium", srcs = ["group_by_window_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/core:protos_all_py", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:string_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "ignore_errors_test", size = "medium", srcs = ["ignore_errors_test.py"], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/data/ops:readers", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/lib/io:python_io", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:io_ops", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/util:compat", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "interleave_test", size = "medium", srcs = ["interleave_test.py"], shard_count = 24, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:testing", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:sparse_ops", "//tensorflow/python/ops:stateless_random_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "iterator_cluster_test", size = "medium", srcs = ["iterator_cluster_test.py"], grpc_enabled = True, tags = [ "no_oss", # Test flaky due to port collisions. "no_windows", ], deps = [ ":test_base", "//tensorflow/core:protos_all_py", "//tensorflow/python/client:session", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:iterator_ops", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:function", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:test_lib", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:functional_ops", "//tensorflow/python/ops:lookup_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:string_ops", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) cuda_py_strict_test( name = "iterator_test", size = "medium", srcs = ["iterator_test.py"], grpc_enabled = True, deps = [ ":test_base", "//tensorflow/core:protos_all_py", "//tensorflow/python/client:session", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:iterator_ops", "//tensorflow/python/data/util:structure", "//tensorflow/python/eager:context", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:function", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:tensor", "//tensorflow/python/framework:test_lib", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:data_flow_ops", "//tensorflow/python/ops:functional_ops", "//tensorflow/python/ops:gradients_impl", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:parsing_ops", "//tensorflow/python/ops:script_ops", "//tensorflow/python/ops:variables", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/training:server_lib", "//tensorflow/python/util:compat", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "len_test", size = "medium", srcs = ["len_test.py"], deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/framework:combinations", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "list_files_test", size = "medium", srcs = ["list_files_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/data/ops:test_mode", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/util:compat", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "map_test", size = "medium", srcs = ["map_test.py"], shard_count = 19, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/core:protos_all_py", "//tensorflow/python:pywrap_sanitizers", "//tensorflow/python:tf2", "//tensorflow/python/checkpoint", "//tensorflow/python/checkpoint:checkpoint_management", "//tensorflow/python/data/experimental/ops:cardinality", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/eager:context", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:function", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:tensor", "//tensorflow/python/framework:tensor_util", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:cond", "//tensorflow/python/ops:control_flow_case", "//tensorflow/python/ops:data_flow_ops", "//tensorflow/python/ops:lookup_ops", "//tensorflow/python/ops:map_fn", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:random_ops", "//tensorflow/python/ops:script_ops", "//tensorflow/python/ops:sparse_ops", "//tensorflow/python/ops:stateless_random_ops", "//tensorflow/python/ops:string_ops", "//tensorflow/python/ops:tensor_array_ops", "//tensorflow/python/ops:variable_scope", "//tensorflow/python/ops:variable_v1", "//tensorflow/python/ops:variables", "//tensorflow/python/ops/ragged:ragged_concat_ops", "//tensorflow/python/ops/ragged:ragged_factory_ops", "//tensorflow/python/ops/ragged:ragged_tensor", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) cuda_py_strict_test( name = "memory_cleanup_test", size = "medium", srcs = ["memory_cleanup_test.py"], shard_count = 12, tags = [ "no_cuda_asan", # TODO(b/183963686) ], xla_tags = [ "no_cuda_asan", # TODO(b/183963686) ], deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:multi_device_iterator_ops", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/platform:tf_logging", "//tensorflow/python/types:internal", "@absl_py//absl/testing:parameterized", ], ) cuda_py_strict_test( name = "multi_device_iterator_test", size = "medium", srcs = ["multi_device_iterator_test.py"], shard_count = 2, tags = [ "no_gpu", # TODO(b/141255188) "no_oss", "no_windows_gpu", ], deps = [ ":test_base", "//tensorflow/python/data/experimental/ops:testing", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:multi_device_iterator_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/eager:cancellation", "//tensorflow/python/eager:context", "//tensorflow/python/eager:def_function", "//tensorflow/python/eager:executor", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:tensor_spec", "//tensorflow/python/ops:data_flow_ops", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) cuda_py_strict_test( name = "optional_test", size = "medium", srcs = ["optional_test.py"], deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:iterator_ops", "//tensorflow/python/data/ops:optional_ops", "//tensorflow/python/data/util:structure", "//tensorflow/python/eager:context", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/framework:tensor_spec", "//tensorflow/python/framework:test_lib", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "options_test", size = "medium", srcs = ["options_test.py"], deps = [ ":test_base", "//tensorflow/core:protos_all_py", "//tensorflow/python/data/experimental/ops:testing", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/eager:context", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "padded_batch_test", size = "medium", srcs = ["padded_batch_test.py"], shard_count = 2, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:string_ops", "//tensorflow/python/ops/ragged:ragged_tensor_value", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/util:compat", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) cuda_py_strict_test( name = "placement_test", size = "medium", srcs = ["placement_test.py"], deps = [ ":test_base", "//tensorflow/python/data/experimental/ops:prefetching_ops", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:config", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:test_lib", "//tensorflow/python/framework:test_ops", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:cond", "//tensorflow/python/ops:dataset_ops_gen", "//tensorflow/python/ops:math_ops", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "prefetch_test", size = "medium", srcs = ["prefetch_test.py"], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/ops:script_ops", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "ragged_batch_test", size = "medium", srcs = ["ragged_batch_test.py"], shard_count = 8, deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/util:nest", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:array_ops_stack", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops/ragged:ragged_concat_ops", "//tensorflow/python/ops/ragged:ragged_factory_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "sparse_batch_test", size = "medium", srcs = ["sparse_batch_test.py"], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/ops:array_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "random_test", size = "medium", srcs = ["random_test.py"], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python:tf2", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:random_seed", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "range_test", size = "medium", srcs = ["range_test.py"], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) cuda_py_strict_test( name = "reduce_test", size = "medium", srcs = ["reduce_test.py"], tags = [ "no_cuda_asan", # times out ], deps = [ ":test_base", "//tensorflow/python/data/experimental/ops:testing", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:test_lib", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:variables", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "rejection_resample_test", size = "medium", srcs = ["rejection_resample_test.py"], shard_count = 10, deps = [ ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:random_ops", "//tensorflow/python/ops:string_ops", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/util:compat", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "repeat_test", size = "medium", srcs = ["repeat_test.py"], shard_count = 2, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "sample_from_datasets_test", size = "medium", srcs = ["sample_from_datasets_test.py"], shard_count = 24, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python:extra_py_tests_deps", "//tensorflow/python/compat", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:random_seed", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) cuda_py_strict_test( name = "scan_test", size = "medium", srcs = ["scan_test.py"], xla_enable_strict_auto_jit = False, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/framework:test_lib", "//tensorflow/python/framework:test_ops", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:cond", "//tensorflow/python/ops:control_flow_v2_toggles", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:script_ops", "//tensorflow/python/ops:tensor_array_ops", "//tensorflow/python/ops:variables", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "shard_test", size = "medium", srcs = ["shard_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "shuffle_test", size = "medium", srcs = ["shuffle_test.py"], shard_count = 8, tags = ["requires-mem:16g"], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python:pywrap_sanitizers", "//tensorflow/python/checkpoint", "//tensorflow/python/checkpoint:checkpoint_management", "//tensorflow/python/data/experimental/ops:iterator_ops", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:random_seed", "//tensorflow/python/framework:tensor_spec", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:check_ops", "//tensorflow/python/ops:stateless_random_ops", "//tensorflow/python/ops:variables", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/training:saver", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "skip_test", size = "medium", srcs = ["skip_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "snapshot_test", size = "medium", srcs = ["snapshot_test.py"], shard_count = 16, tags = [ "no_tsan", # TODO(b/191433147): reenable "no_windows", # TODO(b/182379890) "notap", # TODO(b/192359227) ], deps = [ ":checkpoint_test_base", ":test_base", ":tf_record_test_base", "//tensorflow/python/data/experimental/ops:snapshot", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/data/ops:readers", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/ops:array_ops_gen", "//tensorflow/python/ops:string_ops", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "take_test", size = "medium", srcs = ["take_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "take_while_test", size = "medium", srcs = ["take_while_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:errors", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) py_library( name = "test_base", srcs = ["test_base.py"], strict_deps = True, deps = [ "//tensorflow/python/data/experimental/ops:lookup_ops", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:test_mode", "//tensorflow/python/data/util:nest", "//tensorflow/python/data/util:structure", "//tensorflow/python/eager:context", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:config", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:ops", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:dataset_ops_gen", "//tensorflow/python/ops:experimental_dataset_ops_gen", "//tensorflow/python/ops:lookup_ops", "//tensorflow/python/ops:tensor_array_ops", "//tensorflow/python/ops/ragged:ragged_tensor", "//tensorflow/python/platform:client_testlib", ], ) tf_py_strict_test( name = "text_line_dataset_test", size = "medium", srcs = ["text_line_dataset_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/data/ops:readers", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/util:compat", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "tf_record_dataset_test", size = "medium", srcs = ["tf_record_dataset_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", ":tf_record_test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/data/ops:readers", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) py_library( name = "tf_record_test_base", srcs = [ "tf_record_test_base.py", ], strict_deps = True, deps = [ ":test_base", "//tensorflow/core/example:example_protos_py_proto", "//tensorflow/python/data/experimental/ops:readers", "//tensorflow/python/data/ops:readers", "//tensorflow/python/framework:dtypes", "//tensorflow/python/lib/io:python_io", "//tensorflow/python/ops:parsing_ops", "//tensorflow/python/util:compat", ], ) tf_py_strict_test( name = "unbatch_test", size = "medium", srcs = ["unbatch_test.py"], deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:constant_op", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/ops:string_ops", "//tensorflow/python/ops/ragged:ragged_factory_ops", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/util:compat", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "unique_test", size = "medium", srcs = ["unique_test.py"], shard_count = 3, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/platform:client_testlib", "//tensorflow/python/util:compat", "@absl_py//absl/testing:parameterized", ], ) py_test( name = "io_test", srcs = ["io_test.py"], strict_deps = True, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/eager:def_function", "//tensorflow/python/framework:combinations", "//tensorflow/python/ops:variables", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) py_test( name = "rebatch_test", srcs = ["rebatch_test.py"], strict_deps = True, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/util:nest", "//tensorflow/python/framework:combinations", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops/ragged:ragged_tensor", "//tensorflow/python/platform:client_testlib", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "window_test", size = "medium", srcs = ["window_test.py"], shard_count = 2, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/util:nest", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:dtypes", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:sparse_tensor", "//tensorflow/python/ops:array_ops", "//tensorflow/python/ops:math_ops", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], ) tf_py_strict_test( name = "zip_test", size = "medium", srcs = ["zip_test.py"], shard_count = 8, deps = [ ":checkpoint_test_base", ":test_base", "//tensorflow/python/data/experimental/ops:global_shuffle_op", "//tensorflow/python/data/experimental/ops:random_access", "//tensorflow/python/data/ops:dataset_ops", "//tensorflow/python/data/ops:options", "//tensorflow/python/framework:combinations", "//tensorflow/python/framework:errors", "//tensorflow/python/framework:tensor_shape", "//tensorflow/python/platform:client_testlib", "//third_party/py/numpy", "@absl_py//absl/testing:parameterized", ], )