Skip to content

Commit f86fb98

Browse files
qlzh727tensorflower-gardener
authored andcommitted
Remove the build deps to legacy keras code in tensorflow/python/keras.
PiperOrigin-RevId: 495929362
1 parent 15d6ea9 commit f86fb98

File tree

4 files changed

+2
-14
lines changed

4 files changed

+2
-14
lines changed

tensorflow_model_optimization/python/core/keras/testing/BUILD

-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,5 @@ py_strict_library(
1515
deps = [
1616
# numpy dep1,
1717
# tensorflow dep1,
18-
# python/keras tensorflow dep2,
1918
],
2019
)

tensorflow_model_optimization/python/core/keras/testing/test_utils_mnist.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -16,9 +16,9 @@
1616

1717
import numpy as np
1818
import tensorflow as tf
19+
from tensorflow import keras
1920

20-
from tensorflow.python import keras
21-
l = keras.layers
21+
l = tf.keras.layers
2222

2323

2424
def layers_list():

tensorflow_model_optimization/python/core/quantization/keras/BUILD

-6
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,6 @@ py_strict_test(
4545
":quant_ops",
4646
# absl/testing:parameterized dep1,
4747
# tensorflow dep1,
48-
# python/keras tensorflow dep2,
4948
"//tensorflow_model_optimization/python/core/keras:compat",
5049
],
5150
)
@@ -76,7 +75,6 @@ py_strict_test(
7675
# absl/testing:parameterized dep1,
7776
# numpy dep1,
7877
# tensorflow dep1,
79-
# python/keras tensorflow dep2,
8078
"//tensorflow_model_optimization/python/core/keras:compat",
8179
],
8280
)
@@ -172,7 +170,6 @@ py_strict_test(
172170
# absl/testing:parameterized dep1,
173171
# numpy dep1,
174172
# tensorflow dep1,
175-
# python/keras tensorflow dep2,
176173
],
177174
)
178175

@@ -292,7 +289,6 @@ py_strict_test(
292289
# absl/testing:parameterized dep1,
293290
# numpy dep1,
294291
# tensorflow dep1,
295-
# python/keras tensorflow dep2,
296292
"//tensorflow_model_optimization/python/core/keras:compat",
297293
"//tensorflow_model_optimization/python/core/keras:test_utils",
298294
],
@@ -311,7 +307,6 @@ py_strict_test(
311307
# absl/testing:parameterized dep1,
312308
# numpy dep1,
313309
# tensorflow dep1,
314-
# python/keras tensorflow dep2,
315310
],
316311
)
317312

@@ -328,7 +323,6 @@ py_strict_test(
328323
# absl/testing:parameterized dep1,
329324
# numpy dep1,
330325
# tensorflow dep1,
331-
# python/keras tensorflow dep2,
332326
"//tensorflow_model_optimization/python/core/keras:compat",
333327
"//tensorflow_model_optimization/python/core/keras/testing:test_utils_mnist",
334328
],

tensorflow_model_optimization/python/core/sparsity/keras/BUILD

-5
Original file line numberDiff line numberDiff line change
@@ -88,7 +88,6 @@ py_strict_test(
8888
":pruning_schedule",
8989
# absl/testing:parameterized dep1,
9090
# tensorflow dep1,
91-
# python/keras tensorflow dep2,
9291
"//tensorflow_model_optimization/python/core/keras:compat",
9392
],
9493
)
@@ -139,7 +138,6 @@ py_strict_test(
139138
# absl/testing:parameterized dep1,
140139
# numpy dep1,
141140
# tensorflow dep1,
142-
# python/keras tensorflow dep2,
143141
"//tensorflow_model_optimization/python/core/keras:test_utils",
144142
],
145143
)
@@ -209,7 +207,6 @@ py_strict_test(
209207
# absl/testing:parameterized dep1,
210208
# numpy dep1,
211209
# tensorflow dep1,
212-
# python/keras tensorflow dep2,
213210
"//tensorflow_model_optimization/python/core/keras:test_utils",
214211
],
215212
)
@@ -231,7 +228,6 @@ py_strict_test(
231228
# absl/testing:parameterized dep1,
232229
# numpy dep1,
233230
# tensorflow dep1,
234-
# python/keras tensorflow dep2,
235231
"//tensorflow_model_optimization/python/core/keras:test_utils",
236232
],
237233
)
@@ -295,7 +291,6 @@ py_strict_test(
295291
# absl/testing:parameterized dep1,
296292
# numpy dep1,
297293
# tensorflow dep1,
298-
# python/keras tensorflow dep2,
299294
"//tensorflow_model_optimization/python/core/keras:compat",
300295
],
301296
)

0 commit comments

Comments
 (0)