Skip to content

Commit 55476a8

Browse files
qlzh727tensorflower-gardener
authored andcommitted
Change keras to use dtensor public API.
PiperOrigin-RevId: 438605222
1 parent c9e2b4d commit 55476a8

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

keras/dtensor/__init__.py

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -19,11 +19,8 @@
1919

2020
# Conditional import the dtensor API, since it is currently broken in OSS.
2121
if _DTENSOR_API_ENABLED:
22-
# pylint: disable=g-direct-tensorflow-import, g-import-not-at-top
23-
from tensorflow.dtensor import python as dtensor_api
22+
from tensorflow.compat.v2.experimental import dtensor as dtensor_api # pylint: disable=g-import-not-at-top
2423
else:
2524
# Leave it with a placeholder, so that the import line from other python file
2625
# will not break.
2726
dtensor_api = None
28-
29-

0 commit comments

Comments
 (0)