Skip to content

Commit ff7230f

Browse files
Xharktensorflower-gardener
authored andcommitted
Update release notes and version for TFMOT release 0.8.1.
- Make requirements.txt align with setup.py. - Mark broken tests (with tf-nightly) as TODOs. PiperOrigin-RevId: 914383222
1 parent c497ed7 commit ff7230f

38 files changed

Lines changed: 151 additions & 137 deletions

File tree

RELEASE.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,14 @@ Keras pruning API:
3232

3333
# TensorFlow Model Optimization next release TBD
3434

35+
# TensorFlow Model Optimization 0.8.1
36+
37+
TFMOT 0.8.1 improves compatibility with numpy v2 and dependencies.
38+
* Fix keras importing failures at the colab.
39+
* Add required packages to setup.py to match requirements.txt.
40+
* Relax absl-py requirements for tensorflow_model_optimization.
41+
* Mark compatibility with numpy v2.
42+
3543
# TensorFlow Model Optimization 0.8.0
3644

3745
TFMOT 0.8.0 forces users to use the keras v2 version.

pip_pkg.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ mkdir -p "$1"
3434
DEST=$(dirname "${1}/does_not_exist")
3535
DEST=$(cd "$DEST" && pwd)
3636

37-
cd bazel-bin/pip_pkg.runfiles/_main
37+
cd bazel-bin/pip_pkg.runfiles/tensorflow_model_optimization
3838

3939
# Pass through remaining arguments (following the first argument, which
4040
# specifies the output dir) to setup.py, e.g.,

requirements.txt

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
absl-py>=1.2.0
2-
numpy~=1.23.0
1+
absl-py~=1.2
2+
numpy>=1.23
33
six~=1.14
44
scipy
5-
enum34~=1.1
6-
mock
5+
enum34~=1.1;python_version<"3.4"
76
dm-tree~=0.1.1
7+
mock
88
tf-keras>=2.14.1

tensorflow_model_optimization/BUILD

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,6 @@
1+
# Placeholder: load py_library
2+
load("@rules_license//rules:license.bzl", "license")
3+
14
# Description:
25
#
36
# TensorFlow Optimization is a repository for the training-time
@@ -7,15 +10,15 @@
710
# https://github.com/tensorflow/model-optimization
811
load("//tensorflow_model_optimization:tensorflow_model_optimization.bzl", "py_strict_binary")
912

10-
# Placeholder: load py_library
11-
load("//tools/build_defs/license:license.bzl", "license")
12-
1313
package(
1414
default_applicable_licenses = [":license"],
1515
default_visibility = ["//visibility:public"],
1616
)
1717

18-
license(name = "license")
18+
license(
19+
name = "license",
20+
license_kinds = ["@rules_license//licenses/spdx:Apache-2.0"],
21+
)
1922

2023
licenses(["notice"])
2124

