Skip to content

Commit

Permalink
Update Lingvo wheel for TF1.13 compat, rebuild and submit a 0.13.1 wh…
Browse files Browse the repository at this point in the history
…eel to PyPI.

PiperOrigin-RevId: 560804538
  • Loading branch information
Josh Lipschultz authored and copybara-github committed Aug 28, 2023
1 parent 09c7f07 commit 74ac32f
Show file tree
Hide file tree
Showing 17 changed files with 179 additions and 94 deletions.
5 changes: 2 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,8 @@ load("//lingvo:repo.bzl", "cc_tf_configure", "icu", "lingvo_protoc_deps", "lingv

http_archive(
name = "org_tensorflow",
strip_prefix = "tensorflow-2.10.0",
sha256 = "d79a95ede8305f14a10dd0409a1e5a228849039c19ccfb90dfe8367295fd04e0",
urls = ["https://github.com/tensorflow/tensorflow/archive/v2.10.0.zip"],
strip_prefix = "tensorflow-2.13.0",
urls = ["https://github.com/tensorflow/tensorflow/archive/v2.13.0.zip"],
)

# This import (along with the org_tensorflow archive) is necessary to provide the devtoolset-9 toolchain
Expand Down
4 changes: 2 additions & 2 deletions docker/dev.Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -13,15 +13,15 @@
#
# bazel test -c opt --test_output=streamed //lingvo:trainer_test //lingvo:models_test

ARG cpu_base_image="tensorflow/build:2.9-python3.9"
ARG cpu_base_image="tensorflow/build:2.13-python3.9"
ARG base_image=$cpu_base_image
FROM $base_image

LABEL maintainer="Lingvo team <[email protected]>"

# Re-declare args because the args declared before FROM can't be used in any
# instruction after a FROM.
ARG cpu_base_image="tensorflow/build:2.9-python3.9"
ARG cpu_base_image="tensorflow/build:2.13-python3.9"
ARG base_image=$cpu_base_image

COPY docker /docker
Expand Down
161 changes: 108 additions & 53 deletions docker/dev.requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -25,76 +25,100 @@
# - We used to include waymo-open-dataset-tf-2-6-0; this was removed because it
# is incompatible with the working set we have here.
absl-py==1.4.0
alabaster==0.7.13
anyio==3.7.1
argon2-cffi==21.3.0
apache-beam==2.49.0
argon2-cffi==23.1.0
argon2-cffi-bindings==21.2.0
array-record==0.4.0
array-record==0.4.1
arrow==1.2.3
asttokens==2.2.1
astunparse==1.6.3
async-lru==2.0.3
async-lru==2.0.4
attrs==23.1.0
auditwheel==5.4.0
Babel==2.12.1
backcall==0.2.0
backports.lzma==0.0.14
beautifulsoup4==4.12.2
bleach==6.0.0
cachetools==5.3.1
certifi==2023.7.22
cffi==1.15.1
charset-normalizer==3.2.0
click==8.1.6
comm==0.1.3
click==8.1.7
cloudpickle==2.2.1
comm==0.1.4
commonmark==0.9.1
contextlib2==21.6.0
contourpy==1.1.0
cryptography==41.0.2
crcmod==1.7
cryptography==41.0.3
cycler==0.11.0
debugpy==1.6.7
dataclasses==0.6
debugpy==1.6.7.post1
decorator==5.1.1
defusedxml==0.7.1
dill==0.3.7
dill==0.3.1.1
dm-tree==0.1.8
docutils==0.20.1
etils==1.4.0
exceptiongroup==1.1.2
dnspython==2.4.2
docopt==0.6.2
docutils==0.18.1
etils==1.4.1
exceptiongroup==1.1.3
executing==1.2.0
fastavro==1.8.2
fasteners==0.18
fastjsonschema==2.18.0
flatbuffers==1.12
fonttools==4.41.1
flatbuffers==23.5.26
fonttools==4.42.1
fqdn==1.5.1
freezegun==1.2.2
gast==0.4.0
google-api-core==2.11.1
google-api-python-client==2.97.0
google-auth==2.22.0
google-auth-oauthlib==0.4.6
google-auth-httplib2==0.1.0
google-auth-oauthlib==1.0.0
google-pasta==0.2.0
googleapis-common-protos==1.59.1
googleapis-common-protos==1.60.0
graph-compression-google-research==0.0.4
grpcio==1.56.2
grpcio==1.57.0
h5py==3.9.0
hdfs==2.7.2
httplib2==0.22.0
idna==3.4
imagesize==1.4.1
importlib-metadata==6.8.0
importlib-resources==6.0.0
ipykernel==6.25.0
importlib-resources==6.0.1
ipykernel==6.25.1
ipython==8.14.0
ipython-genutils==0.2.0
ipywidgets==8.1.0
isoduration==20.11.0
jaraco.classes==3.3.0
jedi==0.18.2
jedi==0.19.0
jeepney==0.8.0
Jinja2==3.1.2
joblib==1.3.2
json5==0.9.14
jsonpointer==2.4
jsonschema==4.18.4
jsonschema==4.19.0
jsonschema-specifications==2023.7.1
jupyter-events==0.6.3
jupyter==1.0.0
jupyter-console==6.6.3
jupyter-events==0.7.0
jupyter-http-over-ws==0.0.8
jupyter-lsp==2.2.0
jupyter_client==8.3.0
jupyter_core==5.3.1
jupyter_server==2.7.0
jupyter_server==2.7.2
jupyter_server_terminals==0.4.4
jupyterlab==4.0.3
jupyterlab==4.0.5
jupyterlab-pygments==0.2.2
jupyterlab-widgets==3.0.8
jupyterlab_server==2.24.0
keras==2.9.0
Keras-Preprocessing==1.1.2
keras==2.13.1
keyring==24.2.0
kiwisolver==1.4.4
libclang==16.0.6
Expand All @@ -107,88 +131,119 @@ mdurl==0.1.2
mistune==3.0.1
mock==5.1.0
model-pruning-google-research==0.0.5
more-itertools==10.0.0
more-itertools==10.1.0
mpmath==1.3.0
nbclient==0.8.0
nbconvert==7.7.3
nbformat==5.9.1
nest-asyncio==1.5.6
nbconvert==7.7.4
nbformat==5.9.2
nest-asyncio==1.5.7
notebook==7.0.2
notebook_shim==0.2.3
numpy==1.25.1
numpy==1.24.3
oauth2client==4.1.3
oauthlib==3.2.2
objsize==0.6.1
opt-einsum==3.3.0
overrides==7.3.1
orjson==3.9.5
overrides==7.4.0
packaging==23.1
pandas==2.0.3
pandocfilters==1.5.0
parso==0.8.3
patchelf==0.17.2.1
pexpect==4.8.0
pickleshare==0.7.5
Pillow==10.0.0
pkginfo==1.9.6
platformdirs==3.9.1
platformdirs==3.10.0
prometheus-client==0.17.1
promise==2.3
prompt-toolkit==3.0.39
protobuf==3.19.6
proto-plus==1.22.3
protobuf==3.20.3
psutil==5.9.5
ptyprocess==0.7.0
pure-eval==0.2.2
pyarrow==11.0.0
pyasn1==0.5.0
pyasn1-modules==0.3.0
pycparser==2.21
pydot==1.4.2
pyelftools==0.29
Pygments==2.15.1
Pygments==2.16.1
pymongo==4.4.1
pyparsing==3.0.9
python-dateutil==2.8.2
python-json-logger==2.0.7
pytz==2023.3
PyYAML==6.0.1
pyzmq==25.1.0
readme-renderer==40.0
referencing==0.30.0
pyzmq==25.1.1
qtconsole==5.4.3
QtPy==2.3.1
readme-renderer==41.0
recommonmark==0.7.1
referencing==0.30.2
regex==2023.8.8
requests==2.31.0
requests-oauthlib==1.3.1
requests-toolbelt==1.0.0
rfc3339-validator==0.1.4
rfc3986==2.0.0
rfc3986-validator==0.1.1
rich==13.4.2
rich==13.5.2
rpds-py==0.9.2
rsa==4.9
scipy==1.11.1
scikit-learn==1.3.0
scipy==1.11.2
SecretStorage==3.3.3
Send2Trash==1.8.2
sentencepiece==0.1.99
six==1.16.0
sniffio==1.3.0
snowballstemmer==2.2.0
soupsieve==2.4.1
Sphinx==7.2.2
sphinx-rtd-theme==1.3.0
sphinxcontrib-applehelp==1.0.7
sphinxcontrib-devhelp==1.0.5
sphinxcontrib-htmlhelp==2.0.4
sphinxcontrib-jquery==4.1
sphinxcontrib-jsmath==1.0.1
sphinxcontrib-qthelp==1.0.6
sphinxcontrib-serializinghtml==1.1.9
stack-data==0.6.2
sympy==1.12
tensorboard==2.9.1
tensorboard-data-server==0.6.1
tensorboard-plugin-wit==1.8.1
tensorflow==2.9.3
tensorflow-datasets==4.9.0
tensorflow-estimator==2.9.0
tensorboard==2.13.0
tensorboard-data-server==0.7.1
tensorflow==2.13.0
tensorflow-datasets==4.9.2
tensorflow-estimator==2.13.0
tensorflow-hub==0.14.0
tensorflow-io-gcs-filesystem==0.32.0
tensorflow-metadata==1.13.0
tensorflow-text==2.9.0
tensorflow-io-gcs-filesystem==0.33.0
tensorflow-metadata==1.14.0
tensorflow-probability==0.21.0
tensorflow-text==2.13.0
termcolor==2.3.0
terminado==0.17.1
threadpoolctl==3.2.0
tinycss2==1.2.1
toml==0.10.2
tomli==2.0.1
tornado==6.3.2
tqdm==4.65.0
tornado==6.3.3
tqdm==4.66.1
traitlets==5.9.0
twine==4.0.2
typing_extensions==4.7.1
typing_extensions==4.5.0
tzdata==2023.3
uri-template==1.3.0
uritemplate==4.1.1
urllib3==1.26.16
wcwidth==0.2.6
webcolors==1.13
webencodings==0.5.1
websocket-client==1.6.1
Werkzeug==2.3.6
Werkzeug==2.3.7
widgetsnbextension==4.0.8
wrapt==1.15.0
zipp==3.16.2
zipp==3.16.2
zstandard==0.21.0
2 changes: 2 additions & 0 deletions lingvo/core/BUILD
Original file line number Diff line number Diff line change
Expand Up @@ -327,6 +327,7 @@ py_test(

py_test(
name = "batch_major_attention_test",
timeout = "long",
srcs = ["batch_major_attention_test.py"],
shard_count = 4,
deps = [
Expand Down Expand Up @@ -1632,6 +1633,7 @@ py_test(

py_test(
name = "generic_input_tf2_test",
timeout = "long",
srcs = ["generic_input_tf2_test.py"],
deps = [
":generic_input",
Expand Down
2 changes: 1 addition & 1 deletion lingvo/lingvo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

def tf_copts():
# TODO(drpng): autoconf this.
return ["-D_GLIBCXX_USE_CXX11_ABI=1", "-std=c++14", "-Wno-sign-compare", "-mavx"] + select({
return ["-std=c++17", "-Wno-sign-compare", "-mavx"] + select({
"//lingvo:cuda": ["-DGOOGLE_CUDA=1"],
"//conditions:default": [],
})
Expand Down
6 changes: 2 additions & 4 deletions lingvo/repo.bzl
Original file line number Diff line number Diff line change
Expand Up @@ -189,7 +189,6 @@ cc_library(
"googletest/src/gtest-all.cc",
"googlemock/src/gmock-all.cc",
],
copts = ["-D_GLIBCXX_USE_CXX11_ABI=1"],
hdrs = glob([
"**/*.h",
"googletest/src/*.cc",
Expand All @@ -207,7 +206,6 @@ cc_library(
cc_library(
name = "gtest_main",
copts = ["-D_GLIBCXX_USE_CXX11_ABI=1"],
srcs = ["googlemock/src/gmock_main.cc"],
linkopts = ["-pthread"],
visibility = ["//visibility:public"],
Expand All @@ -232,9 +230,9 @@ filegroup(
)
""",
urls = [
"https://github.com/protocolbuffers/protobuf/releases/download/v3.9.2/protoc-3.9.2-linux-x86_64.zip",
"https://github.com/protocolbuffers/protobuf/releases/download/v21.9/protoc-21.9-linux-x86_64.zip",
],
sha256 = "0d9034a3b02bd77edf5ef926fb514819a0007f84252c5e6a6391ddfc4189b904",
sha256 = "3cd951aff8ce713b94cde55e12378f505f2b89d47bf080508cf77e3934f680b6",
)

def icu():
Expand Down
2 changes: 1 addition & 1 deletion lingvo/tasks/car/calibration_processing.py
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ def Summary(self, name):
def _CalibrationSetter(fig, axes):
"""Configure the plot for calibration."""
ticks = np.arange(0, 1.05, 0.1)
axes.grid(b=False)
axes.grid(False)
axes.set_xlabel('Predicted accuracy')
axes.set_xticks(ticks)
axes.set_ylabel('Empirical accuracy')
Expand Down
Loading

0 comments on commit 74ac32f

Please sign in to comment.