From ec2a34d2a43639d8a9a2169f3377452a8a37b40f Mon Sep 17 00:00:00 2001 From: MediaPipe Team Date: Sun, 23 Oct 2022 16:42:49 -0700 Subject: [PATCH] Replace pytype_struct_contrib_test by py_strict_test. Also remove unnecessary BUILD attributes. PiperOrigin-RevId: 483237371 --- mediapipe/model_maker/python/core/BUILD | 2 +- mediapipe/model_maker/python/core/data/BUILD | 9 +-------- mediapipe/model_maker/python/core/tasks/BUILD | 7 +------ mediapipe/model_maker/python/core/utils/BUILD | 9 +-------- mediapipe/model_maker/python/vision/core/BUILD | 2 +- .../model_maker/python/vision/image_classifier/BUILD | 2 +- mediapipe/tasks/python/components/containers/BUILD | 2 +- mediapipe/tasks/python/core/BUILD | 2 +- mediapipe/tasks/python/metadata/metadata_writers/BUILD | 2 +- mediapipe/tasks/python/test/BUILD | 2 +- mediapipe/tasks/python/vision/BUILD | 2 +- mediapipe/tasks/python/vision/core/BUILD | 2 +- 12 files changed, 12 insertions(+), 31 deletions(-) diff --git a/mediapipe/model_maker/python/core/BUILD b/mediapipe/model_maker/python/core/BUILD index 9f205bb11..636a1a720 100644 --- a/mediapipe/model_maker/python/core/BUILD +++ b/mediapipe/model_maker/python/core/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Placeholder for internal Python strict library compatibility macro. +# Placeholder for internal Python strict library and test compatibility macro. package( default_visibility = ["//mediapipe:__subpackages__"], diff --git a/mediapipe/model_maker/python/core/data/BUILD b/mediapipe/model_maker/python/core/data/BUILD index c4c659d56..70a62e8f7 100644 --- a/mediapipe/model_maker/python/core/data/BUILD +++ b/mediapipe/model_maker/python/core/data/BUILD @@ -13,6 +13,7 @@ # limitations under the License. # Placeholder for internal Python strict library and test compatibility macro. +# Placeholder for internal Python strict test compatibility macro. licenses(["notice"]) @@ -23,15 +24,12 @@ package( py_library( name = "data_util", srcs = ["data_util.py"], - srcs_version = "PY3", ) py_test( name = "data_util_test", srcs = ["data_util_test.py"], data = ["//mediapipe/model_maker/python/core/data/testdata"], - python_version = "PY3", - srcs_version = "PY3", deps = [":data_util"], ) @@ -44,8 +42,6 @@ py_library( py_test( name = "dataset_test", srcs = ["dataset_test.py"], - python_version = "PY3", - srcs_version = "PY3", deps = [ ":dataset", "//mediapipe/model_maker/python/core/utils:test_util", @@ -55,14 +51,11 @@ py_test( py_library( name = "classification_dataset", srcs = ["classification_dataset.py"], - srcs_version = "PY3", deps = [":dataset"], ) py_test( name = "classification_dataset_test", srcs = ["classification_dataset_test.py"], - python_version = "PY3", - srcs_version = "PY3", deps = [":classification_dataset"], ) diff --git a/mediapipe/model_maker/python/core/tasks/BUILD b/mediapipe/model_maker/python/core/tasks/BUILD index b3588f0be..124de621a 100644 --- a/mediapipe/model_maker/python/core/tasks/BUILD +++ b/mediapipe/model_maker/python/core/tasks/BUILD @@ -13,6 +13,7 @@ # limitations under the License. # Placeholder for internal Python strict library and test compatibility macro. +# Placeholder for internal Python strict test compatibility macro. package( default_visibility = ["//mediapipe:__subpackages__"], @@ -23,7 +24,6 @@ licenses(["notice"]) py_library( name = "custom_model", srcs = ["custom_model.py"], - srcs_version = "PY3", deps = [ "//mediapipe/model_maker/python/core/data:dataset", "//mediapipe/model_maker/python/core/utils:model_util", @@ -34,8 +34,6 @@ py_library( py_test( name = "custom_model_test", srcs = ["custom_model_test.py"], - python_version = "PY3", - srcs_version = "PY3", deps = [ ":custom_model", "//mediapipe/model_maker/python/core/utils:test_util", @@ -45,7 +43,6 @@ py_test( py_library( name = "classifier", srcs = ["classifier.py"], - srcs_version = "PY3", deps = [ ":custom_model", "//mediapipe/model_maker/python/core/data:dataset", @@ -55,8 +52,6 @@ py_library( py_test( name = "classifier_test", srcs = ["classifier_test.py"], - python_version = "PY3", - srcs_version = "PY3", deps = [ ":classifier", "//mediapipe/model_maker/python/core/utils:test_util", diff --git a/mediapipe/model_maker/python/core/utils/BUILD b/mediapipe/model_maker/python/core/utils/BUILD index 2538ec8fa..a2ec52044 100644 --- a/mediapipe/model_maker/python/core/utils/BUILD +++ b/mediapipe/model_maker/python/core/utils/BUILD @@ -13,6 +13,7 @@ # limitations under the License. # Placeholder for internal Python strict library and test compatibility macro. +# Placeholder for internal Python strict test compatibility macro. licenses(["notice"]) @@ -24,7 +25,6 @@ py_library( name = "test_util", testonly = 1, srcs = ["test_util.py"], - srcs_version = "PY3", deps = [ ":model_util", "//mediapipe/model_maker/python/core/data:dataset", @@ -34,7 +34,6 @@ py_library( py_library( name = "model_util", srcs = ["model_util.py"], - srcs_version = "PY3", deps = [ ":quantization", "//mediapipe/model_maker/python/core/data:dataset", @@ -44,8 +43,6 @@ py_library( py_test( name = "model_util_test", srcs = ["model_util_test.py"], - python_version = "PY3", - srcs_version = "PY3", deps = [ ":model_util", ":quantization", @@ -62,8 +59,6 @@ py_library( py_test( name = "loss_functions_test", srcs = ["loss_functions_test.py"], - python_version = "PY3", - srcs_version = "PY3", deps = [":loss_functions"], ) @@ -77,8 +72,6 @@ py_library( py_test( name = "quantization_test", srcs = ["quantization_test.py"], - python_version = "PY3", - srcs_version = "PY3", deps = [ ":quantization", ":test_util", diff --git a/mediapipe/model_maker/python/vision/core/BUILD b/mediapipe/model_maker/python/vision/core/BUILD index 2658841ae..0b15a0276 100644 --- a/mediapipe/model_maker/python/vision/core/BUILD +++ b/mediapipe/model_maker/python/vision/core/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Placeholder for internal Python strict library compatibility macro. +# Placeholder for internal Python strict library and test compatibility macro. # Placeholder for internal Python strict test compatibility macro. licenses(["notice"]) diff --git a/mediapipe/model_maker/python/vision/image_classifier/BUILD b/mediapipe/model_maker/python/vision/image_classifier/BUILD index 5b4ec2bd1..a2268059f 100644 --- a/mediapipe/model_maker/python/vision/image_classifier/BUILD +++ b/mediapipe/model_maker/python/vision/image_classifier/BUILD @@ -12,8 +12,8 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Placeholder for internal Python library rule. # Placeholder for internal Python strict library and test compatibility macro. +# Placeholder for internal Python library rule. licenses(["notice"]) diff --git a/mediapipe/tasks/python/components/containers/BUILD b/mediapipe/tasks/python/components/containers/BUILD index 8dd9fcd60..fd25401f7 100644 --- a/mediapipe/tasks/python/components/containers/BUILD +++ b/mediapipe/tasks/python/components/containers/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Placeholder for internal Python strict library compatibility macro. +# Placeholder for internal Python strict library and test compatibility macro. package(default_visibility = ["//mediapipe/tasks:internal"]) diff --git a/mediapipe/tasks/python/core/BUILD b/mediapipe/tasks/python/core/BUILD index d5cdeecda..76e2f4f4a 100644 --- a/mediapipe/tasks/python/core/BUILD +++ b/mediapipe/tasks/python/core/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Placeholder for internal Python strict library compatibility macro. +# Placeholder for internal Python strict library and test compatibility macro. package(default_visibility = ["//mediapipe/tasks:internal"]) diff --git a/mediapipe/tasks/python/metadata/metadata_writers/BUILD b/mediapipe/tasks/python/metadata/metadata_writers/BUILD index 3e44218ac..2a0c29dec 100644 --- a/mediapipe/tasks/python/metadata/metadata_writers/BUILD +++ b/mediapipe/tasks/python/metadata/metadata_writers/BUILD @@ -1,4 +1,4 @@ -# Placeholder for internal Python strict library compatibility macro. +# Placeholder for internal Python strict library and test compatibility macro. package( default_visibility = [ diff --git a/mediapipe/tasks/python/test/BUILD b/mediapipe/tasks/python/test/BUILD index 8e5b91cf9..92c5f4038 100644 --- a/mediapipe/tasks/python/test/BUILD +++ b/mediapipe/tasks/python/test/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Placeholder for internal Python strict library compatibility macro. +# Placeholder for internal Python strict library and test compatibility macro. package(default_visibility = ["//mediapipe/tasks:internal"]) diff --git a/mediapipe/tasks/python/vision/BUILD b/mediapipe/tasks/python/vision/BUILD index 7ff818610..e7be51c8d 100644 --- a/mediapipe/tasks/python/vision/BUILD +++ b/mediapipe/tasks/python/vision/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Placeholder for internal Python strict library compatibility macro. +# Placeholder for internal Python strict library and test compatibility macro. package(default_visibility = ["//mediapipe/tasks:internal"]) diff --git a/mediapipe/tasks/python/vision/core/BUILD b/mediapipe/tasks/python/vision/core/BUILD index c7422969a..df1b06f4c 100644 --- a/mediapipe/tasks/python/vision/core/BUILD +++ b/mediapipe/tasks/python/vision/core/BUILD @@ -12,7 +12,7 @@ # See the License for the specific language governing permissions and # limitations under the License. -# Placeholder for internal Python strict library compatibility macro. +# Placeholder for internal Python strict library and test compatibility macro. package(default_visibility = ["//mediapipe/tasks:internal"])