1+ # buildifier: disable=same-origin-load
2+ load ("//tensorflow_model_optimization:tensorflow_model_optimization.bzl" , "py_strict_library" )
3+
4+ # buildifier: disable=same-origin-load
5+ load ("//tensorflow_model_optimization:tensorflow_model_optimization.bzl" , "py_strict_test" )
6+
17package (default_visibility = [
28 "//tensorflow_model_optimization:__subpackages__" ,
39])
410
511licenses (["notice" ])
612
7- py_library (
13+ py_strict_library (
814 name = "keras" ,
915 srcs = [
1016 "__init__.py" ,
1117 ],
1218 srcs_version = "PY3" ,
1319 deps = [
14- ":cluster" ,
15- ":clustering_callbacks" ,
16- "//tensorflow_model_optimization/python/core/clustering/keras/experimental" ,
20+ ":cluster" , # buildcleaner: keep
21+ ":clustering_callbacks" , # buildcleaner: keep
22+ "//tensorflow_model_optimization/python/core/clustering/keras/experimental" , # buildcleaner: keep
1723 ],
1824)
1925
@@ -23,14 +29,13 @@ py_library(
2329 srcs_version = "PY3" ,
2430 visibility = ["//visibility:public" ],
2531 deps = [
26- ":cluster_config" ,
2732 ":cluster_wrapper" ,
2833 ":clustering_centroids" ,
29- ":clustering_registry" ,
34+ # tensorflow dep1 ,
3035 ],
3136)
3237
33- py_library (
38+ py_strict_library (
3439 name = "cluster_config" ,
3540 srcs = ["cluster_config.py" ],
3641 srcs_version = "PY3" ,
@@ -45,23 +50,30 @@ py_library(
4550 deps = [
4651 ":clusterable_layer" ,
4752 ":clustering_algorithm" ,
53+ # tensorflow dep1,
4854 ],
4955)
5056
51- py_library (
57+ py_strict_library (
5258 name = "clusterable_layer" ,
5359 srcs = ["clusterable_layer.py" ],
5460 srcs_version = "PY3" ,
5561 visibility = ["//visibility:public" ],
62+ deps = [
63+ # six dep1,
64+ ],
5665)
5766
58- py_library (
67+ py_strict_library (
5968 name = "clustering_centroids" ,
6069 srcs = ["clustering_centroids.py" ],
6170 srcs_version = "PY3" ,
6271 visibility = ["//visibility:public" ],
6372 deps = [
6473 ":cluster_config" ,
74+ # six dep1,
75+ # tensorflow dep1,
76+ # python:clustering_ops tensorflow dep2,
6577 ],
6678)
6779
@@ -72,15 +84,20 @@ py_library(
7284 visibility = ["//visibility:public" ],
7385 deps = [
7486 ":cluster_config" ,
87+ ":clusterable_layer" ,
88+ ":clustering_centroids" ,
89+ ":clustering_registry" ,
90+ # tensorflow dep1,
7591 ],
7692)
7793
78- py_library (
94+ py_strict_library (
7995 name = "clustering_algorithm" ,
8096 srcs = ["clustering_algorithm.py" ],
8197 srcs_version = "PY3" ,
8298 visibility = ["//visibility:public" ],
8399 deps = [
100+ # six dep1,
84101 # tensorflow dep1,
85102 "//tensorflow_model_optimization/python/core/clustering/keras:cluster_config" ,
86103 ],
@@ -105,6 +122,11 @@ py_test(
105122 visibility = ["//visibility:public" ],
106123 deps = [
107124 ":cluster" ,
125+ ":cluster_config" ,
126+ ":cluster_wrapper" ,
127+ ":clusterable_layer" ,
128+ ":clustering_registry" ,
129+ # absl/testing:parameterized dep1,
108130 # tensorflow dep1,
109131 "//tensorflow_model_optimization/python/core/clustering/keras/experimental:cluster" ,
110132 ],
@@ -117,37 +139,40 @@ py_test(
117139 python_version = "PY3" ,
118140 visibility = ["//visibility:public" ],
119141 deps = [
142+ ":cluster_config" ,
120143 ":clustering_centroids" ,
144+ # absl/testing:parameterized dep1,
121145 # tensorflow dep1,
122146 ],
123147)
124148
125- py_test (
149+ py_strict_test (
126150 name = "cluster_wrapper_test" ,
127151 size = "medium" ,
128152 srcs = ["cluster_wrapper_test.py" ],
129153 python_version = "PY3" ,
130154 visibility = ["//visibility:public" ],
131155 deps = [
132156 ":cluster" ,
157+ ":cluster_config" ,
133158 ":cluster_wrapper" ,
134159 ":clusterable_layer" ,
135- ":clustering_centroids" ,
136- ":clustering_registry" ,
160+ # absl/testing:parameterized dep1,
137161 # tensorflow dep1,
138162 ],
139163)
140164
141- py_test (
165+ py_strict_test (
142166 name = "clustering_registry_test" ,
143167 size = "medium" ,
144168 srcs = ["clustering_registry_test.py" ],
145169 python_version = "PY3" ,
146170 visibility = ["//visibility:public" ],
147171 deps = [
148- ":cluster_wrapper " ,
172+ ":cluster_config " ,
149173 ":clusterable_layer" ,
150174 ":clustering_registry" ,
175+ # absl/testing:parameterized dep1,
151176 # tensorflow dep1,
152177 ],
153178)
@@ -160,42 +185,52 @@ py_test(
160185 visibility = ["//visibility:public" ],
161186 deps = [
162187 ":cluster" ,
188+ ":cluster_config" ,
189+ # absl/testing:parameterized dep1,
190+ # numpy dep1,
163191 # tensorflow dep1,
164192 "//tensorflow_model_optimization/python/core/clustering/keras/experimental:cluster" ,
165- "//tensorflow_model_optimization/python/core/keras:compat" ,
166193 ],
167194)
168195
169- py_test (
196+ py_strict_test (
170197 name = "cluster_distributed_test" ,
171198 srcs = ["cluster_distributed_test.py" ],
172199 python_version = "PY3" ,
173200 visibility = ["//visibility:public" ],
174201 deps = [
175202 ":cluster" ,
203+ ":cluster_config" ,
204+ ":cluster_wrapper" ,
205+ # absl/testing:parameterized dep1,
206+ # numpy dep1,
176207 # tensorflow dep1,
177208 "//tensorflow_model_optimization/python/core/keras:test_utils" ,
178209 ],
179210)
180211
181- py_test (
212+ py_strict_test (
182213 name = "mnist_clusterable_layer_test" ,
183214 srcs = ["mnist_clusterable_layer_test.py" ],
184215 python_version = "PY3" ,
185216 visibility = ["//visibility:public" ],
186217 deps = [
187218 ":cluster" ,
219+ ":cluster_config" ,
220+ ":clusterable_layer" ,
221+ ":clustering_algorithm" ,
188222 # tensorflow dep1,
189223 ],
190224)
191225
192- py_test (
226+ py_strict_test (
193227 name = "mnist_clustering_test" ,
194228 srcs = ["mnist_clustering_test.py" ],
195229 python_version = "PY3" ,
196230 visibility = ["//visibility:public" ],
197231 deps = [
198232 ":cluster" ,
233+ ":cluster_config" ,
199234 # tensorflow dep1,
200235 ],
201236)
0 commit comments