Remove "everything matched" assertions from CuDNN object-based checkpointing tests
authorAllen Lavoie <allenl@google.com>
Thu, 26 Apr 2018 17:30:54 +0000 (10:30 -0700)
committerTensorFlower Gardener <gardener@tensorflow.org>
Thu, 26 Apr 2018 17:33:31 +0000 (10:33 -0700)
After cl/194315742 the assertions correctly point out that there are some Python objects which aren't matched (they don't have variables). Another option would be to mark these as special/optional, which we can implement if there's a need.

PiperOrigin-RevId: 194416864

tensorflow/contrib/cudnn_rnn/python/kernel_tests/cudnn_rnn_test.py

index 012b17c..33ddfb8 100644 (file)
@@ -717,7 +717,7 @@ class CudnnRNNTestSaveRestoreCheckpointable(test_util.TensorFlowTestCase):
       inputs = 3. * array_ops.ones([num_applications, num_layers, input_size],
                                    dtype=dtypes.float32)
       cudnn_output, _ = cudnn_layer(inputs)
-      status.assert_consumed().run_restore_ops()
+      status.run_restore_ops()
     second_save_path = cudnn_checkpoint.save(checkpoint_prefix)
     restore_layer = compatible_cell_fn()
     restore_layer_checkpoint = checkpointable_utils.Checkpoint(
@@ -728,7 +728,7 @@ class CudnnRNNTestSaveRestoreCheckpointable(test_util.TensorFlowTestCase):
       restore_layer_output, current_state = restore_layer(
           inputs=3. * array_ops.ones([1, input_size]),
           state=current_state)
-    status.assert_consumed().run_restore_ops()
+    status.run_restore_ops()
     self.assertTrue(restore_layer.variables)
     for variable, expected_value in zip(
         restore_layer.variables, expected_variable_values):