Skip to content

Commit 57ebc1e

Browse files
committed
Merge branch '17-read-ahead-buffering' into 'devel'
Resolve "Read-Ahead Buffering" See merge request parallel-programming/bs-daos-tensorflow-io!17
2 parents 5cf7335 + dbf0bce commit 57ebc1e

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

63 files changed

+4304
-267
lines changed

.github/workflows/benchmarks.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
echo ${{ matrix.version }} | awk -F: '{print $1}' | xargs python -m pip install -U
3737
echo ${{ matrix.version }} | awk -F: '{print $2}' | xargs python -m pip install --no-deps -U
3838
python -m pip install tensorflow-io-gcs-filesystem-nightly
39-
python -m pip install -q scikit-image pytest pytest-benchmark boto3 fastavro avro-python3 scikit-image pandas pyarrow==2.0.0 google-cloud-pubsub==2.1.0 google-cloud-bigquery-storage==1.1.0 google-cloud-bigquery==2.3.1 google-cloud-storage==1.32.0 azure-storage-blob==12.7.1
39+
python -m pip install -q scikit-image pytest pytest-benchmark boto3 fastavro avro-python3 scikit-image pandas pyarrow==2.0.0 google-cloud-pubsub==2.1.0 google-cloud-bigquery-storage==1.1.0 google-cloud-bigquery==2.3.1 google-cloud-storage==1.32.0 google-cloud-bigtable==1.6.0 azure-storage-blob==12.7.1
4040
python -m pip freeze
4141
python -c 'import tensorflow as tf; print(tf.version.VERSION)'
4242
python -c 'import tensorflow_io as tfio; print(tfio.version.VERSION)'
@@ -75,7 +75,7 @@ jobs:
7575
echo ${{ matrix.version }} | awk -F: '{print $1}' | xargs python -m pip install -U
7676
echo ${{ matrix.version }} | awk -F: '{print $2}' | xargs python -m pip install --no-deps -U
7777
python -m pip install tensorflow-io-gcs-filesystem-nightly
78-
python -m pip install -q scikit-image pytest pytest-benchmark boto3 fastavro avro-python3 scikit-image pandas pyarrow==2.0.0 google-cloud-pubsub==2.1.0 google-cloud-bigquery-storage==1.1.0 google-cloud-bigquery==2.3.1 google-cloud-storage==1.32.0 azure-storage-blob==12.7.1
78+
python -m pip install -q scikit-image pytest pytest-benchmark boto3 fastavro avro-python3 scikit-image pandas pyarrow==2.0.0 google-cloud-pubsub==2.1.0 google-cloud-bigquery-storage==1.1.0 google-cloud-bigquery==2.3.1 google-cloud-storage==1.32.0 google-cloud-bigtable==1.6.0 azure-storage-blob==12.7.1
7979
python -m pip freeze
8080
python -c 'import tensorflow as tf; print(tf.version.VERSION)'
8181
python -c 'import tensorflow_io as tfio; print(tfio.version.VERSION)'

.github/workflows/build.bazel.sh

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,14 @@ $PYTHON --version
2424

2525
export TENSORFLOW_INSTALL="$($PYTHON setup.py --install-require)"
2626

27-
export BAZEL_OS=$(uname | tr '[:upper:]' '[:lower:]')
28-
export BAZEL_VERSION=$(cat .bazelversion)
2927
export PYTHON_BIN_PATH=`which $PYTHON`
30-
curl -sSOL https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-${BAZEL_OS}-x86_64.sh
31-
bash -e bazel-${BAZEL_VERSION}-installer-${BAZEL_OS}-x86_64.sh
28+
29+
if [[ $(uname) == "Linux" ]]; then
30+
curl -sSOL https://github.com/bazelbuild/bazelisk/releases/download/v1.11.0/bazelisk-linux-amd64
31+
mv bazelisk-linux-amd64 /usr/local/bin/bazel
32+
chmod +x /usr/local/bin/bazel
33+
fi
34+
3235
bazel version
3336

3437
$PYTHON -m pip --version

.github/workflows/build.yml

