Skip to content

Commit

Permalink
Change keras to use dtensor public API.
Browse files Browse the repository at this point in the history
PiperOrigin-RevId: 438605222
  • Loading branch information
qlzh727 authored and tensorflower-gardener committed Mar 31, 2022
1 parent c9e2b4d commit 55476a8
Showing 1 changed file with 1 addition and 4 deletions.
5 changes: 1 addition & 4 deletions keras/dtensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,11 +19,8 @@

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


0 comments on commit 55476a8

Please sign in to comment.