-
Notifications
You must be signed in to change notification settings - Fork 290
91 lines (88 loc) · 4.12 KB
/
benchmarks.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
name: API Performance Benchmarks
on:
push:
branches:
- master
jobs:
macos:
if: github.repository == 'tensorflow/io' # Don't do this in forks
name: macOS ${{ matrix.python }} + ${{ matrix.version }}
runs-on: macos-latest
strategy:
fail-fast: false
matrix:
python: ['3.8']
version: ['tensorflow:tensorflow-io-nightly', 'tensorflow:tensorflow-io']
steps:
- uses: actions/checkout@v2
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Setup macOS
run: |
set -x -e
python -m pip install -U wheel setuptools
python --version
- name: Benchmark on macOS
run: |
set -x -e
python --version
df -h
rm -rf tensorflow_io
rm -rf tensorflow_io_gcs_filesystem
export TF_USE_MODULAR_FILESYSTEM=1
echo ${{ matrix.version }} | awk -F: '{print $1}' | xargs python -m pip install -U
echo ${{ matrix.version }} | awk -F: '{print $2}' | xargs python -m pip install --no-deps -U
python -m pip install tensorflow-io-gcs-filesystem-nightly
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
python -m pip freeze
python -c 'import tensorflow as tf; print(tf.version.VERSION)'
python -c 'import tensorflow_io as tfio; print(tfio.version.VERSION)'
python -c 'from tensorflow_io_gcs_filesystem.core.python.ops import plugin_gs; print(plugin_gs)'
python -m pytest --benchmark-only -v --import-mode=append $(find . -type f \( -iname "test_*.py" ! \( -iname "test_*_v1.py" -o -iname "test_bigquery.py" \) \))
linux:
if: github.repository == 'tensorflow/io' # Don't do this in forks
name: Linux ${{ matrix.python }} + ${{ matrix.version }}
runs-on: ubuntu-20.04
strategy:
fail-fast: false
matrix:
python: ['3.8']
version: ['tensorflow:tensorflow-io-nightly', 'tensorflow:tensorflow-io']
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python }}
- name: Setup Linux
run: |
set -x -e
bash -x -e .github/workflows/build.space.sh
bash -x -e tests/test_sql/sql_test.sh
- name: Benchmark on Linux
run: |
set -x -e
python --version
df -h
rm -rf tensorflow_io
rm -rf tensorflow_io_gcs_filesystem
export TF_USE_MODULAR_FILESYSTEM=1
echo ${{ matrix.version }} | awk -F: '{print $1}' | xargs python -m pip install -U
echo ${{ matrix.version }} | awk -F: '{print $2}' | xargs python -m pip install --no-deps -U
python -m pip install tensorflow-io-gcs-filesystem-nightly
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
python -m pip freeze
python -c 'import tensorflow as tf; print(tf.version.VERSION)'
python -c 'import tensorflow_io as tfio; print(tfio.version.VERSION)'
python -c 'from tensorflow_io_gcs_filesystem.core.python.ops import plugin_gs; print(plugin_gs)'
python -m pytest --benchmark-only --benchmark-json benchmark.json -v --import-mode=append $(find . -type f \( -iname "test_*.py" ! \( -iname "test_*_v1.py" -o -iname "test_bigquery.py" \) \))
- name: Store benchmark result
uses: rhysd/github-action-benchmark@v1
with:
name: Tensorflow-IO Benchmarks
tool: 'pytest'
output-file-path: benchmark.json
github-token: ${{ secrets.GITHUB_TOKEN }}
auto-push: true