Skip to content

Commit b7747c8

Browse files
rstzcopybara-github
authored andcommitted
Release TF-DF 1.0.0rc0 and YDF 1.0.0rc0
PiperOrigin-RevId: 470234504
1 parent e390bcf commit b7747c8

File tree

6 files changed

+44
-23
lines changed

6 files changed

+44
-23
lines changed

CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## 1.0.0rc0 - 2022-08-25
4+
5+
### Fix
6+
7+
- Improved documentation
8+
39
## 0.2.7 - 2022-06-15
410

511
### Features

WORKSPACE

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
1111
# absl used by tensorflow.
1212
http_archive(
1313
name = "org_tensorflow",
14-
strip_prefix = "tensorflow-2.9.1",
15-
sha256 = "9f2dac244e5af6c6a13a7dad6481e390174ac989931942098e7a4373f1bccfc2",
16-
urls = ["https://github.com/tensorflow/tensorflow/archive/v2.9.1.zip"],
14+
strip_prefix = "tensorflow-2.10.0-rc2",
15+
sha256 = "65b9fccf9ee88f18b70594754a0710340af1b3ddec8aedb67453f3f24bea3cb1",
16+
urls = ["https://github.com/tensorflow/tensorflow/archive/v2.10.0-rc2.zip"],
1717
# patch_args = ["-p1"],
1818
# patches = [ "//third_party/tensorflow:tf_dependencies.patch" ],
1919
)

configure/setup.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,15 +20,15 @@
2020
from setuptools.command.install import install
2121
from setuptools.dist import Distribution
2222

23-
_VERSION = "0.2.7"
23+
_VERSION = "1.0.0rc0"
2424

2525
with open("README.md", "r", encoding="utf-8") as fh:
2626
long_description = fh.read()
2727

