Water down some tests so they work in the Python 2.7.9 release builds
authorAllen Lavoie <allenl@google.com>
Fri, 6 Apr 2018 23:50:01 +0000 (16:50 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Fri, 6 Apr 2018 23:52:18 +0000 (16:52 -0700)
Removing reference cycle checks from the tests that failed in
http://ci.tensorflow.org/view/Release/job/release-debian-cpu/99/consoleFull

uuid4() created reference cycles until Python 2.7.11. Removes checks for
reference cycles from tests which indirectly call it.

This issue will probably keep coming up until we move off of 2.7.9 (since
there's no presubmit), but this CL is an effort to fix the issues that came up
for the 1.7 release.

PiperOrigin-RevId: 191959519

tensorflow/contrib/eager/python/BUILD
tensorflow/contrib/eager/python/checkpointable_utils_test.py

index edb9130..4e08850 100644 (file)
@@ -272,8 +272,7 @@ cuda_py_test(
         "//tensorflow/python/keras",
     ],
     tags = [
-        "no_oss",  # b/74395663
         "no_windows",  # TODO: needs investigation on Windows
-        "notsan",
+        "notsan",  # b/74395663
     ],
 )
index 891c093..e6498dd 100644 (file)
@@ -714,7 +714,7 @@ class CheckpointingTests(test.TestCase):
     status.run_restore_ops()
     self.assertEqual(-14., self.evaluate(loaded_dep_after_var.dep.var))
 
-  @test_util.run_in_graph_and_eager_modes(assert_no_eager_garbage=True)
+  @test_util.run_in_graph_and_eager_modes()
   def testDeferredSlotRestoration(self):
     checkpoint_directory = self.get_temp_dir()
 
@@ -779,7 +779,7 @@ class CheckpointingTests(test.TestCase):
       self.evaluate(train_op)
     slot_status.assert_consumed()
 
-  @test_util.run_in_graph_and_eager_modes(assert_no_eager_garbage=True)
+  @test_util.run_in_graph_and_eager_modes()
   def testOverlappingRestores(self):
     checkpoint_directory = self.get_temp_dir()
     save_root = checkpointable.Checkpointable()
@@ -830,7 +830,7 @@ class CheckpointingTests(test.TestCase):
     second_status.run_restore_ops()
     self.assertEqual(12., self.evaluate(load_dep.var))
 
-  @test_util.run_in_graph_and_eager_modes(assert_no_eager_garbage=True)
+  @test_util.run_in_graph_and_eager_modes()
   def testAmbiguousLoad(self):
     # Not OK to split one checkpoint object into two
     checkpoint_directory = self.get_temp_dir()
@@ -853,7 +853,7 @@ class CheckpointingTests(test.TestCase):
                                  "resolved to different objects"):
       load_root.dep_two.dep_three = checkpointable.Checkpointable()
 
-  @test_util.run_in_graph_and_eager_modes(assert_no_eager_garbage=True)
+  @test_util.run_in_graph_and_eager_modes()
   def testObjectsCombined(self):
     # Currently fine to load two checkpoint objects into one Python object
     checkpoint_directory = self.get_temp_dir()
@@ -1154,7 +1154,7 @@ class CheckpointingTests(test.TestCase):
 
 class TemplateTests(test.TestCase):
 
-  @test_util.run_in_graph_and_eager_modes(assert_no_eager_garbage=True)
+  @test_util.run_in_graph_and_eager_modes()
   def test_checkpointable_save_restore(self):
 
     def _templated():
@@ -1185,7 +1185,7 @@ class TemplateTests(test.TestCase):
     self.assertAllEqual([13.], self.evaluate(var_plus_one))
     self.assertAllEqual([14.], self.evaluate(var2))
 
-  @test_util.run_in_graph_and_eager_modes(assert_no_eager_garbage=True)
+  @test_util.run_in_graph_and_eager_modes()
   def test_checkpointable_save_restore_nested(self):
 
     def _inner_template():