From c01ca97f52ca451bfba714d7eb8ae0349d85f537 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?M=C3=A5ns=20Nilsson?= Date: Mon, 19 Aug 2024 18:02:07 +0200 Subject: [PATCH] Add py_library generate_test_for_model to tflite-micro package (#2667) This enables running bazel run ..:generate_micro_mutable_op_resolver_from_model_test when tflite_micro is installed. BUG=partially fixing https://github.com/tensorflow/tflite-micro/issues/2564 --- python/tflite_micro/BUILD | 2 ++ tensorflow/lite/micro/tools/BUILD | 1 + 2 files changed, 3 insertions(+) diff --git a/python/tflite_micro/BUILD b/python/tflite_micro/BUILD index 282e9db7..4780b9a2 100644 --- a/python/tflite_micro/BUILD +++ b/python/tflite_micro/BUILD @@ -78,6 +78,7 @@ py_library( visibility = ["//visibility:public"], deps = [ requirement("numpy"), + "//tensorflow/lite/micro/tools:generate_test_for_model", "//tensorflow/lite/tools:flatbuffer_utils", ], ) @@ -132,6 +133,7 @@ py_package( # in the tflm tree. packages = [ "python.tflite_micro", + "tensorflow.lite.micro.tools.generate_test_for_model", "tensorflow.lite.python", "tensorflow.lite.tools.flatbuffer_utils", ], diff --git a/tensorflow/lite/micro/tools/BUILD b/tensorflow/lite/micro/tools/BUILD index a85a7bab..2d1e1874 100644 --- a/tensorflow/lite/micro/tools/BUILD +++ b/tensorflow/lite/micro/tools/BUILD @@ -32,6 +32,7 @@ py_library( name = "generate_test_for_model", srcs = ["generate_test_for_model.py"], srcs_version = "PY3", + visibility = ["//:__subpackages__"], deps = [ "//tensorflow/lite/python:schema_py", ],