Temporarily disable multiple symbol check to fix windows build.
PiperOrigin-RevId: 301458183 Change-Id: I79b1f0f2bc0f986c480a54c9fa36671eded06095
This commit is contained in:
parent
adddc55204
commit
1cea2490cb
@ -341,9 +341,9 @@ class api_export(object): # pylint: disable=invalid-name
|
||||
# their own _tf_api_names as opposed to just inheriting it.
|
||||
if api_names_attr in func.__dict__:
|
||||
if not self._allow_multiple_exports:
|
||||
# TODO(annarev): temporarily removing check to fix builds.
|
||||
# Need to investigate why symbols get reported multiple times.
|
||||
return
|
||||
raise SymbolAlreadyExposedError(
|
||||
'Symbol %s is already exposed as %s.' %
|
||||
(func.__name__, getattr(func, api_names_attr))) # pylint: disable=protected-access
|
||||
setattr(func, api_names_attr, names)
|
||||
|
||||
def export_constant(self, module_name, name):
|
||||
|
@ -152,8 +152,7 @@ class ValidateExportTest(test.TestCase):
|
||||
(('NAME_E', 'NAME_F'), 0.5)],
|
||||
module2._tf_api_constants)
|
||||
|
||||
# TODO(b/151745456): re-enable
|
||||
def DISABLED_testRaisesExceptionIfAlreadyHasAPINames(self):
|
||||
def testRaisesExceptionIfAlreadyHasAPINames(self):
|
||||
_test_function._tf_api_names = ['abc']
|
||||
export_decorator = tf_export.tf_export('nameA', 'nameB')
|
||||
with self.assertRaises(tf_export.SymbolAlreadyExposedError):
|
||||
|
Loading…
Reference in New Issue
Block a user