Skip to content

Commit 1d0358f

Browse files
authored
Allow ops_test.py to run with the api folder collapsed at the root. (#21360)
Which is the setup in the wheel file.
1 parent 771b001 commit 1d0358f

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

keras/src/ops/ops_test.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,11 @@
22

33
from absl.testing import parameterized
44

5-
from keras.api import ops as api_ops_root
5+
try:
6+
from keras.api import ops as api_ops_root
7+
except ImportError:
8+
from keras import ops as api_ops_root
9+
610
from keras.src import backend
711
from keras.src import ops
812
from keras.src import testing

0 commit comments

Comments
 (0)