In graph_actions, makes sure monitors run only in chief.

Change: 123332078
This commit is contained in:
A. Unique TensorFlower 2016-05-26 09:28:51 -08:00 committed by TensorFlower Gardener
parent e8948a2d9d
commit 6b8de8ac69

View File

@ -195,7 +195,10 @@ def train(graph,
raise ValueError('No "global_step" was provided or found in the graph.')
# TODO(ipolosukhin): Replace all functionality of Supervisor with Monitors.
if not monitors:
if not supervisor_is_chief:
# monitors should run only in supervisor.
monitors = []
elif not monitors:
monitors = monitors_lib.get_default_monitors(
loss_op=loss_op,
summary_op=logging_ops.get_summary_op(),