Skip to content

Commit

Permalink
skip tests for previos TF versions
Browse files Browse the repository at this point in the history
  • Loading branch information
arogozhnikov committed Apr 28, 2024
1 parent 8ae3852 commit e86704d
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 2 deletions.
7 changes: 5 additions & 2 deletions einops/layers/tensorflow.py
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
unfortunately instructions on creation of TF layers change constantly,
and changed way too many times at this point to remember what-compatible-where.
So just stating layers in einops==0.7.2 were implemented
according to official instructions for TF 2.16.
Layers in einops==0.7.0 (and several prior versions)
are compatible with TF 2.13
Layers in einops==0.7.1 were re-implemented
according to official instructions for TF 2.16
"""

Expand Down
4 changes: 4 additions & 0 deletions tests/test_layers.py
Original file line number Diff line number Diff line change
Expand Up @@ -244,6 +244,10 @@ def test_keras_layer():
pytest.skip()
else:
import tensorflow as tf

if tf.__version__ < "2.16.":
# current implementation of layers follows new TF interface
pytest.skip()
from tensorflow.keras.models import Sequential
from tensorflow.keras.layers import Conv2D as Conv2d, Dense as Linear, ReLU
from einops.layers.keras import Rearrange, Reduce, EinMix, keras_custom_objects
Expand Down

0 comments on commit e86704d

Please sign in to comment.