2828
REQUIRED_PACKAGES = [
2929
"numpy",
3030
"pandas",
31-
"tensorflow~=2.9.1",
31+
"tensorflow~=2.10.0rc2",
3232
"six",
3333
"absl_py",
3434
"wheel",

tensorflow_decision_forests/__init__.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,10 +51,10 @@
5151
5252
"""
5353

54-
__version__ = "0.2.7"
54+
__version__ = "1.0.0rc0"
5555
__author__ = "Mathieu Guillame-Bert"
5656

57-
compatible_tf_versions = ["2.9.1"]
57+
compatible_tf_versions = ["2.10.0rc2"]
5858

5959
from tensorflow_decision_forests.tensorflow import check_version
6060

tools/build_pip_package.sh

Lines changed: 30 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
# Note: "libtensorflow_framework.so.2" need to be added to the allowlisted
3636
# files (for example, in "policy.json" in "/home/${USER}/.local/lib/
3737
# python3.9/site-packages/auditwheel/policy/policy.json").
38-
# This change is done automatically (see "patch_auditwell" function). If
38+
# This change is done automatically (see "patch_auditwheel" function). If
3939
# the automatic patch does not work, it has to be done manually by adding
4040
# "libtensorflow_framework.so.2" next to each "libresolv.so.2" entries
4141
# See https://github.com/tensorflow/tensorflow/issues/31807
@@ -58,25 +58,25 @@ fi
5858
# Temporary directory used to assemble the package.
5959
SRCPK="$(pwd)/tmp_package"
6060

61-
function patch_auditwell() {
61+
function patch_auditwheel() {
6262
PYTHON="$1"
6363
shift
6464
# Patch auditwheel for TensorFlow
65-
AUDITWHELL_DIR="$(${PYTHON} -m pip show auditwheel | grep "Location:")"
66-
AUDITWHELL_DIR="${AUDITWHELL_DIR:10}/auditwheel"
67-
echo "Auditwell location: ${AUDITWHELL_DIR}"
68-
POLICY_PATH="${AUDITWHELL_DIR}/policy/manylinux-policy.json"
65+
AUDITWHEEL_DIR="$(${PYTHON} -m pip show auditwheel | grep "Location:")"
66+
AUDITWHEEL_DIR="${AUDITWHEEL_DIR:10}/auditwheel"
67+
echo "Auditweel location: ${AUDITWHEEL_DIR}"
68+
POLICY_PATH="${AUDITWHEEL_DIR}/policy/manylinux-policy.json"
6969
TF_DYNAMIC_FILENAME="libtensorflow_framework.so.2"
7070
if ! grep -q "${TF_DYNAMIC_FILENAME}" "${POLICY_PATH}"; then
71-
echo "Patching Auditwhell"
71+
echo "Patching Auditwheel"
7272
cp "${POLICY_PATH}" "${POLICY_PATH}.orig"
7373
if is_macos; then
7474
sed -i '' "s/\"libresolv.so.2\"/\"libresolv.so.2\",\"${TF_DYNAMIC_FILENAME}\"/g" "${POLICY_PATH}"
7575
else
7676
sed -i "s/\"libresolv.so.2\"/\"libresolv.so.2\",\"${TF_DYNAMIC_FILENAME}\"/g" "${POLICY_PATH}"
7777
fi
7878
else
79-
echo "Auditwhell already patched"
79+
echo "Auditwheel already patched"
8080
fi
8181
}
8282

@@ -186,7 +186,7 @@ function e2e_native() {
186186
PACKAGE=$(python_to_package_version ${PYTHON})
187187

188188
install_dependencies ${PYTHON}
189-
patch_auditwell ${PYTHON}
189+
patch_auditwheel ${PYTHON}
190190
build_package ${PYTHON}
191191
test_package ${PYTHON} ${PACKAGE}
192192

@@ -196,6 +196,11 @@ function e2e_native() {
196196
else
197197
PACKAGEPATH="dist/tensorflow_decision_forests-*-cp${PACKAGE}-cp${PACKAGE}*-linux_x86_64.whl"
198198
fi
199+
TF_LFLAGS="$(${PYTHON} -c 'import tensorflow as tf; print(tf.sysconfig.get_link_flags()[0])')"
200+
SHARED_LIBRARY_DIR=${TF_LFLAGS:2}
201+
echo "Old LD_LIBRARY_PATH was ${LD_LIBRARY_PATH}"
202+
export LD_LIBRARY_PATH=$LD_LIBRARY_PATH:$SHARED_LIBRARY_DIR
203+
echo "New LD_LIBRARY_PATH is ${LD_LIBRARY_PATH}"
199204
auditwheel repair --plat manylinux2014_x86_64 -w dist ${PACKAGEPATH}
200205
}
201206

@@ -225,10 +230,20 @@ shift | true
225230

226231
if [ ${INSTALL_PYENV} == "INSTALL_PYENV" ]; then
227232
if ! [ -x "$(command -v pyenv)" ]; then
228-
echo 'Pyenv is not installed. Installing Pyenv'
229-
git clone --branch v1.2.23 https://github.com/pyenv/pyenv.git
233+
echo "Pyenv not found."
234+
echo "Installing build deps, pyenv 2.3.0 and pyenv virtualenv 1.1.5"
235+
apt-get update
236+
apt-get install -qq make build-essential libssl-dev zlib1g-dev \
237+
libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm \
238+
libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev \
239+
libffi-dev liblzma-dev
240+
git clone --branch v2.3.0 https://github.com/pyenv/pyenv.git
230241
PYENV_ROOT="$(pwd)/pyenv"
231242
export PATH="$PYENV_ROOT/bin:$PATH"
243+
eval "$(pyenv init -)"
244+
git clone --branch v1.1.5 https://github.com/pyenv/pyenv-virtualenv.git $(pyenv root)/plugins/pyenv-virtualenv
245+
eval "$(pyenv virtualenv-init -)"
246+
source ~/.profile
232247
fi
233248
fi
234249

@@ -242,16 +257,16 @@ elif [ ${ARG} == "ALL_VERSIONS" ]; then
242257
# Compile with all the version of python using pyenv.
243258
assemble_files
244259
eval "$(pyenv init -)"
245-
e2e_pyenv 3.9.13
260+
e2e_pyenv 3.9.12
246261
e2e_pyenv 3.8.13
247262
e2e_pyenv 3.7.13
248-
e2e_pyenv 3.10.6
263+
e2e_pyenv 3.10.4
249264
elif [ ${ARG} == "ALL_VERSIONS_ALREADY_ASSEMBLED" ]; then
250265
eval "$(pyenv init -)"
251-
e2e_pyenv 3.9.13
266+
e2e_pyenv 3.9.12
252267
e2e_pyenv 3.8.13
253268
e2e_pyenv 3.7.13
254-
e2e_pyenv 3.10.6
269+
e2e_pyenv 3.10.4
255270
else
256271
# Compile with a specific version of python provided in the call arguments.
257272
assemble_files

tools/start_compile_docker.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@
5959
# ./tools/build_pip_package.sh ALL_VERSIONS_ALREADY_ASSEMBLED
6060
#
6161
# https://hub.docker.com/r/tensorflow/build/tags?page=1
62-
DOCKER=tensorflow/build:2.9-python3.8
62+
DOCKER=tensorflow/build:2.10-python3.8
6363

6464
# Current directory
6565
# Useful if Yggdrasil Decision Forests is available locally in a neighbor

0 commit comments

Comments
 (0)