@@ -24,7 +27,7 @@ exports_files(["LICENSE"])
2427
py_library(
2528
name = "tensorflow_model_optimization",
2629
srcs = ["__init__.py"],
27-
strict_deps = True,
30+
# strict_deps = True,
2831
deps = [
2932
# distutils dep1,
3033
"//tensorflow_model_optimization/python", # buildcleaner: keep

tensorflow_model_optimization/python/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ licenses(["notice"])
1010
py_library(
1111
name = "python",
1212
srcs = ["__init__.py"],
13-
strict_deps = True,
13+
# strict_deps = True,
1414
deps = [
1515
"//tensorflow_model_optimization/python/core", # buildcleaner: keep
1616
],

tensorflow_model_optimization/python/core/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ licenses(["notice"])
1010
py_library(
1111
name = "core",
1212
srcs = ["__init__.py"],
13-
strict_deps = True,
13+
# strict_deps = True,
1414
deps = [
1515
"//tensorflow_model_optimization/python/core/api", # buildcleaner: keep
1616
"//tensorflow_model_optimization/python/core/clustering", # buildcleaner: keep
@@ -24,5 +24,5 @@ py_library(
2424
py_library(
2525
name = "version",
2626
srcs = ["version.py"],
27-
strict_deps = True,
27+
# strict_deps = True,
2828
)

tensorflow_model_optimization/python/core/api/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ py_library(
3030
"sparsity/__init__.py",
3131
"sparsity/keras/__init__.py",
3232
],
33-
strict_deps = True,
33+
# strict_deps = True,
3434
deps = [
3535
"//tensorflow_model_optimization/python/core/clustering/keras:cluster",
3636
"//tensorflow_model_optimization/python/core/clustering/keras:cluster_config",

tensorflow_model_optimization/python/core/clustering/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ licenses(["notice"])
1010
py_library(
1111
name = "clustering",
1212
srcs = ["__init__.py"],
13-
strict_deps = True,
13+
# strict_deps = True,
1414
deps = [
1515
"//tensorflow_model_optimization/python/core/clustering/keras", # buildcleaner: keep
1616
],

tensorflow_model_optimization/python/core/clustering/keras/BUILD

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ py_library(
1616
srcs = [
1717
"__init__.py",
1818
],
19-
strict_deps = True,
19+
# strict_deps = True,
2020
deps = [
2121
":cluster", # buildcleaner: keep
2222
":clustering_callbacks", # buildcleaner: keep
@@ -27,7 +27,7 @@ py_library(
2727
py_library(
2828
name = "cluster",
2929
srcs = ["cluster.py"],
30-
strict_deps = True,
30+
# strict_deps = True,
3131
visibility = ["//visibility:public"],
3232
deps = [
3333
":cluster_config",
@@ -41,14 +41,14 @@ py_library(
4141
py_library(
4242
name = "cluster_config",
4343
srcs = ["cluster_config.py"],
44-
strict_deps = True,
44+
# strict_deps = True,
4545
visibility = ["//visibility:public"],
4646
)
4747

4848
py_library(
4949
name = "clustering_registry",
5050
srcs = ["clustering_registry.py"],
51-
strict_deps = True,
51+
# strict_deps = True,
5252
visibility = ["//visibility:public"],
5353
deps = [
5454
":clusterable_layer",
@@ -61,7 +61,7 @@ py_library(
6161
py_library(
6262
name = "clusterable_layer",
6363
srcs = ["clusterable_layer.py"],
64-
strict_deps = True,
64+
# strict_deps = True,
6565
visibility = ["//visibility:public"],
6666
deps = [
6767
# six dep1,
@@ -71,7 +71,7 @@ py_library(
7171
py_library(
7272
name = "clustering_centroids",
7373
srcs = ["clustering_centroids.py"],
74-
strict_deps = True,
74+
# strict_deps = True,
7575
visibility = ["//visibility:public"],
7676
deps = [
7777
":cluster_config",
@@ -85,7 +85,7 @@ py_library(
8585
py_library(
8686
name = "cluster_wrapper",
8787
srcs = ["cluster_wrapper.py"],
88-
strict_deps = True,
88+
# strict_deps = True,
8989
visibility = ["//visibility:public"],
9090
deps = [
9191
":cluster_config",
@@ -100,7 +100,7 @@ py_library(
100100
py_library(
101101
name = "clustering_algorithm",
102102
srcs = ["clustering_algorithm.py"],
103-
strict_deps = True,
103+
# strict_deps = True,
104104
visibility = ["//visibility:public"],
105105
deps = [
106106
# six dep1,
@@ -112,7 +112,7 @@ py_library(
112112
py_library(
113113
name = "clustering_callbacks",
114114
srcs = ["clustering_callbacks.py"],
115-
strict_deps = True,
115+
# strict_deps = True,
116116
visibility = ["//visibility:public"],
117117
deps = [
118118
# tensorflow dep1,
@@ -124,7 +124,7 @@ py_test(
124124
name = "cluster_test",
125125
size = "medium",
126126
srcs = ["cluster_test.py"],
127-
strict_deps = False,
127+
# strict_deps = False,
128128
visibility = ["//visibility:public"],
129129
deps = [
130130
":cluster",
@@ -193,7 +193,7 @@ py_test(
193193
name = "cluster_integration_test",
194194
size = "medium",
195195
srcs = ["cluster_integration_test.py"],
196-
strict_deps = False,
196+
# strict_deps = False,
197197
visibility = ["//visibility:public"],
198198
deps = [
199199
":cluster",

tensorflow_model_optimization/python/core/clustering/keras/experimental/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ py_library(
1414
srcs = [
1515
"__init__.py",
1616
],
17-
strict_deps = True,
17+
# strict_deps = True,
1818
deps = [
1919
":cluster", # buildcleaner: keep
2020
],
@@ -23,7 +23,7 @@ py_library(
2323
py_library(
2424
name = "cluster",
2525
srcs = ["cluster.py"],
26-
strict_deps = True,
26+
# strict_deps = True,
2727
visibility = ["//visibility:public"],
2828
deps = [
2929
"//tensorflow_model_optimization/python/core/clustering/keras:cluster",

0 commit comments

Comments
 (0)