From 989c8b40a9b3b7bd45aedef43315675b0d4baf8d Mon Sep 17 00:00:00 2001 From: Adam Roberts Date: Tue, 8 Jan 2019 12:03:30 -0800 Subject: [PATCH] Disable writing examples/sec and global_step/sec summaries on TPU if save_summary_steps is Falsey. PiperOrigin-RevId: 228373932 --- tensorflow/contrib/tpu/python/tpu/tpu_estimator.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorflow/contrib/tpu/python/tpu/tpu_estimator.py b/tensorflow/contrib/tpu/python/tpu/tpu_estimator.py index 98babbb5438..23173000414 100644 --- a/tensorflow/contrib/tpu/python/tpu/tpu_estimator.py +++ b/tensorflow/contrib/tpu/python/tpu/tpu_estimator.py @@ -2654,7 +2654,7 @@ class TPUEstimator(estimator_lib.Estimator): if self._log_every_n_steps is not None: examples_hook = ExamplesPerSecondHook( ctx.global_batch_size, - output_dir=self.model_dir, + output_dir=self.model_dir if config.save_summary_steps else None, every_n_steps=self._log_every_n_steps) if ctx.is_running_on_cpu(is_export_mode=is_export_mode):