From 5ea6f5d8fed993f91d118aef577710a7343379c7 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Wed, 10 Apr 2024 01:48:33 +0000 Subject: [PATCH 1/5] Change build to tf 2.16.1 --- .bazelversion | 2 +- WORKSPACE | 11 +++++------ tensorflow_io/python/ops/version_ops.py | 4 ++-- tools/docker/build.Dockerfile | 2 +- 4 files changed, 9 insertions(+), 10 deletions(-) diff --git a/.bazelversion b/.bazelversion index dfda3e0b4..f22d756da 100644 --- a/.bazelversion +++ b/.bazelversion @@ -1 +1 @@ -6.1.0 +6.5.0 diff --git a/WORKSPACE b/WORKSPACE index e29c56d4a..41e624f60 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -93,10 +93,10 @@ switched_rules_by_language( http_archive( name = "org_tensorflow", - sha256 = "9cec5acb0ecf2d47b16891f8bc5bc6fbfdffe1700bdadc0d9ebe27ea34f0c220", - strip_prefix = "tensorflow-2.15.0", + sha256 = "c729e56efc945c6df08efe5c9f5b8b89329c7c91b8f40ad2bb3e13900bd4876d", + strip_prefix = "tensorflow-2.16.1", urls = [ - "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.15.0.tar.gz", + "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.16.1.tar.gz", ], ) @@ -880,10 +880,9 @@ http_archive( # Needed for llvm_toolchain and Golang http_archive( name = "com_grail_bazel_toolchain", - sha256 = "9e6065ded4b7453143e1586d6819729a63cd233114b72bf85ff3435367b02c90", - strip_prefix = "bazel-toolchain-edd07e96a2ecaa131af9234d6582875d980c0ac7", + sha256 = "4b7999c1fa2c3117bb21651e3c155b152e44ae67b2c311214883d4707dbe183f", + strip_prefix = "toolchains_llvm-edd07e96a2ecaa131af9234d6582875d980c0ac7", urls = [ - "https://storage.googleapis.com/mirror.tensorflow.org/github.com/grailbio/bazel-toolchain/archive/edd07e96a2ecaa131af9234d6582875d980c0ac7.tar.gz", "https://github.com/grailbio/bazel-toolchain/archive/edd07e96a2ecaa131af9234d6582875d980c0ac7.tar.gz", ], ) diff --git a/tensorflow_io/python/ops/version_ops.py b/tensorflow_io/python/ops/version_ops.py index 3daebf24d..aa7b04f03 100644 --- a/tensorflow_io/python/ops/version_ops.py +++ b/tensorflow_io/python/ops/version_ops.py @@ -14,5 +14,5 @@ # ============================================================================== """version_ops""" -version = "0.36.0" -require = "tensorflow>=2.15.0,<2.16.0" +version = "0.37.0" +require = "tensorflow>=2.16.0,<2.17.0" diff --git a/tools/docker/build.Dockerfile b/tools/docker/build.Dockerfile index cbce6b9fe..189a8f2a6 100644 --- a/tools/docker/build.Dockerfile +++ b/tools/docker/build.Dockerfile @@ -9,7 +9,7 @@ ARG BAZEL_OPTIMIZATION ADD . /opt/io WORKDIR /opt/io -RUN python${PYTHON_VERSION} -m pip install tensorflow==${TENSORFLOW_VERSION} +RUN python${PYTHON_VERSION} -m pip install tensorflow>=${TENSORFLOW_VERSION} RUN python$PYTHON_VERSION -m pip uninstall -y tensorflow-io-gcs-filesystem From e04202045be9c43ee7b9427aacd6eb8b12376f57 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Wed, 10 Apr 2024 03:55:40 +0000 Subject: [PATCH 2/5] Patch tensorflow to avoid cython error --- WORKSPACE | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/WORKSPACE b/WORKSPACE index 41e624f60..6b4909c37 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -98,6 +98,11 @@ http_archive( urls = [ "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.16.1.tar.gz", ], + patch_cmds = [ + """sed -i.bak 's/cython-3.0.3/cython-3.0.0a11/g' tensorflow/workspace2.bzl""", + """sed -i.bak 's/3.0.3.tar.gz/3.0.0a11.tar.gz/g' tensorflow/workspace2.bzl""", + """sed -i.bak 's/0c2eae8a4ceab7955be1e11a4ddc5dcc3aa06ce22ad594262f1555b9d10667f0/08dbdb6aa003f03e65879de8f899f87c8c718cd874a31ae9c29f8726da2f5ab0/g' tensorflow/workspace2.bzl""", + ], ) http_archive( From e04c39cbb81e5129422496f72682933d9be1d3a8 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Thu, 11 Apr 2024 01:10:40 +0000 Subject: [PATCH 3/5] Update to 3.12 --- .github/workflows/build.yml | 45 ++++++++++++++++++++++++++++++++----- 1 file changed, 39 insertions(+), 6 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 94e892c87..0e2ec03f2 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -145,7 +145,7 @@ jobs: runs-on: macOS-11 strategy: matrix: - python: ['3.9', '3.10', '3.11'] + python: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 @@ -284,7 +284,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python: ['3.9', '3.10', '3.11'] + python: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 @@ -400,7 +400,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python: ['3.9', '3.10', '3.11'] + python: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 @@ -499,6 +499,10 @@ jobs: with: name: macOS-3.11-wheel path: macOS-3.11-wheel + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + with: + name: macOS-3.12-wheel + path: macOS-3.12-wheel - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: name: Linux-3.9-wheel @@ -511,6 +515,10 @@ jobs: with: name: Linux-3.11-wheel path: Linux-3.11-wheel + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + with: + name: Linux-3.12-wheel + path: Linux-3.12-wheel #- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 # with: # name: Windows-3.9-wheel @@ -523,18 +531,25 @@ jobs: # with: # name: Windows-3.11-wheel # path: Windows-3.11-wheel + #- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + # with: + # name: Windows-3.12-wheel + # path: Windows-3.12-wheel - run: | set -e -x mkdir -p wheelhouse cp macOS-3.9-wheel/*.whl wheelhouse/ cp macOS-3.10-wheel/*.whl wheelhouse/ cp macOS-3.11-wheel/*.whl wheelhouse/ + cp macOS-3.12-wheel/*.whl wheelhouse/ cp Linux-3.9-wheel/*.whl wheelhouse/ cp Linux-3.10-wheel/*.whl wheelhouse/ cp Linux-3.11-wheel/*.whl wheelhouse/ + cp Linux-3.12-wheel/*.whl wheelhouse/ # cp Windows-3.9-wheel/*.whl wheelhouse/ # cp Windows-3.10-wheel/*.whl wheelhouse/ # cp Windows-3.11-wheel/*.whl wheelhouse/ + # cp Windows-3.12-wheel/*.whl wheelhouse/ ls -la wheelhouse/ sha256sum wheelhouse/*.whl - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 @@ -625,7 +640,7 @@ jobs: runs-on: macOS-11 strategy: matrix: - python: ['3.9', '3.10', '3.11'] + python: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: @@ -672,7 +687,7 @@ jobs: runs-on: ubuntu-20.04 strategy: matrix: - python: ['3.9', '3.10', '3.11'] + python: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: @@ -712,7 +727,7 @@ jobs: runs-on: windows-latest strategy: matrix: - python: ['3.9', '3.10', '3.11'] + python: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: @@ -760,6 +775,10 @@ jobs: with: name: macOS-3.11-nightly path: macOS-3.11-nightly + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + with: + name: macOS-3.12-nightly + path: macOS-3.12-nightly - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: name: Linux-3.9-nightly @@ -772,6 +791,10 @@ jobs: with: name: Linux-3.11-nightly path: Linux-3.11-nightly + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + with: + name: Linux-3.12-nightly + path: Linux-3.12-nightly - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 with: name: Windows-3.9-nightly @@ -784,18 +807,25 @@ jobs: with: name: Windows-3.11-nightly path: Windows-3.11-nightly + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + with: + name: Windows-3.12-nightly + path: Windows-3.12-nightly - run: | set -e -x mkdir -p dist cp macOS-3.9-nightly/tensorflow_io_nightly*.whl dist/ cp macOS-3.10-nightly/tensorflow_io_nightly*.whl dist/ cp macOS-3.11-nightly/tensorflow_io_nightly*.whl dist/ + cp macOS-3.12-nightly/tensorflow_io_nightly*.whl dist/ cp Linux-3.9-nightly/tensorflow_io_nightly*.whl dist/ cp Linux-3.10-nightly/tensorflow_io_nightly*.whl dist/ cp Linux-3.11-nightly/tensorflow_io_nightly*.whl dist/ + cp Linux-3.12-nightly/tensorflow_io_nightly*.whl dist/ cp Windows-3.9-nightly/tensorflow_io_nightly*.whl dist/ cp Windows-3.10-nightly/tensorflow_io_nightly*.whl dist/ cp Windows-3.11-nightly/tensorflow_io_nightly*.whl dist/ + cp Windows-3.12-nightly/tensorflow_io_nightly*.whl dist/ ls -la dist/ sha256sum dist/*.whl - uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf # v1.8.11 @@ -809,12 +839,15 @@ jobs: cp macOS-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp macOS-3.10-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp macOS-3.11-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp macOS-3.12-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Linux-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Linux-3.10-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Linux-3.11-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp Linux-3.12-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Windows-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Windows-3.10-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ cp Windows-3.11-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ + cp Windows-3.12-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/ ls -la dist/ sha256sum dist/*.whl - uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf # v1.8.11 From 9102e5826f32a12cf8ddee1b93cf9389c8a8fd62 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Thu, 11 Apr 2024 01:11:31 +0000 Subject: [PATCH 4/5] Update 3.12 for arm64 --- .github/workflows/build.arm64.yml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/build.arm64.yml b/.github/workflows/build.arm64.yml index 24a86cdd2..97bc1350c 100644 --- a/.github/workflows/build.arm64.yml +++ b/.github/workflows/build.arm64.yml @@ -34,7 +34,7 @@ jobs: runs-on: macos-13-xlarge strategy: matrix: - python: ['3.9', '3.10', '3.11'] + python: ['3.9', '3.10', '3.11', '3.12'] steps: - uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1 - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 @@ -85,12 +85,17 @@ jobs: with: name: macOS-arm64-3.11-wheel path: macOS-arm64-3.11-wheel + - uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1 + with: + name: macOS-arm64-3.12-wheel + path: macOS-arm64-3.12-wheel - run: | set -e -x mkdir -p wheelhouse cp macOS-arm64-3.9-wheel/*.whl wheelhouse/ cp macOS-arm64-3.10-wheel/*.whl wheelhouse/ cp macOS-arm64-3.11-wheel/*.whl wheelhouse/ + cp macOS-arm64-3.12-wheel/*.whl wheelhouse/ ls -la wheelhouse/ sha256sum wheelhouse/*.whl - uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0 From c9190906dcb1f9e265c3a9a6178b0cd7711207b1 Mon Sep 17 00:00:00 2001 From: Yong Tang Date: Thu, 11 Apr 2024 01:35:37 +0000 Subject: [PATCH 5/5] Fix WORKSPACE --- WORKSPACE | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/WORKSPACE b/WORKSPACE index 6b4909c37..f0cbd1c12 100644 --- a/WORKSPACE +++ b/WORKSPACE @@ -93,16 +93,16 @@ switched_rules_by_language( http_archive( name = "org_tensorflow", - sha256 = "c729e56efc945c6df08efe5c9f5b8b89329c7c91b8f40ad2bb3e13900bd4876d", - strip_prefix = "tensorflow-2.16.1", - urls = [ - "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.16.1.tar.gz", - ], patch_cmds = [ """sed -i.bak 's/cython-3.0.3/cython-3.0.0a11/g' tensorflow/workspace2.bzl""", """sed -i.bak 's/3.0.3.tar.gz/3.0.0a11.tar.gz/g' tensorflow/workspace2.bzl""", """sed -i.bak 's/0c2eae8a4ceab7955be1e11a4ddc5dcc3aa06ce22ad594262f1555b9d10667f0/08dbdb6aa003f03e65879de8f899f87c8c718cd874a31ae9c29f8726da2f5ab0/g' tensorflow/workspace2.bzl""", ], + sha256 = "c729e56efc945c6df08efe5c9f5b8b89329c7c91b8f40ad2bb3e13900bd4876d", + strip_prefix = "tensorflow-2.16.1", + urls = [ + "https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.16.1.tar.gz", + ], ) http_archive(