Skip to content

Commit b78ec32

Browse files
fineguyThe TensorFlow Datasets Authors
authored andcommitted
Pin tensorflow<2.20.0.
PiperOrigin-RevId: 795403112
1 parent 5afdc02 commit b78ec32

File tree

5 files changed

+10
-17
lines changed

5 files changed

+10
-17
lines changed

.github/actions/setup/action.yml

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,6 @@ name: 'Setup'
22
description: 'Common setup for workflows.'
33

44
inputs:
5-
tf-version:
6-
description: 'Tensorflow version'
7-
required: false
8-
default: 'skip' # Use sentinel value to skip Tensorflow installation
95
python-version:
106
description: 'Python version'
117
required: false
@@ -67,9 +63,6 @@ runs:
6763
- if: ${{ steps.python-cache.outputs.cache-hit != 'true' }}
6864
run: pip install .[${{ inputs.extras }}]
6965
shell: bash
70-
- if: ${{ inputs.tf-version != 'skip' }}
71-
run: pip install ${{ inputs.tf-version }}
72-
shell: bash
7366
# Get TFDS library from the repository instead of cache.
7467
- run: echo "PYTHONPATH=$(pwd)" >> $GITHUB_ENV
7568
shell: bash

.github/workflows/pytest-optional.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,5 +44,5 @@ jobs:
4444
name: 'Core TFDS tests'
4545
uses: ./.github/workflows/pytest-template.yml
4646
with:
47-
tf-version: ${{ matrix.tf-version }}
4847
os-version: ${{ matrix.os-version }}
48+
extras: tests-all,${{ matrix.tf-version }}

.github/workflows/pytest-template.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,10 @@ on:
44
os-version:
55
required: true
66
type: string
7-
tf-version:
8-
required: true
7+
extras:
8+
required: false
99
type: string
10+
default: 'tests-all'
1011

1112
env:
1213
PYTEST_NUM_SHARDS: 4 # Controls tests sharding enabled by `pytest-shard`
@@ -47,8 +48,8 @@ jobs:
4748
- uses: actions/checkout@v3
4849
- uses: ./.github/actions/setup
4950
with:
50-
tf-version: ${{ inputs.tf-version }}
5151
python-version: ${{ matrix.python-version }}
52+
extras: ${{ inputs.extras }}
5253

5354
# Run tests
5455
# Ignores:

.github/workflows/pytest.yml

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -49,8 +49,8 @@ jobs:
4949
name: 'Core TFDS tests'
5050
uses: ./.github/workflows/pytest-template.yml
5151
with:
52-
tf-version: tensorflow
5352
os-version: ubuntu-22.04
53+
extras: tests-all,tensorflow
5454

5555
huggingface-pytest-job:
5656
needs: activate-tests
@@ -66,9 +66,8 @@ jobs:
6666
- uses: actions/checkout@v3
6767
- uses: ./.github/actions/setup
6868
with:
69-
tf-version: tensorflow
7069
python-version: '3.10'
71-
extras: huggingface
70+
extras: huggingface,tensorflow
7271

7372
- name: Run HuggingFace tests
7473
run: |
@@ -88,7 +87,7 @@ jobs:
8887
- uses: actions/checkout@v3
8988
- uses: ./.github/actions/setup
9089
with:
91-
tf-version: tensorflow
90+
extras: tests-all,tensorflow
9291

9392
- name: Run Github API tests
9493
run: pytest --durations=100 -vv -n auto tensorflow_datasets/core/github_api/github_path_test.py
@@ -107,7 +106,7 @@ jobs:
107106
- uses: actions/checkout@v3
108107
- uses: ./.github/actions/setup
109108
with:
110-
tf-version: tensorflow
109+
extras: tests-all,tensorflow
111110
use-cache: false
112111

113112
# Test each notebook sequentially.

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -217,7 +217,7 @@
217217

218218
EXTRAS = {
219219
'matplotlib': ['matplotlib'],
220-
'tensorflow': ['tensorflow>=2.1'],
220+
'tensorflow': ['tensorflow>=2.1,<2.20.0'],
221221
'tf-nightly': ['tf-nightly'],
222222
'tensorflow-data-validation': ['tensorflow-data-validation'],
223223
'tests-all': TESTS_ALL_DEPENDENCIES,

0 commit comments

Comments
 (0)