Borrow the main body of the tf api compat test for diffing and api generation. The py_object_to_proto lib need a slight update to config the root path since we will make tensorflow.keras as the root when visiting all the keras related API. PiperOrigin-RevId: 360954528 Change-Id: I1c0d6e3310479cc7cf66ffd1f8b1a060f7f5029b
72 lines
1.3 KiB
Python
72 lines
1.3 KiB
Python
# Description:
|
|
# Common functionality for TensorFlow tooling
|
|
|
|
load("//tensorflow:tensorflow.bzl", "py_test")
|
|
|
|
package(
|
|
default_visibility = [
|
|
"//tensorflow:__subpackages__",
|
|
"//third_party/py/keras/api:__subpackages__",
|
|
],
|
|
licenses = ["notice"], # Apache 2.0
|
|
)
|
|
|
|
py_library(
|
|
name = "public_api",
|
|
srcs = ["public_api.py"],
|
|
srcs_version = "PY3",
|
|
deps = [
|
|
"//tensorflow/python:util",
|
|
"@six_archive//:six",
|
|
],
|
|
)
|
|
|
|
py_test(
|
|
name = "public_api_test",
|
|
srcs = ["public_api_test.py"],
|
|
python_version = "PY3",
|
|
srcs_version = "PY3",
|
|
deps = [
|
|
":public_api",
|
|
"//tensorflow/python:platform_test",
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "traverse",
|
|
srcs = ["traverse.py"],
|
|
srcs_version = "PY3",
|
|
deps = [
|
|
"//tensorflow/python:util",
|
|
"@six_archive//:six",
|
|
],
|
|
)
|
|
|
|
py_test(
|
|
name = "traverse_test",
|
|
srcs = ["traverse_test.py"],
|
|
python_version = "PY3",
|
|
srcs_version = "PY3",
|
|
deps = [
|
|
":test_module1",
|
|
":test_module2",
|
|
":traverse",
|
|
"//tensorflow/python/platform:test",
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "test_module1",
|
|
srcs = ["test_module1.py"],
|
|
srcs_version = "PY3",
|
|
deps = [
|
|
":test_module2",
|
|
],
|
|
)
|
|
|
|
py_library(
|
|
name = "test_module2",
|
|
srcs = ["test_module2.py"],
|
|
srcs_version = "PY3",
|
|
)
|