Skip to content

Commit

Permalink
Release TF-DF 1.5.0
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 545921797
  • Loading branch information
rstz authored and copybara-github committed Jul 6, 2023
1 parent 46863f3 commit 2d7a632
Show file tree
Hide file tree
Showing 7 changed files with 28 additions and 12 deletions.
6 changes: 6 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,12 @@

## HEAD

## 1.5.0 - 2023-07-06

### Features

- Compatibility with Tensorflow 2.13.0

## 1.4.0 - 2023-07-03

### Features
Expand Down
6 changes: 3 additions & 3 deletions WORKSPACE
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ load("@bazel_tools//tools/build_defs/repo:http.bzl", "http_archive")
# absl used by tensorflow.
http_archive(
name = "org_tensorflow",
strip_prefix = "tensorflow-2.12.0",
sha256 = "f67d5fdc15c38a50eb95d8788125ed7758e946b6c7313c188fe1d2fc9a9dfa1e",
urls = ["https://github.com/tensorflow/tensorflow/archive/v2.12.0.zip"],
strip_prefix = "tensorflow-2.13.0",
sha256 = "447cdb65c80c86d6c6cf1388684f157612392723eaea832e6392d219098b49de",
urls = ["https://github.com/tensorflow/tensorflow/archive/v2.13.0.zip"],
)

# Inject tensorflow dependencies.
Expand Down
5 changes: 3 additions & 2 deletions configure/setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,15 +21,15 @@
from setuptools.command.install import install
from setuptools.dist import Distribution

_VERSION = "1.4.0"
_VERSION = "1.5.0"

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

REQUIRED_PACKAGES = [
"numpy",
"pandas",
"tensorflow~=2.12.0",
"tensorflow~=2.13.0",
"six",
"absl_py",
"wheel",
Expand Down Expand Up @@ -100,6 +100,7 @@ def get_tag(self):
"Programming Language :: Python :: 3.8",
"Programming Language :: Python :: 3.9",
"Programming Language :: Python :: 3.10",
"Programming Language :: Python :: 3.11",
"Programming Language :: Python :: 3 :: Only",
"Topic :: Scientific/Engineering",
"Topic :: Scientific/Engineering :: Mathematics",
Expand Down
1 change: 1 addition & 0 deletions documentation/known_issues.md
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ The following table shows the compatibility between

tensorflow_decision_forests | tensorflow
--------------------------- | ---------------
1.5.0 | 2.13.0
1.3.0 - 1.4.0 | 2.12.0
1.1.0 - 1.2.0 | 2.11.0
1.0.0 - 1.0.1 | 2.10.0 - 2.10.1
Expand Down
4 changes: 2 additions & 2 deletions tensorflow_decision_forests/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -51,10 +51,10 @@
"""

__version__ = "1.4.0"
__version__ = "1.5.0"
__author__ = "Mathieu Guillame-Bert"

compatible_tf_versions = ["2.12.0"]
compatible_tf_versions = ["2.13.0"]
__git_version__ = "HEAD" # Modify for release build.

from tensorflow_decision_forests.tensorflow import check_version
Expand Down
2 changes: 1 addition & 1 deletion tools/start_compile_docker.sh
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@
# ./tools/build_pip_package.sh ALL_VERSIONS_ALREADY_ASSEMBLED
#
# https://hub.docker.com/r/tensorflow/build/tags?page=1
DOCKER=tensorflow/build:2.12-python3.8
DOCKER=tensorflow/build:2.13-python3.8

# Current directory
# Useful if Yggdrasil Decision Forests is available locally in a neighbor
Expand Down
16 changes: 12 additions & 4 deletions tools/test_bazel.sh
Original file line number Diff line number Diff line change
Expand Up @@ -25,15 +25,16 @@
# and use "mac-intel-crosscompile" to build for Intel CPUs on an Apple Silicon machine.
# Tests will not work when cross-compiling (obviously).
# FULL_COMPILATION: If 1, compile all parts of TF-DF. This may take a long time.
# SHORT_COMMIT_SHA: Commit sha of Tensorfow. If empty, will try to retrieve automatically.
#
# Usage example
#
# RUN_TESTS=1 PY_VERSION=3.8 TF_VERSION=2.12.0 ./tools/test_bazel.sh
# RUN_TESTS=1 PY_VERSION=3.8 TF_VERSION=2.13.0 ./tools/test_bazel.sh

set -vex

# Version of Python
# Needs to be >=python3.7 (3.8 on MacOS systems)
# Needs to be >=python3.8
PYTHON=python${PY_VERSION}

# Install Pip dependencies
Expand All @@ -56,9 +57,16 @@ echo -e "pip installed packages: \n"
pip list

# Get the commit SHA
short_commit_sha=$(${PYTHON} -c 'import tensorflow as tf; print(tf.__git_version__)' | tail -1 | grep -o "\-g[0-9a-f]*" | cut -c 3-)
if [ -z "${SHORT_COMMIT_SHA}" ]; then
SHORT_COMMIT_SHA=$(${PYTHON} -c 'import tensorflow as tf; print(tf.__git_version__)' | tail -1 | grep -o "\-g[0-9a-f]*" | cut -c 3-)
if [ -z "${SHORT_COMMIT_SHA}" ]; then
echo "Could not automatically get commit SHA from Tensorflow. Please manually set variable SHORT_COMMIT_SHA to the right value."
exit 1
fi
fi

# Grep will close the pipe before curl is finished, which creates an error we ignore.
commit_sha=$(curl -SsL https://github.com/tensorflow/tensorflow/commit/${short_commit_sha} 2>/dev/null | grep -m1 -oE $short_commit_sha'[a-f0-9]{10,}')
commit_sha=$(curl -SsL https://github.com/tensorflow/tensorflow/commit/${SHORT_COMMIT_SHA} 2>/dev/null | grep -m1 -oE $SHORT_COMMIT_SHA'[a-f0-9]{10,}')
# Update TF dependency to the chosen version
sed -i'.bak' -e "s/strip_prefix = \"tensorflow-2\.[0-9]\+\.[0-9]\+\(-rc[0-9]\+\)\?\",/strip_prefix = \"tensorflow-${commit_sha}\",/" WORKSPACE
sed -i'.bak' -e "s|\"https://github.com/tensorflow/tensorflow/archive/v.\+\.zip\"|\"https://github.com/tensorflow/tensorflow/archive/${commit_sha}.zip\"|" WORKSPACE
Expand Down

0 comments on commit 2d7a632

Please sign in to comment.