Internal contrib changes
PiperOrigin-RevId: 289918555 Change-Id: Ieeb986b4f35086903e31d87422e61da560ee3fc3
This commit is contained in:
parent
3feb0cbaa7
commit
18369ac065
@ -23,10 +23,6 @@ from __future__ import print_function
|
||||
# pylint: disable=g-bad-import-order
|
||||
from tensorflow.python import pywrap_tensorflow # pylint: disable=unused-import
|
||||
|
||||
from tensorflow.python.util.lazy_loader import LazyLoader
|
||||
contrib = LazyLoader('contrib', globals(), 'tensorflow.contrib')
|
||||
del LazyLoader
|
||||
|
||||
from tensorflow.python.platform import flags # pylint: disable=g-import-not-at-top
|
||||
from tensorflow.python.platform import app # pylint: disable=g-import-not-at-top
|
||||
app.flags = flags
|
||||
|
@ -173,6 +173,8 @@ class TFModuleWrapper(types.ModuleType):
|
||||
attr_map[name] = attr
|
||||
return attr
|
||||
|
||||
# Placeholder for Google-internal contrib error
|
||||
|
||||
attr = super(TFModuleWrapper, self).__getattribute__(name)
|
||||
|
||||
# Return and cache dunders and our own members.
|
||||
@ -191,6 +193,8 @@ class TFModuleWrapper(types.ModuleType):
|
||||
try:
|
||||
attr = getattr(self._tfmw_wrapped_module, name)
|
||||
except AttributeError:
|
||||
# Placeholder for Google-internal contrib error
|
||||
|
||||
if not self._tfmw_public_apis:
|
||||
raise
|
||||
if name not in self._tfmw_public_apis:
|
||||
|
Loading…
Reference in New Issue
Block a user