Skip to content

Commit 52427df

Browse files
seanpmorganbhackfsx950223
authored
Build against 2.14.0 (#2850)
* Build against 2.14.0 --------- Co-authored-by: bhack <[email protected]> Co-authored-by: fsx950223 <[email protected]>
1 parent 664ac01 commit 52427df

17 files changed

+40
-47
lines changed

.bazeliskrc

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
USE_BAZEL_VERSION=5.3.0
1+
USE_BAZEL_VERSION=6.1.0

.github/workflows/make_wheel_Linux_x86.sh

+5-1
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,12 @@ set -e -x
22

33
df -h
44
docker info
5+
56
# to get more disk space
6-
rm -rf /usr/share/dotnet &
7+
rm -rf "$AGENT_TOOLSDIRECTORY" &
8+
rm -rf /opt/ghc &
9+
rm -rf "/usr/local/share/boost" &
10+
rm -rf /usr/share/dotnet
711

812
# Tests are ran as part of make_wheel target
913
DOCKER_BUILDKIT=1 docker build \

.github/workflows/release.yml

+13-23
Original file line numberDiff line numberDiff line change
@@ -44,25 +44,21 @@ jobs:
4444
# To switch on windows-2022/latest, please verify the bazel version:
4545
# https://github.com/bazelbuild/bazel/issues/14232#issuecomment-1011247429
4646
os: ['macos-12', 'windows-2019', 'ubuntu-20.04']
47-
py-version: ['3.8', '3.9', '3.10', '3.11']
48-
tf-version: ['2.11.1', '2.12.0', '2.13.0']
47+
py-version: ['3.9', '3.10', '3.11']
48+
tf-version: ['2.12.1', '2.13.0', '2.14.0']
4949
cpu: ['x86']
5050
include:
5151
- os: 'macos-12'
5252
cpu: 'arm64'
53-
tf-version: '2.13.0'
54-
py-version: '3.8'
55-
- os: 'macos-12'
56-
cpu: 'arm64'
57-
tf-version: '2.13.0'
53+
tf-version: '2.14.0'
5854
py-version: '3.9'
5955
- os: 'macos-12'
6056
cpu: 'arm64'
61-
tf-version: '2.13.0'
57+
tf-version: '2.14.0'
6258
py-version: '3.10'
6359
- os: 'macos-12'
6460
cpu: 'arm64'
65-
tf-version: '2.13.0'
61+
tf-version: '2.14.0'
6662
py-version: '3.11'
6763
fail-fast: false
6864
steps:
@@ -73,7 +69,7 @@ jobs:
7369
script: |
7470
const commit_details = await github.git.getCommit({owner: context.repo.owner, repo: context.repo.repo, commit_sha: context.sha});
7571
return commit_details.data.author.date
76-
- if: matrix.tf-version != '2.13.0'
72+
- if: matrix.tf-version != '2.14.0'
7773
shell: bash
7874
run: echo "SKIP_CUSTOM_OP_TESTS=--skip-custom-ops" >> $GITHUB_ENV
7975
- if: github.event_name == 'push'
@@ -87,8 +83,7 @@ jobs:
8783
name: Setup Bazel
8884
# Ubuntu bazel is run inside of the docker image
8985
run: bash tools/install_deps/install_bazelisk.sh ./
90-
- if: matrix.py-version != '3.11' || matrix.tf-version == '2.12.0' || matrix.tf-version == '2.13.0'
91-
name: Build wheels
86+
- name: Build wheels
9287
env:
9388
OS: ${{ runner.os }}
9489
PY_VERSION: ${{ matrix.py-version }}
@@ -97,8 +92,7 @@ jobs:
9792
CPU: ${{ matrix.cpu }}
9893
shell: bash
9994
run: bash .github/workflows/make_wheel_${OS}_${CPU}.sh
100-
- if: matrix.py-version != '3.11' || matrix.tf-version == '2.12.0' || matrix.tf-version == '2.13.0'
101-
uses: actions/upload-artifact@v1
95+
- uses: actions/upload-artifact@v1
10296
with:
10397
name: ${{ runner.os }}-${{ matrix.py-version }}-tf${{ matrix.tf-version }}-${{ matrix.cpu }}-wheel
10498
path: wheelhouse
@@ -109,25 +103,21 @@ jobs:
109103
strategy:
110104
matrix:
111105
os: ['macOS', 'Windows', 'Linux']
112-
py-version: ['3.8', '3.9', '3.10', '3.11']
113-
tf-version: ['2.13.0']
106+
py-version: ['3.9', '3.10', '3.11']
107+
tf-version: ['2.14.0']
114108
cpu: ['x86']
115109
include:
116110
- os: 'macOS'
117111
cpu: 'arm64'
118-
tf-version: '2.13.0'
119-
py-version: '3.8'
120-
- os: 'macOS'
121-
cpu: 'arm64'
122-
tf-version: '2.13.0'
112+
tf-version: '2.14.0'
123113
py-version: '3.9'
124114
- os: 'macOS'
125115
cpu: 'arm64'
126-
tf-version: '2.13.0'
116+
tf-version: '2.14.0'
127117
py-version: '3.10'
128118
- os: 'macOS'
129119
cpu: 'arm64'
130-
tf-version: '2.13.0'
120+
tf-version: '2.14.0'
131121
py-version: '3.11'
132122
fail-fast: false
133123
if: (github.event_name == 'push' && github.ref == 'refs/heads/master') || github.event_name == 'release'

CONTRIBUTING.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -173,8 +173,8 @@ conda activate my_dev_environement
173173
Just run from the root:
174174

175175
```bash
176-
pip install tensorflow==2.13.0
177-
# you can use "pip install tensorflow-cpu==2.13.0" too if you're not testing on gpu.
176+
pip install tensorflow==2.14.0
177+
# you can use "pip install tensorflow-cpu==2.14.0" too if you're not testing on gpu.
178178
pip install -e ./
179179
```
180180

@@ -262,7 +262,7 @@ If you need a custom C++/Cuda op for your test, compile your ops with
262262

263263
```bash
264264
python configure.py
265-
pip install tensorflow==2.13.0 -e ./ -r tools/install_deps/pytest.txt
265+
pip install tensorflow==2.14.0 -e ./ -r tools/install_deps/pytest.txt
266266
bash tools/install_so_files.sh # Linux/macos/WSL2
267267
sh tools/install_so_files.sh # PowerShell
268268
```
@@ -290,7 +290,7 @@ docker run --gpus all --rm -it -v ${PWD}:/addons -w /addons gcr.io/tensorflow-te
290290

291291
Configure:
292292
```bash
293-
python3 -m pip install tensorflow==2.13.0
293+
python3 -m pip install tensorflow==2.14.0
294294
python3 ./configure.py # Links project with TensorFlow dependency
295295
```
296296

@@ -329,7 +329,7 @@ quickly, as Bazel has great support for caching and distributed testing.
329329
To test with Bazel:
330330

331331
```bash
332-
python3 -m pip install tensorflow==2.13.0
332+
python3 -m pip install tensorflow==2.14.0
333333
python3 configure.py
334334
python3 -m pip install -r tools/install_deps/pytest.txt
335335
bazel test -c opt -k \

requirements.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,2 @@
11
typeguard>=2.7,<3.0.0
2-
packaging
2+
packaging

setup.py

-1
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,6 @@ def has_ext_modules(self):
115115
"Intended Audience :: Science/Research",
116116
"License :: OSI Approved :: Apache Software License",
117117
"Programming Language :: Python :: 3",
118-
"Programming Language :: Python :: 3.8",
119118
"Programming Language :: Python :: 3.9",
120119
"Programming Language :: Python :: 3.10",
121120
"Programming Language :: Python :: 3.11",

tensorflow_addons/activations/gelu.py

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,11 +51,11 @@ def gelu(x: TensorLike, approximate: bool = True) -> tf.Tensor:
5151
5252
Usage:
5353
54-
>>> x = tf.constant([-1.0, 0.0, 1.0])
54+
>>> x = tf.constant([0.0, 0.0, 1.0])
5555
>>> tfa.activations.gelu(x, approximate=False)
56-
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([-0.15865529, 0. , 0.8413447 ], dtype=float32)>
56+
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([0. , 0. , 0.8413447], dtype=float32)>
5757
>>> tfa.activations.gelu(x, approximate=True)
58-
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([-0.15880796, 0. , 0.841192 ], dtype=float32)>
58+
<tf.Tensor: shape=(3,), dtype=float32, numpy=array([0. , 0. , 0.841192], dtype=float32)>
5959
6060
Args:
6161
x: A `Tensor`. Must be one of the following types:

tensorflow_addons/metrics/tests/streaming_correlations_test.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -123,7 +123,7 @@ def test_keras_binary_classification_model(self, correlation_type):
123123
metric.reset_state()
124124
# we decorate with tf.function to ensure the metric is also checked against graph mode.
125125
# keras automatically decorates the metrics compiled within keras.Model.
126-
tf.function(metric.update_state)(y, preds)
126+
metric.update_state(y, preds)
127127
metric_value = tf.function(metric.result)()
128128
scipy_value = self.scipy_corr[correlation_type](preds[:, 0], y[:, 0])[0]
129129
np.testing.assert_almost_equal(metric_value, metric_history[-1], decimal=6)

tensorflow_addons/utils/resource_loader.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -20,8 +20,8 @@
2020

2121
import tensorflow as tf
2222

23-
INCLUSIVE_MIN_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.13.0"
24-
EXCLUSIVE_MAX_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.14.0"
23+
INCLUSIVE_MIN_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.14.0"
24+
EXCLUSIVE_MAX_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.15.0"
2525
abi_warning_already_raised = False
2626
SKIP_CUSTOM_OPS = False
2727

tensorflow_addons/version.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"""Define TensorFlow Addons version information."""
1616

1717
# Required TensorFlow version [min, max)
18-
INCLUSIVE_MIN_TF_VERSION = "2.11.0"
19-
EXCLUSIVE_MAX_TF_VERSION = "2.14.0"
18+
INCLUSIVE_MIN_TF_VERSION = "2.12.0"
19+
EXCLUSIVE_MAX_TF_VERSION = "2.15.0"
2020

2121
# We follow Semantic Versioning (https://semver.org/)
2222
_MAJOR_VERSION = "0"

tools/build_dev_container.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ set -x -e
44

55
docker build \
66
-f tools/docker/dev_container.Dockerfile \
7-
--build-arg TF_VERSION=2.13.0 \
7+
--build-arg TF_VERSION=2.14.0 \
88
--build-arg TF_PACKAGE=tensorflow \
99
--build-arg PY_VERSION=$PY_VERSION \
1010
--no-cache \

tools/docker/build_wheel.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
#syntax=docker/dockerfile:1.1.5-experimental
22
ARG PY_VERSION
3-
FROM tensorflow/build:2.13-python$PY_VERSION as base_install
3+
FROM tensorflow/build:2.14-python$PY_VERSION as base_install
44

55
ENV TF_NEED_CUDA="1"
66
ARG PY_VERSION

tools/docker/cpu_tests.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
#syntax=docker/dockerfile:1.1.5-experimental
22
FROM python:3.9 as build_wheel
33

4-
ARG TF_VERSION=2.13.0
4+
ARG TF_VERSION=2.14.0
55
RUN pip install --default-timeout=1000 tensorflow-cpu==$TF_VERSION
66

77
RUN apt-get update && apt-get install -y sudo rsync

tools/install_deps/install_bazelisk.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ case "$(uname -s)" in
1010
esac
1111

1212
mkdir -p "${output_dir}"
13-
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.3.0/${name}"
13+
curl -LO "https://github.com/bazelbuild/bazelisk/releases/download/v1.18.0/${name}"
1414

1515
mv "${name}" "${output_dir}/bazel"
1616
chmod u+x "${output_dir}/bazel"

tools/install_deps/tensorflow-cpu.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tensorflow-cpu~=2.13.0
1+
tensorflow-cpu~=2.14.0

tools/install_deps/tensorflow.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tensorflow~=2.13.0
1+
tensorflow~=2.14.0

tools/run_gpu_tests.sh

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ export DOCKER_BUILDKIT=1
66
docker build \
77
-f tools/docker/build_wheel.Dockerfile \
88
--target tfa_gpu_tests \
9-
--build-arg TF_VERSION=2.13.0 \
9+
--build-arg TF_VERSION=2.14.0 \
1010
--build-arg PY_VERSION=3.9 \
1111
-t tfa_gpu_tests ./
1212
docker run --rm -t --gpus=all --shm-size=512m tfa_gpu_tests

0 commit comments

Comments
 (0)