Lines changed: 59 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -15,17 +15,13 @@ env:
1515
jobs:
1616
lint:
1717
name: Lint
18-
runs-on: ubuntu-latest
18+
runs-on: ubuntu-20.04
1919
steps:
2020
- uses: actions/checkout@v2
2121
- name: Run Lint Script for Bazel/Pyupgrade/Black/Clang
2222
run: |
2323
set -x -e
2424
git log --pretty -1
25-
BAZEL_OS=$(uname | tr '[:upper:]' '[:lower:]')
26-
BAZEL_VERSION=$(cat .bazelversion)
27-
curl -sSOL https://github.com/bazelbuild/bazel/releases/download/${BAZEL_VERSION}/bazel-${BAZEL_VERSION}-installer-${BAZEL_OS}-x86_64.sh
28-
sudo bash -e bazel-${BAZEL_VERSION}-installer-${BAZEL_OS}-x86_64.sh
2925
sudo python3 -m pip install -U numpy
3026
bazel run -s --verbose_failures --experimental_repo_remote_exec //tools/lint:check -- bazel pyupgrade black clang
3127
- name: Run Lint Script for Docs
@@ -47,7 +43,7 @@ jobs:
4743
4844
macos:
4945
name: macOS
50-
runs-on: macos-latest
46+
runs-on: macOS-11
5147
steps:
5248
- uses: actions/checkout@v2
5349
- name: GCP
@@ -71,7 +67,7 @@ jobs:
7167
7268
linux:
7369
name: Linux
74-
runs-on: ubuntu-latest
70+
runs-on: ubuntu-20.04
7571
container:
7672
image: ubuntu:20.04
7773
env:
@@ -100,7 +96,7 @@ jobs:
10096
10197
macos-bazel:
10298
name: Bazel macOS
103-
runs-on: macos-latest
99+
runs-on: macOS-11
104100
steps:
105101
- uses: actions/checkout@v2
106102
- name: GCP
@@ -126,7 +122,7 @@ jobs:
126122
macos-wheel:
127123
name: Wheel ${{ matrix.python }} macOS
128124
needs: macos-bazel
129-
runs-on: macos-latest
125+
runs-on: macOS-11
130126
strategy:
131127
matrix:
132128
python: ['3.7', '3.8', '3.9', '3.10']
@@ -167,7 +163,7 @@ jobs:
167163
macos-test:
168164
name: Test ${{ matrix.python }} macOS
169165
needs: macos-wheel
170-
runs-on: macos-latest
166+
runs-on: macOS-11
171167
strategy:
172168
matrix:
173169
python: ['3.8', '3.9']
@@ -182,6 +178,7 @@ jobs:
182178
python-version: ${{ matrix.python }}
183179
- run: |
184180
set -x -e
181+
python -m pip install pip==21.3.1
185182
python -m pip install -U wheel setuptools
186183
python --version
187184
- name: Setup ${{ matrix.python }} macOS
@@ -206,7 +203,7 @@ jobs:
206203
207204
linux-bazel:
208205
name: Bazel Linux
209-
runs-on: ubuntu-latest
206+
runs-on: ubuntu-20.04
210207
container:
211208
image: gcr.io/tensorflow-testing/nosla-ubuntu16.04-manylinux2010
212209
env:
@@ -239,7 +236,7 @@ jobs:
239236
linux-wheel:
240237
name: Wheel ${{ matrix.python }} Linux
241238
needs: linux-bazel
242-
runs-on: ubuntu-latest
239+
runs-on: ubuntu-20.04
243240
strategy:
244241
matrix:
245242
python: ['3.7', '3.8', '3.9', '3.10']
@@ -308,7 +305,7 @@ jobs:
308305
309306
windows-bazel:
310307
name: Bazel Windows
311-
runs-on: windows-latest
308+
runs-on: windows-2019
312309
steps:
313310
- uses: actions/checkout@v2
314311
- uses: egor-tensin/vs-shell@v2
@@ -323,26 +320,21 @@ jobs:
323320
- name: Bazel on Windows
324321
env:
325322
BAZEL_VC: "C:/Program Files (x86)/Microsoft Visual Studio/2019/Enterprise/VC/"
326-
shell: cmd
323+
shell: bash
327324
run: |
328-
@echo on
329-
set "BAZEL_OPTIMIZATION="
330-
if "%EVENT_NAME%" == "push" (
331-
if "%REPO_NAME%" == "tensorflow/io" (
332-
set "BAZEL_OPTIMIZATION=%BAZEL_OPTIMIZATION% --remote_upload_local_results=true --google_credentials=service_account_creds.json"
333-
)
334-
)
335-
set /P BAZEL_VERSION=< .bazelversion
336-
curl -sSL -o bazel.exe https://github.com/bazelbuild/bazel/releases/download/%BAZEL_VERSION%/bazel-%BAZEL_VERSION%-windows-x86_64.exe
325+
set -x -e
326+
export BAZEL_OPTIMIZATION="--config=cache"
327+
if [[ "${EVENT_NAME}" == "push" && "${REPO_NAME}" == "tensorflow/io" ]]; then
328+
export BAZEL_OPTIMIZATION="$BAZEL_OPTIMIZATION --remote_upload_local_results=true --google_credentials=service_account_creds.json"
329+
fi
337330
bazel version
338331
python3 --version
339332
python3 -m pip install wheel setuptools
340333
python3 -m pip --version
341334
python3 setup.py --install-require | xargs python3 -m pip install
342335
python3 tools/build/configure.py
343336
cat .bazelrc
344-
bazel build -s %BAZEL_OPTIMIZATION% //tensorflow_io:python/ops/libtensorflow_io.so //tensorflow_io:python/ops/libtensorflow_io_plugins.so //tensorflow_io_gcs_filesystem/...
345-
if %errorlevel% neq 0 exit /b %errorlevel%
337+
bazel build -s ${BAZEL_OPTIMIZATION} //tensorflow_io:python/ops/libtensorflow_io.so //tensorflow_io:python/ops/libtensorflow_io_plugins.so //tensorflow_io_gcs_filesystem/...
346338
mkdir -p build
347339
cp -r bazel-bin/tensorflow_io build
348340
cp -r bazel-bin/tensorflow_io_gcs_filesystem build
@@ -517,6 +509,46 @@ jobs:
517509
name: tensorflow-io-release
518510
path: wheelhouse
519511

