diff options
author | A. Unique TensorFlower <gardener@tensorflow.org> | 2016-06-27 10:36:15 -0800 |
---|---|---|
committer | TensorFlower Gardener <gardener@tensorflow.org> | 2016-06-27 11:47:45 -0700 |
commit | f190ef926830aa6be0af479d0ba8784c25c9f348 (patch) | |
tree | 40a4dcc134f26e53269e904db7a71d9eb1b30dbd | |
parent | e95f2697bbd2eebc1229c73ba2dde7ce0b4d191a (diff) |
Do not let workers other than the chief create tfevents files.
Change: 125979359
-rw-r--r-- | tensorflow/contrib/learn/python/learn/estimators/estimator.py | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/tensorflow/contrib/learn/python/learn/estimators/estimator.py b/tensorflow/contrib/learn/python/learn/estimators/estimator.py index 208d3465f2..87776da30b 100644 --- a/tensorflow/contrib/learn/python/learn/estimators/estimator.py +++ b/tensorflow/contrib/learn/python/learn/estimators/estimator.py @@ -489,15 +489,16 @@ class BaseEstimator(sklearn.BaseEstimator): # Add default monitors. if monitors is None: monitors = [] - monitors += monitors_lib.get_default_monitors( - loss_op=loss_op, - summary_op=logging_ops.get_summary_op(), - save_summary_steps=self._config.save_summary_steps, - summary_writer=graph_actions.get_summary_writer(self._model_dir)) is_chief = self._config.task == 0 - if not is_chief: - # Run monitors only on chief. + + if is_chief: + monitors += monitors_lib.get_default_monitors( + loss_op=loss_op, + summary_op=logging_ops.get_summary_op(), + save_summary_steps=self._config.save_summary_steps, + summary_writer=graph_actions.get_summary_writer(self._model_dir)) + else: monitors = [] # Setup monitors. |