From 80e0383c61a948dfe4df33420f6e4727ca491632 Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Sun, 26 Apr 2020 17:19:28 +0000 Subject: [PATCH 1/7] Drop support for 2.1 --- .github/workflows/release.yml | 12 ++++-------- CONTRIBUTING.md | 6 +++--- tensorflow_addons/utils/ensure_tf_install.py | 2 +- tensorflow_addons/utils/resource_loader.py | 2 +- tools/docker/cpu_tests.Dockerfile | 2 +- tools/install_deps/tensorflow-cpu.txt | 2 +- tools/install_deps/tensorflow.txt | 2 +- tools/run_gpu_tests.sh | 2 +- 8 files changed, 13 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 47cbe9268c..c5b794edee 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -41,7 +41,7 @@ jobs: matrix: os: ['macos-latest', 'windows-latest', 'ubuntu-18.04'] py-version: ['3.5', '3.6', '3.7', '3.8'] - tf-version: ['2.1.0', '2.2.0rc3'] + tf-version: ['2.2.0rc3'] fail-fast: false steps: - uses: actions/github-script@0.3.0 @@ -58,9 +58,7 @@ jobs: with: python-version: ${{ matrix.py-version }} - name: Build wheels - if: | - (matrix.py-version != '3.8' || matrix.tf-version != '2.1.0') - && (github.event_name != 'pull_request' || matrix.py-version == env.MIN_PY_VERSION || matrix.py-version == env.MAX_PY_VERSION) + if: github.event_name != 'pull_request' || matrix.py-version == env.MIN_PY_VERSION || matrix.py-version == env.MAX_PY_VERSION env: OS: ${{ runner.os }} PY_VERSION: ${{ matrix.py-version }} @@ -69,9 +67,7 @@ jobs: shell: bash run: bash .github/workflows/make_wheel_${OS}.sh - uses: actions/upload-artifact@v1 - if: | - (matrix.py-version != '3.8' || matrix.tf-version != '2.1.0') - && (github.event_name != 'pull_request' || matrix.py-version == env.MIN_PY_VERSION || matrix.py-version == env.MAX_PY_VERSION) + if: github.event_name != 'pull_request' || matrix.py-version == env.MIN_PY_VERSION || matrix.py-version == env.MAX_PY_VERSION with: name: ${{ runner.os }}-${{ matrix.py-version }}-tf${{ matrix.tf-version }}-wheel path: wheelhouse @@ -88,7 +84,7 @@ jobs: - uses: actions/download-artifact@v1 if: github.event_name != 'pull_request' || matrix.py-version == env.MIN_PY_VERSION || matrix.py-version == env.MAX_PY_VERSION with: - name: ${{ matrix.os }}-${{ matrix.py-version }}-tf2.1.0-wheel + name: ${{ matrix.os }}-${{ matrix.py-version }}-tf2.2.0rc3-wheel path: ./dist - if: github.event_name != 'pull_request' || matrix.py-version == env.MIN_PY_VERSION || matrix.py-version == env.MAX_PY_VERSION run: | diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 5b1f0d0b65..82d8fd6dfb 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -247,7 +247,7 @@ If you need a custom C++/Cuda op for your test, compile your ops with ```bash python configure.py -pip install tensorflow==2.1.0 -e ./ -r tools/install_deps/pytest.txt +pip install tensorflow==2.2.0rc3 -e ./ -r tools/install_deps/pytest.txt bash tools/install_so_files.sh # Linux/macos/WSL2 sh tools/install_so_files.sh # PowerShell ``` @@ -275,7 +275,7 @@ docker run --runtime=nvidia --rm -it -v ${PWD}:/addons -w /addons tensorflow/ten Configure: ``` -python3 -m pip install tensorflow==2.1.0 +python3 -m pip install tensorflow==2.2.0 python3 ./configure.py # Links project with TensorFlow dependency ``` @@ -309,7 +309,7 @@ quickly, as Bazel has great support for caching and distributed testing. To test with Bazel: ``` -python3 -m pip install tensorflow==2.1.0 +python3 -m pip install tensorflow==2.2.0rc3 python3 configure.py python3 -m pip install pytest bazel test -c opt -k \ diff --git a/tensorflow_addons/utils/ensure_tf_install.py b/tensorflow_addons/utils/ensure_tf_install.py index 1465dea8e6..e169e5fc70 100644 --- a/tensorflow_addons/utils/ensure_tf_install.py +++ b/tensorflow_addons/utils/ensure_tf_install.py @@ -23,7 +23,7 @@ import tensorflow as tf -MIN_TF_VERSION = "2.1.0" +MIN_TF_VERSION = "2.2.0" MAX_TF_VERSION = "2.3.0" diff --git a/tensorflow_addons/utils/resource_loader.py b/tensorflow_addons/utils/resource_loader.py index eb914a2eef..825e998337 100644 --- a/tensorflow_addons/utils/resource_loader.py +++ b/tensorflow_addons/utils/resource_loader.py @@ -20,7 +20,7 @@ import tensorflow as tf -MIN_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.1.0" +MIN_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.2.0" MAX_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.2.0" abi_warning_already_raised = False SKIP_CUSTOM_OPS = False diff --git a/tools/docker/cpu_tests.Dockerfile b/tools/docker/cpu_tests.Dockerfile index 973064491a..4ae0e9f7bd 100644 --- a/tools/docker/cpu_tests.Dockerfile +++ b/tools/docker/cpu_tests.Dockerfile @@ -1,7 +1,7 @@ #syntax=docker/dockerfile:1.1.5-experimental FROM python:3.5 as build_wheel -ARG TF_VERSION=2.1.0 +ARG TF_VERSION=2.2.0 RUN pip install tensorflow-cpu==$TF_VERSION RUN apt-get update && apt-get install -y sudo rsync diff --git a/tools/install_deps/tensorflow-cpu.txt b/tools/install_deps/tensorflow-cpu.txt index 8e86efda81..c5c3dabbc7 100644 --- a/tools/install_deps/tensorflow-cpu.txt +++ b/tools/install_deps/tensorflow-cpu.txt @@ -1 +1 @@ -tensorflow-cpu~=2.1.0 +tensorflow-cpu~=2.2.0rc3 diff --git a/tools/install_deps/tensorflow.txt b/tools/install_deps/tensorflow.txt index f2e047de27..be732a504f 100644 --- a/tools/install_deps/tensorflow.txt +++ b/tools/install_deps/tensorflow.txt @@ -1 +1 @@ -tensorflow~=2.1.0 \ No newline at end of file +tensorflow~=2.2.0rc3 \ No newline at end of file diff --git a/tools/run_gpu_tests.sh b/tools/run_gpu_tests.sh index 01cae1e3de..64e7eaecfb 100644 --- a/tools/run_gpu_tests.sh +++ b/tools/run_gpu_tests.sh @@ -6,7 +6,7 @@ export DOCKER_BUILDKIT=1 docker build \ -f tools/docker/build_wheel.Dockerfile \ --target tfa_gpu_tests \ - --build-arg TF_VERSION=2.1.0 \ + --build-arg TF_VERSION=2.2.0rc3 \ --build-arg PY_VERSION=3.5 \ -t tfa_gpu_tests ./ docker run --rm -t -v cache_bazel:/root/.cache/bazel --gpus=all tfa_gpu_tests From b6977473f04595a33f4d0a9b238425b9d5fb4a61 Mon Sep 17 00:00:00 2001 From: Gabriel de Marmiesse Date: Sun, 26 Apr 2020 19:21:56 +0200 Subject: [PATCH 2/7] Correct max version. --- tensorflow_addons/utils/resource_loader.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow_addons/utils/resource_loader.py b/tensorflow_addons/utils/resource_loader.py index 825e998337..73f59cf3c1 100644 --- a/tensorflow_addons/utils/resource_loader.py +++ b/tensorflow_addons/utils/resource_loader.py @@ -21,7 +21,7 @@ import tensorflow as tf MIN_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.2.0" -MAX_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.2.0" +MAX_TF_VERSION_FOR_ABI_COMPATIBILITY = "2.3.0" abi_warning_already_raised = False SKIP_CUSTOM_OPS = False From f4a5433177826e73ebf30143939c6b663292c689 Mon Sep 17 00:00:00 2001 From: Gabriel de Marmiesse Date: Sun, 26 Apr 2020 19:22:36 +0200 Subject: [PATCH 3/7] We don't have a stable version yet. --- tools/docker/cpu_tests.Dockerfile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tools/docker/cpu_tests.Dockerfile b/tools/docker/cpu_tests.Dockerfile index 4ae0e9f7bd..2a8578dfec 100644 --- a/tools/docker/cpu_tests.Dockerfile +++ b/tools/docker/cpu_tests.Dockerfile @@ -1,7 +1,7 @@ #syntax=docker/dockerfile:1.1.5-experimental FROM python:3.5 as build_wheel -ARG TF_VERSION=2.2.0 +ARG TF_VERSION=2.2.0rc3 RUN pip install tensorflow-cpu==$TF_VERSION RUN apt-get update && apt-get install -y sudo rsync From 4886a16dee642865256bb74d62fd7900347dfdaf Mon Sep 17 00:00:00 2001 From: Gabriel de Marmiesse Date: Sun, 26 Apr 2020 19:23:27 +0200 Subject: [PATCH 4/7] Add rc3 --- CONTRIBUTING.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 82d8fd6dfb..b497e0c8b2 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -275,7 +275,7 @@ docker run --runtime=nvidia --rm -it -v ${PWD}:/addons -w /addons tensorflow/ten Configure: ``` -python3 -m pip install tensorflow==2.2.0 +python3 -m pip install tensorflow==2.2.0rc3 python3 ./configure.py # Links project with TensorFlow dependency ``` From 2cc8a163b9793413a410b22f3bc23734119987ac Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Sun, 26 Apr 2020 17:30:00 +0000 Subject: [PATCH 5/7] Added a note in the contributing. --- CONTRIBUTING.md | 2 ++ 1 file changed, 2 insertions(+) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index b497e0c8b2..e8cd2be16d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -160,6 +160,8 @@ conda activate my_dev_environement Just run from the root: ``` +pip install tensorflow==2.2.0rc3 +# you can use "pip install tensorflow-cpu==2.2.0rc3" too if you're not testing on gpu. pip install -e ./ ``` From 9bbff2a804e02e0b9f9acad5334b29bd34d37e31 Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Sun, 26 Apr 2020 17:31:08 +0000 Subject: [PATCH 6/7] Added some stuff in the contributing. --- CONTRIBUTING.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index e8cd2be16d..70dd36d5ab 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -284,7 +284,7 @@ python3 ./configure.py # Links project with TensorFlow dependency Install in editable mode ``` python3 -m pip install -e . -python3 -m pip install pytest pytest-xdist +python3 -m pip install -r tools/install_deps/pytest.txt ``` Compile the custom ops @@ -313,7 +313,7 @@ To test with Bazel: ``` python3 -m pip install tensorflow==2.2.0rc3 python3 configure.py -python3 -m pip install pytest +python3 -m pip install -r tools/install_deps/pytest.txt bazel test -c opt -k \ --test_timeout 300,450,1200,3600 \ --test_output=all \ From d274404f813bef0d4bb1bf5eb81c1b920dc490c7 Mon Sep 17 00:00:00 2001 From: gabrieldemarmiesse Date: Sun, 26 Apr 2020 17:51:41 +0000 Subject: [PATCH 7/7] Updated readme. --- README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/README.md b/README.md index a838bb3b50..868b8f9475 100644 --- a/README.md +++ b/README.md @@ -71,8 +71,8 @@ what it was tested against. #### Python-Op Compatibility Matrix | TFA Version | TensorFlow | Python | |:----------------------- |:---|:---------- | -| tfa-nightly | 2.1, 2.2 | 3.5, 3.6, 3.7, 3.8 | -| tensorflow-addons-0.9.1 | 2.1 |3.5, 3.6, 3.7, 3.8 | +| tfa-nightly | 2.2 | 3.5, 3.6, 3.7, 3.8 | +| tensorflow-addons-0.9.1 | 2.1,2.2 |3.5, 3.6, 3.7, 3.8 | | tensorflow-addons-0.8.3 | 2.1 |3.5, 3.6, 3.7 | | tensorflow-addons-0.7.1 | 2.1 | 2.7, 3.5, 3.6, 3.7 | | tensorflow-addons-0.6.0 | 2.0 | 2.7, 3.5, 3.6, 3.7 | @@ -102,7 +102,7 @@ compiled differently. A typical reason for this would be conda installed TensorF #### Custom-Op Compatibility Matrix | TFA Version | TensorFlow | Compiler | cuDNN | CUDA | |:----------------------- |:---- |:---------|:---------|:---------| -| tfa-nightly | 2.1 | GCC 7.3.1 | 7.6 | 10.1 | +| tfa-nightly | 2.2 | GCC 7.3.1 | 7.6 | 10.1 | | tensorflow-addons-0.9.1 | 2.1 | GCC 7.3.1 | 7.6 | 10.1 | | tensorflow-addons-0.8.3 | 2.1 | GCC 7.3.1 | 7.6 | 10.1 | | tensorflow-addons-0.7.1 | 2.1 | GCC 7.3.1 | 7.6 | 10.1 |