Skip to content

Commit 8eff349

Browse files
Update protobuf version to avoid conflicts with other part of the Tensorflow.
PiperOrigin-RevId: 808150882
1 parent aa839b1 commit 8eff349

File tree

3 files changed

+43
-33
lines changed

3 files changed

+43
-33
lines changed

WORKSPACE

Lines changed: 38 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -4,34 +4,32 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
44

55
http_archive(
66
name = "icu",
7-
strip_prefix = "icu-release-64-2",
8-
sha256 = "dfc62618aa4bd3ca14a3df548cd65fe393155edd213e49c39f3a30ccd618fc27",
7+
build_file = "//third_party/icu:BUILD.bzl",
8+
integrity = "sha256-5CS6UoLZWtOLUmOaCPuCFk8LDL1/F7U64WvxT4VBhV8=",
9+
strip_prefix = "icu-release-77-1",
910
urls = [
10-
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/unicode-org/icu/archive/release-64-2.zip",
11-
"https://github.com/unicode-org/icu/archive/release-64-2.zip",
11+
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/unicode-org/icu/archive/release-77-1.zip",
12+
"https://github.com/unicode-org/icu/archive/release-77-1.zip",
1213
],
13-
build_file = "//third_party/icu:BUILD.bzl",
14-
patches = ["//third_party/icu:udata.patch"],
15-
patch_args = ["-p1"],
1614
)
1715

1816
http_archive(
1917
name = "com_google_sentencepiece",
20-
strip_prefix = "sentencepiece-0.1.96",
18+
build_file = "//third_party/sentencepiece:BUILD",
19+
patch_args = ["-p1"],
20+
patches = ["//third_party/sentencepiece:sp.patch"],
2121
sha256 = "8409b0126ebd62b256c685d5757150cf7fcb2b92a2f2b98efb3f38fc36719754",
22+
strip_prefix = "sentencepiece-0.1.96",
2223
urls = [
23-
"https://github.com/google/sentencepiece/archive/refs/tags/v0.1.96.zip"
24+
"https://github.com/google/sentencepiece/archive/refs/tags/v0.1.96.zip",
2425
],
25-
build_file = "//third_party/sentencepiece:BUILD",
26-
patches = ["//third_party/sentencepiece:sp.patch"],
27-
patch_args = ["-p1"],
2826
)
2927

3028
http_archive(
3129
name = "cppitertools",
32-
urls = ["https://github.com/ryanhaining/cppitertools/archive/refs/tags/v2.0.zip"],
3330
sha256 = "e56741b108d6baced98c4ccd83fd0d5a545937f2845978799c28d0312c0dee3d",
3431
strip_prefix = "cppitertools-2.0",
32+
urls = ["https://github.com/ryanhaining/cppitertools/archive/refs/tags/v2.0.zip"],
3533
)
3634

