Internal change.

PiperOrigin-RevId: 236942537
This commit is contained in:
Anna R 2019-03-05 16:24:40 -08:00 committed by TensorFlower Gardener
parent d511fe4d28
commit 35d0488ab8
2 changed files with 2 additions and 0 deletions

View File

@ -295,6 +295,7 @@ class ApiCompatibilityTest(test.TestCase):
visitor.do_not_descend_map['tf'].append('contrib') visitor.do_not_descend_map['tf'].append('contrib')
if FLAGS.only_test_core_api: if FLAGS.only_test_core_api:
visitor.do_not_descend_map['tf'].extend(_NON_CORE_PACKAGES) visitor.do_not_descend_map['tf'].extend(_NON_CORE_PACKAGES)
visitor.private_map['tf.compat'] = ['v1', 'v2']
traverse.traverse(tf.compat.v2, visitor) traverse.traverse(tf.compat.v2, visitor)
def _checkBackwardsCompatibility(self, def _checkBackwardsCompatibility(self,

View File

@ -97,6 +97,7 @@ class TestUpgrade(test_util.TensorFlowTestCase):
cls.v2_symbols["tf." + name] = attr cls.v2_symbols["tf." + name] = attr
visitor = public_api.PublicAPIVisitor(symbol_collector) visitor = public_api.PublicAPIVisitor(symbol_collector)
visitor.private_map["tf.compat"] = ["v1"]
traverse.traverse(tf.compat.v2, visitor) traverse.traverse(tf.compat.v2, visitor)
if hasattr(tf.compat, "v1"): if hasattr(tf.compat, "v1"):