Skip to content

Commit 49a7693

Browse files
iindyktfx-copybara
authored andcommitted
Updating tensorflow dependency to >=2.12,<3 and protobuf to >=3.20.3,<5.
TF 2.12 updated their packaged protobuf C++ dependency to 3.21.9 making it incompatible with our packaged build in TFMD and s2t. Python's protobuf version 3.20.3 is the minimal version compatible with the new build and python 3.10. In general this protobuf bound lets TF dictate the version. This should fix our builds against released and nightly TF. PiperOrigin-RevId: 522143653
1 parent 967ba5d commit 49a7693

File tree

6 files changed

+11
-8
lines changed

6 files changed

+11
-8
lines changed

RELEASE.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,9 @@
66

77
## Bug Fixes and Other Changes
88

9+
* Depends on `tensorflow>=2.12.0,<2.13`.
10+
* Depends on `protobuf>=3.20.3,<5`.
11+
912
## Breaking Changes
1013

1114
## Deprecations

WORKSPACE

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ tf_configure(name = "local_config_tf")
4141
# 3. Request the new archive to be mirrored on mirror.bazel.build for more
4242
# reliable downloads.
4343

44-
_TENSORFLOW_GIT_COMMIT = "d5b57ca93e506df258271ea00fc29cf98383a374" # tf 2.11.0
45-
_TENSORFLOW_ARCHIVE_SHA256 = "37abf3d45a34e11012ef60ee6dcd79e317384b62d319b6346cc2a94eb447e172"
44+
_TENSORFLOW_GIT_COMMIT = "0db597d0d758aba578783b5bf46c889700a45085" # tf 2.12.0
45+
_TENSORFLOW_ARCHIVE_SHA256 = "e97c242d13e386192e3a9f60fd674461b6595b02b3a2a48edd6fb11aeee7e038"
4646

4747
http_archive(
4848
name = "org_tensorflow",

configure.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ SHARED_LIBRARY_DIR=${TF_LFLAGS:2}
6262
SHARED_LIBRARY_NAME=$(echo $TF_LFLAGS | rev | cut -d":" -f1 | rev)
6363
if ! [[ $TF_LFLAGS =~ .*:.* ]]; then
6464
if [[ "$(uname)" == "Darwin" ]]; then
65-
SHARED_LIBRARY_NAME="libtensorflow_framework.dylib"
65+
SHARED_LIBRARY_NAME="libtensorflow_framework.2.dylib"
6666
else
6767
SHARED_LIBRARY_NAME="libtensorflow_framework.so"
6868
fi

setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ def select_constraint(default, nightly=None, git_master=None):
7777
# TODO(b/263060885): Remove the explicit numpy dependency once TF works
7878
# with numpy>=1.24.
7979
'numpy<1.24',
80-
'protobuf>=3.13,<4',
81-
'tensorflow>=2.11.0,<2.12',
80+
'protobuf>=3.20.3,<5',
81+
'tensorflow>=2.12,<3',
8282
'tensorflow-metadata' + select_constraint(
8383
default='>=1.13.0,<1.14.0',
8484
nightly='>=1.14.0.dev',

struct2tensor/struct2tensor.bzl

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ def s2t_proto_library_py(name, proto_library, srcs = [], deps = [], oss_deps = [
176176
name = name,
177177
srcs = srcs,
178178
srcs_version = "PY3ONLY",
179-
deps = ["@com_google_protobuf//:protobuf_python"] + oss_deps,
179+
deps = ["@com_google_protobuf//:well_known_types_py_pb2"] + oss_deps,
180180
default_runtime = "@com_google_protobuf//:protobuf_python",
181181
protoc = "@com_google_protobuf//:protoc",
182182
visibility = visibility,

struct2tensor/workspace.bzl

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,10 @@ def struct2tensor_workspace():
5353
urls = ["https://github.com/apache/arrow/archive/%s.zip" % ARROW_COMMIT],
5454
)
5555

56-
_TFMD_COMMIT_HASH = "e34b5df6d644f32f7a30b4a5c89680fdf7b82519" # 1.13.0
56+
_TFMD_COMMIT_HASH = "ab1a22c7a1ad8485d52f660fbf285f6948f0f6b2" # 1.12.0 with updated protobuf
5757
http_archive(
5858
name = "com_github_tensorflow_metadata",
59-
sha256 = "c3ef479c7b6d1e2300edf58591ba1ed9836b8088ba134dd4e9cb8b88ec887037",
59+
sha256 = "6950a27c748c59bdac6cb5faa4215478a72f19897dee6ee6b67f5c749291f8b7",
6060
strip_prefix = "metadata-%s" % _TFMD_COMMIT_HASH,
6161
urls = [
6262
"https://github.com/tensorflow/metadata/archive/%s.tar.gz" % _TFMD_COMMIT_HASH,

0 commit comments

Comments
 (0)