Skip to content

Commit 786a3a7

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: 842903676
1 parent 5abbdd0 commit 786a3a7

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
@@ -7,7 +7,7 @@ licenses(["notice"])
77
py_library(
88
name = "python",
99
srcs = ["__init__.py"],
10-
strict_deps = True,
10+
# strict_deps = True,
1111
deps = [
1212
"//tensorflow_model_optimization/python/core", # buildcleaner: keep
1313
],

tensorflow_model_optimization/python/core/BUILD

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ licenses(["notice"])
77
py_library(
88
name = "core",
99
srcs = ["__init__.py"],
10-
strict_deps = True,
10+
# strict_deps = True,
1111
deps = [
1212
"//tensorflow_model_optimization/python/core/api", # buildcleaner: keep
1313
"//tensorflow_model_optimization/python/core/clustering", # buildcleaner: keep
@@ -21,5 +21,5 @@ py_library(
2121
py_library(
2222
name = "version",
2323
srcs = ["version.py"],
24-
strict_deps = True,
24+
# strict_deps = True,
2525
)

tensorflow_model_optimization/python/core/api/BUILD

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ py_library(
2727
"sparsity/__init__.py",
2828
"sparsity/keras/__init__.py",
2929
],
30-
strict_deps = True,
30+
# strict_deps = True,
3131
deps = [
3232
"//tensorflow_model_optimization/python/core/clustering/keras:cluster",
3333
"//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
@@ -7,7 +7,7 @@ licenses(["notice"])
77
py_library(
88
name = "clustering",
99
srcs = ["__init__.py"],
10-
strict_deps = True,
10+
# strict_deps = True,
1111
deps = [
1212
"//tensorflow_model_optimization/python/core/clustering/keras", # buildcleaner: keep
1313
],

tensorflow_model_optimization/python/core/clustering/keras/BUILD

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ py_library(
1313
srcs = [
1414
"__init__.py",
1515
],
16-
strict_deps = True,
16+
# strict_deps = True,
1717
deps = [
1818
":cluster", # buildcleaner: keep
1919
":clustering_callbacks", # buildcleaner: keep
@@ -24,7 +24,7 @@ py_library(
2424
py_library(
2525
name = "cluster",
2626
srcs = ["cluster.py"],
27-
strict_deps = True,
27+
# strict_deps = True,
2828
visibility = ["//visibility:public"],
2929
deps = [
3030
":cluster_config",
@@ -38,14 +38,14 @@ py_library(
3838
py_library(
3939
name = "cluster_config",
4040
srcs = ["cluster_config.py"],
41-
strict_deps = True,
41+
# strict_deps = True,
4242
visibility = ["//visibility:public"],
4343
)
4444

4545
py_library(
4646
name = "clustering_registry",
4747
srcs = ["clustering_registry.py"],
48-
strict_deps = True,
48+
# strict_deps = True,
4949
visibility = ["//visibility:public"],
5050
deps = [
5151
":clusterable_layer",
@@ -58,7 +58,7 @@ py_library(
5858
py_library(
5959
name = "clusterable_layer",
6060
srcs = ["clusterable_layer.py"],
61-
strict_deps = True,
61+
# strict_deps = True,
6262
visibility = ["//visibility:public"],
6363
deps = [
6464
# six dep1,
@@ -68,7 +68,7 @@ py_library(
6868
py_library(
6969
name = "clustering_centroids",
7070
srcs = ["clustering_centroids.py"],
71-
strict_deps = True,
71+
# strict_deps = True,
7272
visibility = ["//visibility:public"],
7373
deps = [
7474
":cluster_config",
@@ -82,7 +82,7 @@ py_library(
8282
py_library(
8383
name = "cluster_wrapper",
8484
srcs = ["cluster_wrapper.py"],
85-
strict_deps = True,
85+
# strict_deps = True,
8686
visibility = ["//visibility:public"],
8787
deps = [
8888
":cluster_config",
@@ -97,7 +97,7 @@ py_library(
9797
py_library(
9898
name = "clustering_algorithm",
9999
srcs = ["clustering_algorithm.py"],
100-
strict_deps = True,
100+
# strict_deps = True,
101101
visibility = ["//visibility:public"],
102102
deps = [
103103
# six dep1,
@@ -109,7 +109,7 @@ py_library(
109109
py_library(
110110
name = "clustering_callbacks",
111111
srcs = ["clustering_callbacks.py"],
112-
strict_deps = True,
112+
# strict_deps = True,
113113
visibility = ["//visibility:public"],
114114
deps = [
115115
# tensorflow dep1,
@@ -121,7 +121,7 @@ py_test(
121121
name = "cluster_test",
122122
size = "medium",
123123
srcs = ["cluster_test.py"],
124-
strict_deps = False,
124+
# strict_deps = False,
125125
visibility = ["//visibility:public"],
126126
deps = [
127127
":cluster",
@@ -190,7 +190,7 @@ py_test(
190190
name = "cluster_integration_test",
191191
size = "medium",
192192
srcs = ["cluster_integration_test.py"],
193-
strict_deps = False,
193+
# strict_deps = False,
194194
visibility = ["//visibility:public"],
195195
deps = [
196196
":cluster",

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ py_library(
1111
srcs = [
1212
"__init__.py",
1313
],
14-
strict_deps = True,
14+
# strict_deps = True,
1515
deps = [
1616
":cluster", # buildcleaner: keep
1717
],
@@ -20,7 +20,7 @@ py_library(
2020
py_library(
2121
name = "cluster",
2222
srcs = ["cluster.py"],
23-
strict_deps = True,
23+
# strict_deps = True,
2424
visibility = ["//visibility:public"],
2525
deps = [
2626
"//tensorflow_model_optimization/python/core/clustering/keras:cluster",

0 commit comments

Comments
 (0)