From 6b8de8ac69d02ab920a64be27014107db8e42e23 Mon Sep 17 00:00:00 2001 From: "A. Unique TensorFlower" Date: Thu, 26 May 2016 09:28:51 -0800 Subject: [PATCH] In graph_actions, makes sure monitors run only in chief. Change: 123332078 --- tensorflow/contrib/learn/python/learn/graph_actions.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/tensorflow/contrib/learn/python/learn/graph_actions.py b/tensorflow/contrib/learn/python/learn/graph_actions.py index 898590e52ff..1a69e291d1c 100644 --- a/tensorflow/contrib/learn/python/learn/graph_actions.py +++ b/tensorflow/contrib/learn/python/learn/graph_actions.py @@ -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(),