aboutsummaryrefslogtreecommitdiffhomepage
path: root/tensorflow/python/framework
diff options
context:
space:
mode:
authorGravatar Skye Wanderman-Milne <skyewm@google.com>2018-09-11 13:46:29 -0700
committerGravatar TensorFlower Gardener <gardener@tensorflow.org>2018-09-11 13:50:50 -0700
commitda99f7ca018d4916447d7b984d9d65be1a9615a8 (patch)
tree3500e0b7b114e135254187c85732827abda2f20b /tensorflow/python/framework
parent418c7258687166fc79a04f5a8c903c782a8ad295 (diff)
Make control_flow_ops._ENABLE_COND_V2 public.
Note this is not part of the official public API, but we do allow other modules to modify this value (e.g. in tests). PiperOrigin-RevId: 212512883
Diffstat (limited to 'tensorflow/python/framework')
-rw-r--r--tensorflow/python/framework/test_util.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/tensorflow/python/framework/test_util.py b/tensorflow/python/framework/test_util.py
index b33cc8f544..6a2c897f3f 100644
--- a/tensorflow/python/framework/test_util.py
+++ b/tensorflow/python/framework/test_util.py
@@ -413,15 +413,13 @@ def enable_cond_v2(fn):
The wrapped function
"""
- # pylint: disable=protected-access
def wrapper(*args, **kwargs):
- prev_value = control_flow_ops._ENABLE_COND_V2
- control_flow_ops._ENABLE_COND_V2 = True
+ prev_value = control_flow_ops.ENABLE_COND_V2
+ control_flow_ops.ENABLE_COND_V2 = True
try:
fn(*args, **kwargs)
finally:
- control_flow_ops._ENABLE_COND_V2 = prev_value
- # pylint: enable=protected-access
+ control_flow_ops.ENABLE_COND_V2 = prev_value
return wrapper
@@ -438,7 +436,7 @@ def with_cond_v2(cls):
Returns:
cls with new test methods added
"""
- if control_flow_ops._ENABLE_COND_V2:
+ if control_flow_ops.ENABLE_COND_V2:
return cls
for name, value in cls.__dict__.copy().items():