Preparation for making local executor the default executor.
Don't drop into graph mode when doing TF 1.x style serialization. The decorator
will do this internally for the user.
# limitations under the License.
"""General purpose test utilities for TFF."""
+from absl import logging
from absl.testing import parameterized
import tensorflow as tf
@@ -37,8 +38,9 @@ def tf1_and_tf2(fn):
"""
def wrapped_fn(self):
+ logging.info('Testing under tff.tf2_computation')
fn(self, computations.tf2_computation)
- with tf.Graph().as_default():
+ logging.info('Testing under tff.tf_computation')
fn(self, computations.tf_computation)
return wrapped_fn
@@ -48,7 +50,6 @@ def tf1(fn):
"""A decorator for testing the `tff.tf_computation` decorator."""
def wrapped_fn(self):
- with tf.Graph().as_default():
fn(self, computations.tf_computation)
return wrapped_fn
