Skip to content

Commit 5c914ab

Browse files
authored
Change build to tf 2.16.1 (#1977)
* Change build to tf 2.16.1 * Patch tensorflow to avoid cython error * Update to 3.12 * Update 3.12 for arm64 * Fix WORKSPACE
1 parent 4d70341 commit 5c914ab

File tree

6 files changed

+59
-17
lines changed

6 files changed

+59
-17
lines changed

.bazelversion

+1-1
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
6.1.0
1+
6.5.0

.github/workflows/build.arm64.yml

+6-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ jobs:
3434
runs-on: macos-13-xlarge
3535
strategy:
3636
matrix:
37-
python: ['3.9', '3.10', '3.11']
37+
python: ['3.9', '3.10', '3.11', '3.12']
3838
steps:
3939
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
4040
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
@@ -85,12 +85,17 @@ jobs:
8585
with:
8686
name: macOS-arm64-3.11-wheel
8787
path: macOS-arm64-3.11-wheel
88+
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
89+
with:
90+
name: macOS-arm64-3.12-wheel
91+
path: macOS-arm64-3.12-wheel
8892
- run: |
8993
set -e -x
9094
mkdir -p wheelhouse
9195
cp macOS-arm64-3.9-wheel/*.whl wheelhouse/
9296
cp macOS-arm64-3.10-wheel/*.whl wheelhouse/
9397
cp macOS-arm64-3.11-wheel/*.whl wheelhouse/
98+
cp macOS-arm64-3.12-wheel/*.whl wheelhouse/
9499
ls -la wheelhouse/
95100
sha256sum wheelhouse/*.whl
96101
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0

.github/workflows/build.yml

+39-6
Original file line numberDiff line numberDiff line change
@@ -145,7 +145,7 @@ jobs:
145145
runs-on: macOS-11
146146
strategy:
147147
matrix:
148-
python: ['3.9', '3.10', '3.11']
148+
python: ['3.9', '3.10', '3.11', '3.12']
149149
steps:
150150
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
151151
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
@@ -284,7 +284,7 @@ jobs:
284284
runs-on: ubuntu-20.04
285285
strategy:
286286
matrix:
287-
python: ['3.9', '3.10', '3.11']
287+
python: ['3.9', '3.10', '3.11', '3.12']
288288
steps:
289289
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
290290
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
@@ -400,7 +400,7 @@ jobs:
400400
runs-on: windows-latest
401401
strategy:
402402
matrix:
403-
python: ['3.9', '3.10', '3.11']
403+
python: ['3.9', '3.10', '3.11', '3.12']
404404
steps:
405405
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4.1.1
406406
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
@@ -499,6 +499,10 @@ jobs:
499499
with:
500500
name: macOS-3.11-wheel
501501
path: macOS-3.11-wheel
502+
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
503+
with:
504+
name: macOS-3.12-wheel
505+
path: macOS-3.12-wheel
502506
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
503507
with:
504508
name: Linux-3.9-wheel
@@ -511,6 +515,10 @@ jobs:
511515
with:
512516
name: Linux-3.11-wheel
513517
path: Linux-3.11-wheel
518+
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
519+
with:
520+
name: Linux-3.12-wheel
521+
path: Linux-3.12-wheel
514522
#- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
515523
# with:
516524
# name: Windows-3.9-wheel
@@ -523,18 +531,25 @@ jobs:
523531
# with:
524532
# name: Windows-3.11-wheel
525533
# path: Windows-3.11-wheel
534+
#- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
535+
# with:
536+
# name: Windows-3.12-wheel
537+
# path: Windows-3.12-wheel
526538
- run: |
527539
set -e -x
528540
mkdir -p wheelhouse
529541
cp macOS-3.9-wheel/*.whl wheelhouse/
530542
cp macOS-3.10-wheel/*.whl wheelhouse/
531543
cp macOS-3.11-wheel/*.whl wheelhouse/
544+
cp macOS-3.12-wheel/*.whl wheelhouse/
532545
cp Linux-3.9-wheel/*.whl wheelhouse/
533546
cp Linux-3.10-wheel/*.whl wheelhouse/
534547
cp Linux-3.11-wheel/*.whl wheelhouse/
548+
cp Linux-3.12-wheel/*.whl wheelhouse/
535549
# cp Windows-3.9-wheel/*.whl wheelhouse/
536550
# cp Windows-3.10-wheel/*.whl wheelhouse/
537551
# cp Windows-3.11-wheel/*.whl wheelhouse/
552+
# cp Windows-3.12-wheel/*.whl wheelhouse/
538553
ls -la wheelhouse/
539554
sha256sum wheelhouse/*.whl
540555
- uses: actions/upload-artifact@26f96dfa697d77e81fd5907df203aa23a56210a8 # v4.3.0
@@ -625,7 +640,7 @@ jobs:
625640
runs-on: macOS-11
626641
strategy:
627642
matrix:
628-
python: ['3.9', '3.10', '3.11']
643+
python: ['3.9', '3.10', '3.11', '3.12']
629644
steps:
630645
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
631646
with:
@@ -672,7 +687,7 @@ jobs:
672687
runs-on: ubuntu-20.04
673688
strategy:
674689
matrix:
675-
python: ['3.9', '3.10', '3.11']
690+
python: ['3.9', '3.10', '3.11', '3.12']
676691
steps:
677692
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
678693
with:
@@ -712,7 +727,7 @@ jobs:
712727
runs-on: windows-latest
713728
strategy:
714729
matrix:
715-
python: ['3.9', '3.10', '3.11']
730+
python: ['3.9', '3.10', '3.11', '3.12']
716731
steps:
717732
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
718733
with:
@@ -760,6 +775,10 @@ jobs:
760775
with:
761776
name: macOS-3.11-nightly
762777
path: macOS-3.11-nightly
778+
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
779+
with:
780+
name: macOS-3.12-nightly
781+
path: macOS-3.12-nightly
763782
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
764783
with:
765784
name: Linux-3.9-nightly
@@ -772,6 +791,10 @@ jobs:
772791
with:
773792
name: Linux-3.11-nightly
774793
path: Linux-3.11-nightly
794+
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
795+
with:
796+
name: Linux-3.12-nightly
797+
path: Linux-3.12-nightly
775798
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
776799
with:
777800
name: Windows-3.9-nightly
@@ -784,18 +807,25 @@ jobs:
784807
with:
785808
name: Windows-3.11-nightly
786809
path: Windows-3.11-nightly
810+
- uses: actions/download-artifact@6b208ae046db98c579e8a3aa621ab581ff575935 # v4.1.1
811+
with:
812+
name: Windows-3.12-nightly
813+
path: Windows-3.12-nightly
787814
- run: |
788815
set -e -x
789816
mkdir -p dist
790817
cp macOS-3.9-nightly/tensorflow_io_nightly*.whl dist/
791818
cp macOS-3.10-nightly/tensorflow_io_nightly*.whl dist/
792819
cp macOS-3.11-nightly/tensorflow_io_nightly*.whl dist/
820+
cp macOS-3.12-nightly/tensorflow_io_nightly*.whl dist/
793821
cp Linux-3.9-nightly/tensorflow_io_nightly*.whl dist/
794822
cp Linux-3.10-nightly/tensorflow_io_nightly*.whl dist/
795823
cp Linux-3.11-nightly/tensorflow_io_nightly*.whl dist/
824+
cp Linux-3.12-nightly/tensorflow_io_nightly*.whl dist/
796825
cp Windows-3.9-nightly/tensorflow_io_nightly*.whl dist/
797826
cp Windows-3.10-nightly/tensorflow_io_nightly*.whl dist/
798827
cp Windows-3.11-nightly/tensorflow_io_nightly*.whl dist/
828+
cp Windows-3.12-nightly/tensorflow_io_nightly*.whl dist/
799829
ls -la dist/
800830
sha256sum dist/*.whl
801831
- uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf # v1.8.11
@@ -809,12 +839,15 @@ jobs:
809839
cp macOS-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
810840
cp macOS-3.10-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
811841
cp macOS-3.11-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
842+
cp macOS-3.12-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
812843
cp Linux-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
813844
cp Linux-3.10-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
814845
cp Linux-3.11-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
846+
cp Linux-3.12-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
815847
cp Windows-3.9-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
816848
cp Windows-3.10-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
817849
cp Windows-3.11-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
850+
cp Windows-3.12-nightly/tensorflow_io_gcs_filesystem_nightly*.whl dist/
818851
ls -la dist/
819852
sha256sum dist/*.whl
820853
- uses: pypa/gh-action-pypi-publish@2f6f737ca5f74c637829c0f5c3acd0e29ea5e8bf # v1.8.11

WORKSPACE

+10-6
Original file line numberDiff line numberDiff line change
@@ -93,10 +93,15 @@ switched_rules_by_language(
9393

9494
http_archive(
9595
name = "org_tensorflow",
96-
sha256 = "9cec5acb0ecf2d47b16891f8bc5bc6fbfdffe1700bdadc0d9ebe27ea34f0c220",
97-
strip_prefix = "tensorflow-2.15.0",
96+
patch_cmds = [
97+
"""sed -i.bak 's/cython-3.0.3/cython-3.0.0a11/g' tensorflow/workspace2.bzl""",
98+
"""sed -i.bak 's/3.0.3.tar.gz/3.0.0a11.tar.gz/g' tensorflow/workspace2.bzl""",
99+
"""sed -i.bak 's/0c2eae8a4ceab7955be1e11a4ddc5dcc3aa06ce22ad594262f1555b9d10667f0/08dbdb6aa003f03e65879de8f899f87c8c718cd874a31ae9c29f8726da2f5ab0/g' tensorflow/workspace2.bzl""",
100+
],
101+
sha256 = "c729e56efc945c6df08efe5c9f5b8b89329c7c91b8f40ad2bb3e13900bd4876d",
102+
strip_prefix = "tensorflow-2.16.1",
98103
urls = [
99-
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.15.0.tar.gz",
104+
"https://github.com/tensorflow/tensorflow/archive/refs/tags/v2.16.1.tar.gz",
100105
],
101106
)
102107

@@ -880,10 +885,9 @@ http_archive(
880885
# Needed for llvm_toolchain and Golang
881886
http_archive(
882887
name = "com_grail_bazel_toolchain",
883-
sha256 = "9e6065ded4b7453143e1586d6819729a63cd233114b72bf85ff3435367b02c90",
884-
strip_prefix = "bazel-toolchain-edd07e96a2ecaa131af9234d6582875d980c0ac7",
888+
sha256 = "4b7999c1fa2c3117bb21651e3c155b152e44ae67b2c311214883d4707dbe183f",
889+
strip_prefix = "toolchains_llvm-edd07e96a2ecaa131af9234d6582875d980c0ac7",
885890
urls = [
886-
"https://storage.googleapis.com/mirror.tensorflow.org/github.com/grailbio/bazel-toolchain/archive/edd07e96a2ecaa131af9234d6582875d980c0ac7.tar.gz",
887891
"https://github.com/grailbio/bazel-toolchain/archive/edd07e96a2ecaa131af9234d6582875d980c0ac7.tar.gz",
888892
],
889893
)

tensorflow_io/python/ops/version_ops.py

+2-2
Original file line numberDiff line numberDiff line change
@@ -14,5 +14,5 @@
1414
# ==============================================================================
1515
"""version_ops"""
1616

17-
version = "0.36.0"
18-
require = "tensorflow>=2.15.0,<2.16.0"
17+
version = "0.37.0"
18+
require = "tensorflow>=2.16.0,<2.17.0"

tools/docker/build.Dockerfile

+1-1
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ ARG BAZEL_OPTIMIZATION
99
ADD . /opt/io
1010
WORKDIR /opt/io
1111

12-
RUN python${PYTHON_VERSION} -m pip install tensorflow==${TENSORFLOW_VERSION}
12+
RUN python${PYTHON_VERSION} -m pip install tensorflow>=${TENSORFLOW_VERSION}
1313

1414
RUN python$PYTHON_VERSION -m pip uninstall -y tensorflow-io-gcs-filesystem
1515

0 commit comments

Comments
 (0)