512+
release-candidate:
513+
name: Release Candidate
514+
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
515+
needs: [lint, release]
516+
runs-on: ubuntu-18.04
517+
steps:
518+
- uses: actions/checkout@v2
519+
- uses: actions/download-artifact@v1
520+
with:
521+
name: tensorflow-io-release
522+
path: wheelhouse
523+
- run: |
524+
set -x -e
525+
sha256sum wheelhouse/*.whl | sort -u > wheelhouse.sha256
526+
git rev-parse --verify HEAD > wheelhouse.commit
527+
grep 'version = ' tensorflow_io/python/ops/version_ops.py | sed -E 's@^.*version = "@@g' | sed -E 's@".*$@@g' > wheelhouse.version
528+
cat wheelhouse.sha256
529+
cat wheelhouse.commit
530+
cat wheelhouse.version
531+
echo "::set-output name=version::$(cat wheelhouse.version)"
532+
id: info
533+
- run: |-
534+
cat <<EOF > Dockerfile
535+
FROM gcr.io/distroless/base-debian11
536+
COPY wheelhouse /wheelhouse
537+
COPY wheelhouse.sha256 /wheelhouse.sha256
538+
COPY wheelhouse.commit /wheelhouse.commit
539+
COPY wheelhouse.version /wheelhouse.version
540+
EOF
541+
- uses: docker/setup-buildx-action@v1
542+
- uses: docker/login-action@v1
543+
with:
544+
username: tfsigio
545+
password: ${{ secrets.DOCKER_PASSWORD }}
546+
- uses: docker/build-push-action@v2
547+
with:
548+
context: .
549+
push: true
550+
tags: tfsigio/candidate:${{ steps.info.outputs.version }}
551+
520552
docker-release:
521553
name: Docker Release
522554
if: github.event_name == 'push' && github.ref == 'refs/heads/master'
@@ -542,7 +574,7 @@ jobs:
542574
build-number:
543575
name: Build Number
544576
if: github.event_name == 'push'
545-
runs-on: ubuntu-18.04
577+
runs-on: ubuntu-20.04
546578
steps:
547579
- run: |
548580
set -e -x
@@ -557,7 +589,7 @@ jobs:
557589
name: Nightly ${{ matrix.python }} macOS
558590
if: github.event_name == 'push'
559591
needs: [build-number, macos-wheel]
560-
runs-on: macos-latest
592+
runs-on: macOS-11
561593
strategy:
562594
matrix:
563595
python: ['3.7', '3.8', '3.9', '3.10']

.github/workflows/release.note.yml

Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
name: Release Note
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
8+
jobs:
9+
release-note:
10+
name: README.md
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
with:
15+
fetch-depth: 0
16+
- run: git tag
17+
- run: python3 tools/release/note_create.py
18+
- run: git diff
19+
- run: python3 tools/release/note_update.py
20+
- run: git diff
21+
- uses: peter-evans/create-pull-request@v3
22+
with:
23+
commit-message: Update RELEASE.md [bot]
24+
branch: bot-RELEASE.md
25+
delete-branch: true
26+
title: 'Update RELEASE.md [bot]'
27+
body: |
28+
README.md: auto-updated by .github/workflows/release.note.yml

.github/workflows/release.yml

Lines changed: 77 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,77 @@
1+
name: Release
2+
3+
on:
4+
workflow_dispatch:
5+
inputs:
6+
version:
7+
description: "Version (e.g., v0.24.0)"
8+
required: true
9+
commit:
10+
description: "Commit (e.g., 92b44e1)"
11+
required: true
12+
13+
jobs:
14+
release:
15+
name: Release
16+
runs-on: ubuntu-latest
17+
steps:
18+
- uses: actions/checkout@v2
19+
with:
20+
fetch-depth: 0
21+
- run: |
22+
set -x -e
23+
COMMIT=$(git rev-parse --quiet --verify ${{ github.event.inputs.commit }})
24+
if [[ "$(git tag -l ${{ github.event.inputs.version }})" == "${{ github.event.inputs.version }}" ]]; then
25+
echo "${{ github.event.inputs.version }} already released"
26+
exit 1
27+
fi
28+
VERSION=${{ github.event.inputs.version }}
29+
30+
docker pull tfsigio/candidate:${VERSION:1}
31+
docker create -it --name storage tfsigio/candidate:${VERSION:1} bash
32+
docker cp storage:/wheelhouse .
33+
docker cp storage:/wheelhouse.sha256 .
34+
docker cp storage:/wheelhouse.commit .
35+
docker cp storage:/wheelhouse.version .
36+
37+
sha256sum wheelhouse/*.whl | sort -u | diff wheelhouse.sha256 -
38+
mv wheelhouse dist
39+
40+
if [[ "${COMMIT}" != "$(cat wheelhouse.commit)" ]]; then
41+
echo "${COMMIT} != $(cat wheelhouse.commit)"
42+
exit 1
43+
fi
44+
if [[ "${VERSION}" != "v$(cat wheelhouse.version)" ]]; then
45+
echo "${VERSION} != v$(cat wheelhouse.version)"
46+
exit 1
47+
fi
48+
49+
python3 tools/release/note_take.py ${VERSION}
50+
51+
echo "::set-output name=tag::${VERSION}"
52+
echo "::set-output name=name::TensorFlow I/O ${VERSION:1}"
53+
echo "::set-output name=commit::${COMMIT}"
54+
id: info
55+
- run: |
56+
set -x -e
57+
echo ${{ steps.info.outputs.tag }}
58+
echo ${{ steps.info.outputs.name }}
59+
echo ${{ steps.info.outputs.commit }}
60+
cat CURRENT.md
61+
- uses: softprops/action-gh-release@v1
62+
with:
63+
body_path: CURRENT.md
64+
name: ${{ steps.info.outputs.name }}
65+
tag_name: ${{ steps.info.outputs.tag }}
66+
target_commitish: ${{ steps.info.outputs.commit }}
67+
draft: true
68+
- uses: pypa/gh-action-pypi-publish@master
69+
with:
70+
user: __token__
71+
password: ${{ secrets.TEST_PYPI_TOKEN }}
72+
repository_url: https://test.pypi.org/legacy/
73+
#- uses: pypa/gh-action-pypi-publish@master
74+
# with:
75+
# user: __token__
76+
# password: ${{ secrets.PYPI_TOKEN }}
77+

.github/workflows/reviewdog.yml

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
name: Reviewdog
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
bazel:
10+
name: Bazel Buildifier
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v2
14+
- run: |
15+
sudo python3 -m pip install -U numpy
16+
bazel run -s --verbose_failures --experimental_repo_remote_exec //tools/lint:lint -- bazel
17+
- uses: reviewdog/action-suggester@v1
18+
black:
19+
name: Python Black
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v2
23+
- run: |
24+
sudo python3 -m pip install -U numpy
25+
bazel run -s --verbose_failures --experimental_repo_remote_exec //tools/lint:lint -- black
26+
- uses: reviewdog/action-suggester@v1
27+
clang:
28+
name: Clang Format
29+
runs-on: ubuntu-latest
30+
steps:
31+
- uses: actions/checkout@v2
32+
- run: |
33+
sudo python3 -m pip install -U numpy
34+
bazel run -s --verbose_failures --experimental_repo_remote_exec //tools/lint:lint -- clang
35+
- uses: reviewdog/action-suggester@v1
36+
pyupgrade:
37+
name: Python Pyupgrade
38+
runs-on: ubuntu-latest
39+
steps:
40+
- uses: actions/checkout@v2
41+
- run: |
42+
sudo python3 -m pip install -U numpy
43+
bazel run -s --verbose_failures --experimental_repo_remote_exec //tools/lint:lint -- pyupgrade
44+
- uses: reviewdog/action-suggester@v1

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -126,6 +126,7 @@ of releases [here](https://github.com/tensorflow/io/releases).
126126

127127
| TensorFlow I/O Version | TensorFlow Compatibility | Release Date |
128128
| --- | --- | --- |
129+
| 0.24.0 | 2.8.x | Feb 04, 2022 |
129130
| 0.23.1 | 2.7.x | Dec 15, 2021 |
130131
| 0.23.0 | 2.7.x | Dec 14, 2021 |
131132
| 0.22.0 | 2.7.x | Nov 10, 2021 |

0 commit comments

Comments
 (0)