Skip to content

Commit e503c51

Browse files
authored
Pin TF version to 2.5.0 or lower (#1613)
* pin tf version * tf version to <= 2.5.0 * update actions * update Co-authored-by: Haifeng Jin <haifeng-jin@users.noreply.github.com>
1 parent bd3dcaf commit e503c51

File tree

3 files changed

+4
-4
lines changed

3 files changed

+4
-4
lines changed

.github/workflows/actions.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
${{ runner.os }}-pip-
3030
- name: Install dependencies
3131
run: |
32-
pip install -e ".[tests]" --progress-bar off --upgrade
32+
pip install -e ".[tests]" --progress-bar off
3333
- name: Test with pytest
3434
run: |
3535
pytest --cov=autokeras --cov-report xml:coverage.xml

autokeras/engine/tuner.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,10 +117,10 @@ def get_output_layer(tensor):
117117
for layer in model.layers:
118118
if isinstance(layer, tf.keras.layers.InputLayer):
119119
continue
120-
if not isinstance(layer, preprocessing.PreprocessingLayer):
121-
break
122120
input_node = nest.flatten(layer.input)[0]
123121
if input_node is tensor:
122+
if not isinstance(layer, preprocessing.PreprocessingLayer):
123+
break
124124
return layer
125125
return None
126126

setup.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@
2121
install_requires=[
2222
"packaging",
2323
"keras-tuner>=1.0.2",
24-
"tensorflow>=2.3.0",
24+
"tensorflow<=2.5.0,>=2.3.0",
2525
"scikit-learn",
2626
"pandas",
2727
],

0 commit comments

Comments
 (0)