Remove ReplicaContext.__enter__ and __exit__ methods from the docs since users are not expected to use them directly.

PiperOrigin-RevId: 320129981
Change-Id: Ifd3ec638549de95c01147560260b8ecf7f17e29d
This commit is contained in:
Priya Gupta 2020-07-07 22:56:56 -07:00 committed by TensorFlower Gardener
parent 014cdf65ab
commit 6fd3e5e217

View File

@ -2728,6 +2728,7 @@ class ReplicaContext(object):
self._replica_id_in_sync_group = replica_id_in_sync_group
self._summary_recording_distribution_strategy = None
@doc_controls.do_not_generate_docs
def __enter__(self):
_push_per_thread_mode(self._thread_context)
@ -2740,6 +2741,7 @@ class ReplicaContext(object):
summary_state.is_recording_distribution_strategy)
summary_state.is_recording_distribution_strategy = replica_id_is_zero
@doc_controls.do_not_generate_docs
def __exit__(self, exception_type, exception_value, traceback):
summary_state = summary_ops_v2._summary_state # pylint: disable=protected-access
summary_state.is_recording_distribution_strategy = (