Re-organize Keras integration tests.

PiperOrigin-RevId: 293043030
Change-Id: I81c95911434a207110abc7895813c4b14ed297e0
This commit is contained in:
Yanhui Liang 2020-02-03 17:25:54 -08:00 committed by TensorFlower Gardener
parent a1e5034c8c
commit fe1e2d8fdd
13 changed files with 143 additions and 125 deletions

View File

@ -279,25 +279,6 @@ py_library(
],
)
tf_py_test(
name = "integration_test",
size = "medium",
srcs = ["integration_test.py"],
python_version = "PY3",
shard_count = 16,
tags = [
"no_rocm",
"notsan",
],
deps = [
":keras",
"//tensorflow/python:client_testlib",
"//tensorflow/python:nn_ops",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
tf_py_test(
name = "activations_test",
size = "small",
@ -380,20 +361,6 @@ tf_py_test(
],
)
tf_py_test(
name = "add_loss_correctness_test",
size = "medium",
srcs = ["add_loss_correctness_test.py"],
python_version = "PY3",
shard_count = 4,
deps = [
":keras",
"//tensorflow/python:client_testlib",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
tf_py_test(
name = "metrics_functional_test",
size = "small",
@ -448,19 +415,6 @@ tf_py_test(
],
)
tf_py_test(
name = "temporal_sample_weights_correctness_test",
size = "medium",
srcs = ["temporal_sample_weights_correctness_test.py"],
python_version = "PY3",
shard_count = 20,
deps = [
":keras",
"//tensorflow/python:client_testlib",
"//third_party/py/numpy",
],
)
tf_py_test(
name = "callbacks_test",
size = "medium",
@ -494,68 +448,6 @@ tf_py_test(
],
)
py_library(
name = "model_subclassing_test_util",
srcs = ["model_subclassing_test_util.py"],
srcs_version = "PY2AND3",
deps = [
":keras",
],
)
tf_py_test(
name = "model_subclassing_test",
size = "medium",
srcs = ["model_subclassing_test.py"],
python_version = "PY3",
shard_count = 4,
tags = [
"no_windows",
"notsan",
],
deps = [
":keras",
":model_subclassing_test_util",
"//tensorflow/python:client_testlib",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
tf_py_test(
name = "model_subclassing_compiled_test",
size = "medium",
srcs = ["model_subclassing_compiled_test.py"],
python_version = "PY3",
shard_count = 4,
tags = [
"no_windows",
"notsan",
],
deps = [
":keras",
":model_subclassing_test_util",
"//tensorflow/python:client_testlib",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
tf_py_test(
name = "custom_training_loop_test",
size = "medium",
srcs = ["custom_training_loop_test.py"],
python_version = "PY3",
shard_count = 4,
tags = ["notsan"],
deps = [
":keras",
"//tensorflow/python:client_testlib",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
tf_py_test(
name = "models_test",
size = "medium",

View File

@ -15,7 +15,6 @@ py_library(
srcs = [
"__init__.py",
"hdf5_format.py",
"model_architectures.py",
"model_config.py",
"save.py",
"saved_model/base_serialization.py",
@ -50,18 +49,6 @@ py_library(
],
)
tf_py_test(
name = "save_model_architecture_test",
srcs = ["save_model_architecture_test.py"],
python_version = "PY3",
shard_count = 16,
deps = [
"//tensorflow/python/keras",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
tf_py_test(
name = "metrics_serialization_test",
size = "medium",

View File

@ -0,0 +1,138 @@
# Description:
# Contains Keras test utils and integration tests.
load("//tensorflow:tensorflow.bzl", "tf_py_test")
package(
default_visibility = ["//visibility:public"],
licenses = ["notice"], # Apache 2.0
)
exports_files(["LICENSE"])
tf_py_test(
name = "add_loss_correctness_test",
srcs = ["add_loss_correctness_test.py"],
python_version = "PY3",
shard_count = 4,
deps = [
"//tensorflow/python:client_testlib",
"//tensorflow/python/keras",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
tf_py_test(
name = "custom_training_loop_test",
srcs = ["custom_training_loop_test.py"],
python_version = "PY3",
shard_count = 4,
tags = ["notsan"],
deps = [
"//tensorflow/python:client_testlib",
"//tensorflow/python/keras",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
tf_py_test(
name = "integration_test",
size = "medium",
srcs = ["integration_test.py"],
python_version = "PY3",
shard_count = 16,
tags = [
"no_rocm",
"notsan",
],
deps = [
"//tensorflow/python:client_testlib",
"//tensorflow/python:nn_ops",
"//tensorflow/python/keras",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
py_library(
name = "model_architectures",
srcs = [
"model_architectures.py",
],
srcs_version = "PY2AND3",
deps = [
"//tensorflow/python/keras",
],
)
tf_py_test(
name = "model_architectures_test",
srcs = ["model_architectures_test.py"],
python_version = "PY3",
shard_count = 16,
deps = [
":model_architectures",
"//tensorflow/python/keras",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
py_library(
name = "model_subclassing_test_util",
srcs = ["model_subclassing_test_util.py"],
srcs_version = "PY2AND3",
deps = [
"//tensorflow/python/keras",
],
)
tf_py_test(
name = "model_subclassing_test",
srcs = ["model_subclassing_test.py"],
python_version = "PY3",
shard_count = 4,
tags = [
"no_windows",
"notsan",
],
deps = [
":model_subclassing_test_util",
"//tensorflow/python:client_testlib",
"//tensorflow/python/keras",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
tf_py_test(
name = "model_subclassing_compiled_test",
srcs = ["model_subclassing_compiled_test.py"],
python_version = "PY3",
shard_count = 4,
tags = [
"no_windows",
"notsan",
],
deps = [
":model_subclassing_test_util",
"//tensorflow/python:client_testlib",
"//tensorflow/python/keras",
"//third_party/py/numpy",
"@absl_py//absl/testing:parameterized",
],
)
tf_py_test(
name = "temporal_sample_weights_correctness_test",
srcs = ["temporal_sample_weights_correctness_test.py"],
python_version = "PY3",
shard_count = 20,
deps = [
"//tensorflow/python:client_testlib",
"//tensorflow/python/keras",
"//third_party/py/numpy",
],
)

View File

@ -27,7 +27,7 @@ import numpy as np
from tensorflow.python import keras
from tensorflow.python.keras import keras_parameterized
from tensorflow.python.keras import testing_utils
from tensorflow.python.keras.saving import model_architectures
from tensorflow.python.keras.tests import model_architectures
from tensorflow.python.platform import test

View File

@ -25,8 +25,8 @@ import numpy as np
from tensorflow.python import keras
from tensorflow.python.data.ops import dataset_ops
from tensorflow.python.keras import keras_parameterized
from tensorflow.python.keras import model_subclassing_test_util as model_util
from tensorflow.python.keras import testing_utils
from tensorflow.python.keras.tests import model_subclassing_test_util as model_util
from tensorflow.python.platform import test
try:

View File

@ -30,8 +30,8 @@ from tensorflow.python.framework import ops
from tensorflow.python.framework import tensor_shape
from tensorflow.python.framework import test_util
from tensorflow.python.keras import keras_parameterized
from tensorflow.python.keras import model_subclassing_test_util as model_util
from tensorflow.python.keras import testing_utils
from tensorflow.python.keras.tests import model_subclassing_test_util as model_util
from tensorflow.python.ops import array_ops
from tensorflow.python.ops import embedding_ops
from tensorflow.python.ops import init_ops

View File

@ -82,11 +82,12 @@ COMMON_PIP_DEPS = [
"//tensorflow/python/distribute:combinations",
"//tensorflow/python/distribute:multi_process_runner",
"//tensorflow/python/eager:eager_pip",
"//tensorflow/python/keras:model_subclassing_test_util",
"//tensorflow/python/keras/layers/preprocessing:preprocessing_test_utils",
"//tensorflow/python/keras/distribute:distribute_strategy_test_lib",
"//tensorflow/python/keras/distribute:multi_worker_testing_utils",
"//tensorflow/python/keras/mixed_precision/experimental:test_util",
"//tensorflow/python/keras/tests:model_subclassing_test_util",
"//tensorflow/python/keras/tests:model_architectures",
"//tensorflow/python/kernel_tests:cudnn_deterministic_base",
"//tensorflow/python/kernel_tests:bias_op_base",
"//tensorflow/python/kernel_tests/random:util",