Skip to content

Commit 42b2b62

Browse files
teijeongtensorflower-gardener
authored andcommitted
Fix dependencies for python/, core/quantization/
PiperOrigin-RevId: 370621567
1 parent e06ec19 commit 42b2b62

File tree

3 files changed

+23
-9
lines changed
  • tensorflow_model_optimization/python/core/quantization
    • keras/collaborative_optimizations

3 files changed

+23
-9
lines changed
Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
1+
load("//tensorflow_model_optimization:tensorflow_model_optimization.bzl", "py_strict_library")
2+
13
package(default_visibility = ["//tensorflow_model_optimization:__subpackages__"])
24

35
licenses(["notice"]) # Apache 2.0
46

5-
py_library(
7+
py_strict_library(
68
name = "quantization",
79
srcs = ["__init__.py"],
810
srcs_version = "PY3",
9-
deps = ["//tensorflow_model_optimization/python/core/quantization/keras"],
11+
deps = [
12+
"//tensorflow_model_optimization/python/core/quantization/keras", # buildcleaner: keep
13+
],
1014
)

tensorflow_model_optimization/python/core/quantization/keras/collaborative_optimizations/cluster_preserve/BUILD

Lines changed: 10 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
load("//tensorflow_model_optimization:tensorflow_model_optimization.bzl", "py_strict_library")
2+
13
package(default_visibility = [
24
"//tensorflow_model_optimization:__subpackages__",
35
])
46

57
licenses(["notice"])
68

7-
py_library(
9+
py_strict_library(
810
name = "cluster_preserve",
911
srcs = [
1012
"__init__.py",
@@ -15,15 +17,14 @@ py_library(
1517
],
1618
)
1719

18-
py_library(
20+
py_strict_library(
1921
name = "cluster_utils",
2022
srcs = [
2123
"cluster_utils.py",
2224
],
2325
srcs_version = "PY3",
2426
deps = [
2527
# tensorflow dep1,
26-
"//tensorflow_model_optimization/python/core/clustering/keras:clustering_registry",
2728
],
2829
)
2930

@@ -36,6 +37,9 @@ py_library(
3637
deps = [
3738
":cluster_utils",
3839
# tensorflow dep1,
40+
"//tensorflow_model_optimization/python/core/clustering/keras:clustering_registry",
41+
"//tensorflow_model_optimization/python/core/quantization/keras:quant_ops",
42+
"//tensorflow_model_optimization/python/core/quantization/keras:quantizers",
3943
"//tensorflow_model_optimization/python/core/quantization/keras/default_8bit:default_8bit_quantize_registry",
4044
"//tensorflow_model_optimization/python/core/quantization/keras/default_8bit:default_8bit_quantizers",
4145
],
@@ -50,13 +54,15 @@ py_test(
5054
visibility = ["//visibility:private"],
5155
deps = [
5256
":cluster_preserve_quantize_registry",
57+
# absl/testing:parameterized dep1,
5358
# tensorflow dep1,
59+
"//tensorflow_model_optimization/python/core/clustering/keras:clustering_registry",
5460
"//tensorflow_model_optimization/python/core/quantization/keras:quantize_config",
5561
"//tensorflow_model_optimization/python/core/quantization/keras/default_8bit:default_8bit_quantize_registry",
5662
],
5763
)
5864

59-
py_library(
65+
py_strict_library(
6066
name = "default_8bit_cluster_preserve_quantize_scheme",
6167
srcs = [
6268
"default_8bit_cluster_preserve_quantize_scheme.py",

tensorflow_model_optimization/python/core/quantization/keras/collaborative_optimizations/prune_preserve/BUILD

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1+
load("//tensorflow_model_optimization:tensorflow_model_optimization.bzl", "py_strict_library")
2+
13
package(default_visibility = [
24
"//tensorflow_model_optimization:__subpackages__",
35
])
46

57
licenses(["notice"])
68

7-
py_library(
9+
py_strict_library(
810
name = "prune_preserve",
911
srcs = [
1012
"__init__.py",
@@ -15,14 +17,16 @@ py_library(
1517
],
1618
)
1719

18-
py_library(
20+
py_strict_library(
1921
name = "prune_preserve_quantize_registry",
2022
srcs = [
2123
"prune_preserve_quantize_registry.py",
2224
],
2325
srcs_version = "PY3",
2426
deps = [
2527
# tensorflow dep1,
28+
"//tensorflow_model_optimization/python/core/quantization/keras:quant_ops",
29+
"//tensorflow_model_optimization/python/core/quantization/keras:quantizers",
2630
"//tensorflow_model_optimization/python/core/quantization/keras/default_8bit:default_8bit_quantize_registry",
2731
"//tensorflow_model_optimization/python/core/quantization/keras/default_8bit:default_8bit_quantizers",
2832
],
@@ -43,7 +47,7 @@ py_test(
4347
],
4448
)
4549

46-
py_library(
50+
py_strict_library(
4751
name = "default_8bit_prune_preserve_quantize_scheme",
4852
srcs = [
4953
"default_8bit_prune_preserve_quantize_scheme.py",

0 commit comments

Comments
 (0)