From 3eeec8afd77c6f05f3ebd1d6ea6c6ef2b9221b79 Mon Sep 17 00:00:00 2001 From: st-- Date: Tue, 28 Mar 2023 14:08:53 +0300 Subject: [PATCH] Add support for tensorflow 2.11/tensorflow_probability 0.19 (#97) * add tf 2.11/tfp 0.19 to quality-check * update version upper bounds in setup.py * remove protobuf pin * fix workflows to use up-to-date GitHub actions * use python 3.8 in workflows * bump version to 0.4.1 --- .github/workflows/deploy.yaml | 6 +++--- .github/workflows/quality-check.yaml | 11 +++++++---- .github/workflows/upload-pypi.yaml | 6 +++--- gpflux/version.py | 2 +- setup.py | 10 +++++----- 5 files changed, 19 insertions(+), 16 deletions(-) diff --git a/.github/workflows/deploy.yaml b/.github/workflows/deploy.yaml index 121a9d9d..c493bf78 100644 --- a/.github/workflows/deploy.yaml +++ b/.github/workflows/deploy.yaml @@ -23,10 +23,10 @@ jobs: docs: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - run: | pip install --upgrade pip make install diff --git a/.github/workflows/quality-check.yaml b/.github/workflows/quality-check.yaml index 07e079cf..cd8e1150 100644 --- a/.github/workflows/quality-check.yaml +++ b/.github/workflows/quality-check.yaml @@ -22,7 +22,7 @@ jobs: strategy: matrix: python-version: ["3.7", "3.8", "3.9", "3.10"] - tensorflow: ["~=2.5.0", "~=2.6.0", "~=2.7.0", "~=2.8.0", "~=2.9.0", "~=2.10.0"] + tensorflow: ["~=2.5.0", "~=2.6.0", "~=2.7.0", "~=2.8.0", "~=2.9.0", "~=2.10.0", "~=2.11.0"] include: - tensorflow: "~=2.5.0" keras: "~=2.6.0" @@ -42,6 +42,9 @@ jobs: - tensorflow: "~=2.10.0" keras: "~=2.10.0" tensorflow-probability: "~=0.18.0" + - tensorflow: "~=2.11.0" + keras: "~=2.11.0" + tensorflow-probability: "~=0.19.0" exclude: # These older versions of TensorFlow don't work with Python 3.10: - python-version: "3.10" @@ -57,11 +60,11 @@ jobs: VERSION_KERAS: ${{ matrix.keras }} VERSION_TFP: ${{ matrix.tensorflow-probability }} steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: python-version: ${{ matrix.python-version }} - - uses: actions/cache@v2 + - uses: actions/cache@v3 with: path: ${{ env.pythonLocation }} key: ${{ env.pythonLocation }}-${{ hashFiles('setup.py') }}-${{ hashFiles('notebook_requirements.txt') }}-${{ hashFiles('tests_requirements.txt') }} diff --git a/.github/workflows/upload-pypi.yaml b/.github/workflows/upload-pypi.yaml index 59292885..4abc28e9 100644 --- a/.github/workflows/upload-pypi.yaml +++ b/.github/workflows/upload-pypi.yaml @@ -24,10 +24,10 @@ jobs: upload-pypi: runs-on: ubuntu-20.04 steps: - - uses: actions/checkout@v2 - - uses: actions/setup-python@v2 + - uses: actions/checkout@v3 + - uses: actions/setup-python@v4 with: - python-version: 3.7 + python-version: 3.8 - name: Install twine and wheel run: | pip install twine wheel diff --git a/gpflux/version.py b/gpflux/version.py index 6f86e713..66227560 100644 --- a/gpflux/version.py +++ b/gpflux/version.py @@ -15,4 +15,4 @@ # """Adds __version__""" -__version__ = "0.4.0" +__version__ = "0.4.1" diff --git a/setup.py b/setup.py index 0f3cda6e..a1adc2a3 100644 --- a/setup.py +++ b/setup.py @@ -9,12 +9,11 @@ "gpflow>=2.6.3", "numpy", "scipy", - "tensorflow>=2.5.0,<2.11.0; platform_system!='Darwin' or platform_machine!='arm64'", + "tensorflow>=2.5.0,<2.12.0; platform_system!='Darwin' or platform_machine!='arm64'", # NOTE: Support of Apple Silicon MacOS platforms is in an experimental mode - "tensorflow-macos>=2.5.0,<2.11.0; platform_system=='Darwin' and platform_machine=='arm64'", + "tensorflow-macos>=2.5.0,<2.12.0; platform_system=='Darwin' and platform_machine=='arm64'", # NOTE: once we require tensorflow-probability>=0.12, we can remove our custom deepcopy handling - "tensorflow-probability>=0.13.0,<0.19.0", - "protobuf~=3.19.0" + "tensorflow-probability>=0.13.0,<0.20.0", ] with open("README.md", "r") as file: @@ -42,9 +41,10 @@ }, classifiers=[ "License :: OSI Approved :: Apache Software License", - "Programming Language :: Python :: 3.6", "Programming Language :: Python :: 3.7", "Programming Language :: Python :: 3.8", + "Programming Language :: Python :: 3.9", + "Programming Language :: Python :: 3.10", "Operating System :: OS Independent", "Topic :: Scientific/Engineering :: Artificial Intelligence", ],