3735
http_archive(
@@ -56,10 +54,10 @@ http_archive(
5654

5755
http_archive(
5856
name = "org_tensorflow",
57+
# sha256 = "c8c7e0df61412231f881e624586eafcb77a230ba461c9241e2f6c1e957fbebd6",
5958
strip_prefix = "tensorflow-40998f44c0c500ce0f6e3b1658dfbc54f838a82a",
60-
sha256 = "5a5bc4599964c71277dcac0d687435291e5810d2ac2f6283cc96736febf73aaf",
6159
urls = [
62-
"https://github.com/tensorflow/tensorflow/archive/40998f44c0c500ce0f6e3b1658dfbc54f838a82a.zip"
60+
"https://github.com/tensorflow/tensorflow/archive/40998f44c0c500ce0f6e3b1658dfbc54f838a82a.zip",
6361
],
6462
)
6563

@@ -74,13 +72,13 @@ http_archive(
7472

7573
http_archive(
7674
name = "pybind11",
75+
build_file = "//third_party/pybind11:BUILD.bzl",
76+
sha256 = "efc901aa0aab439a3fea6efeaf930b5a349fb06394bf845c64ce15a9cf8f0240",
77+
strip_prefix = "pybind11-2.13.4",
7778
urls = [
7879
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/pybind/pybind11/archive/v2.13.4.tar.gz",
7980
"https://github.com/pybind/pybind11/archive/v2.13.4.tar.gz",
8081
],
81-
sha256 = "efc901aa0aab439a3fea6efeaf930b5a349fb06394bf845c64ce15a9cf8f0240",
82-
strip_prefix = "pybind11-2.13.4",
83-
build_file = "//third_party/pybind11:BUILD.bzl",
8482
)
8583

8684
http_archive(
@@ -99,27 +97,31 @@ load("//tensorflow_text:tftext.bzl", "py_deps_profile")
9997

10098
py_deps_profile(
10199
name = "release_or_nightly",
102-
requirements_in = "//oss_scripts/pip_package:requirements.in",
103-
pip_repo_name = "pypi",
104100
deps_map = {
105-
"tensorflow": ["tf-nightly", "tf_header_lib", "libtensorflow_framework"],
106-
"tf-keras": ["tf-keras-nightly"]
101+
"tensorflow": [
102+
"tf-nightly",
103+
"tf_header_lib",
104+
"libtensorflow_framework",
105+
],
106+
"tf-keras": ["tf-keras-nightly"],
107107
},
108+
pip_repo_name = "pypi",
109+
requirements_in = "//oss_scripts/pip_package:requirements.in",
108110
switch = {
109-
"IS_NIGHTLY": "nightly"
110-
}
111+
"IS_NIGHTLY": "nightly",
112+
},
111113
)
112114

113115
load("@org_tensorflow//third_party/py:python_init_repositories.bzl", "python_init_repositories")
114116

115117
python_init_repositories(
118+
default_python_version = "system",
116119
requirements = {
117120
"3.9": "//oss_scripts/pip_package:requirements_lock_3_9.txt",
118121
"3.10": "//oss_scripts/pip_package:requirements_lock_3_10.txt",
119122
"3.11": "//oss_scripts/pip_package:requirements_lock_3_11.txt",
120123
"3.12": "//oss_scripts/pip_package:requirements_lock_3_12.txt",
121124
},
122-
default_python_version = "system",
123125
)
124126

125127
load("@org_tensorflow//third_party/py:python_init_toolchains.bzl", "python_init_toolchains")
@@ -136,18 +138,28 @@ install_deps()
136138

137139
# Initialize TensorFlow dependencies.
138140
load("@org_tensorflow//tensorflow:workspace3.bzl", "tf_workspace3")
141+
139142
tf_workspace3()
143+
140144
load("@org_tensorflow//tensorflow:workspace2.bzl", "tf_workspace2")
145+
141146
tf_workspace2()
147+
142148
load("@org_tensorflow//tensorflow:workspace1.bzl", "tf_workspace1")
149+
143150
tf_workspace1()
151+
144152
load("@org_tensorflow//tensorflow:workspace0.bzl", "tf_workspace0")
153+
145154
tf_workspace0()
146155

147156
# Set up Android.
148157
load("@org_tensorflow//third_party/android:android_configure.bzl", "android_configure")
149-
android_configure(name="local_config_android")
158+
159+
android_configure(name = "local_config_android")
160+
150161
load("@local_config_android//:android.bzl", "android_workspace")
162+
151163
android_workspace()
152164

153165
load(

oss_scripts/pip_package/requirements.in

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ setuptools==70.0.0
22
dm-tree==0.1.8 # Limit for macos support.
33
numpy
44
protobuf==4.25.3 # b/397977335 - Fix crash on python 3.9, 3.10.
5-
tensorflow
5+
tensorflow==2.20.0
66
tf-keras
77
tensorflow-datasets
8-
tensorflow-metadata
8+
tensorflow-metadata==1.17.2

oss_scripts/pip_package/setup.py

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@
4646
from setuptools.dist import Distribution
4747

4848
project_name = 'tensorflow-text'
49-
project_version = '2.18.0'
49+
project_version = '2.20.0'
5050

5151

5252
class BinaryDistribution(Distribution):
@@ -87,13 +87,11 @@ def finalize_options(self):
8787
cmdclass={'install': InstallPlatlib},
8888
distclass=BinaryDistribution,
8989
install_requires=[
90-
(
91-
'tensorflow>=2.18.0, <2.19',
92-
),
90+
'tensorflow>=2.20.0',
9391
],
9492
extras_require={
9593
'tensorflow_cpu': [
96-
'tensorflow-cpu>=2.18.0, <2.19',
94+
'tensorflow-cpu>=2.20.0',
9795
],
9896
'tests': [
9997
'absl-py',

0 commit comments

Comments
 (0)