diff options
author | 2016-05-10 08:37:09 -0800 | |
---|---|---|
committer | 2016-05-10 09:42:08 -0700 | |
commit | d02e9d0b3cca3b8a74ab26c6a362b8cb5a3e8c3f (patch) | |
tree | 8d5168086954343dd3d0a7b3f09dbc16b5fff6c8 /tensorflow/python/training/coordinator.py | |
parent | 14b28d1707750e151a058d2471bf74d6964824e2 (diff) |
Add an option to not close the summary_writer when stopping the coordinator
in managed_session().
This is useful when writing generic evaluation loops where the eval code just
wants to continue appending events to the same event files across runs.
Also log the exception class when reporting an exception from the Coordinator.
Change: 121955254
Diffstat (limited to 'tensorflow/python/training/coordinator.py')
-rw-r--r-- | tensorflow/python/training/coordinator.py | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/tensorflow/python/training/coordinator.py b/tensorflow/python/training/coordinator.py index a4c9880b66..b8a83af985 100644 --- a/tensorflow/python/training/coordinator.py +++ b/tensorflow/python/training/coordinator.py @@ -187,11 +187,13 @@ class Coordinator(object): if not self._stop_event.is_set(): if ex and self._exc_info_to_raise is None: if isinstance(ex, tuple): - logging.info("Error reported to Coordinator: %s", + logging.info("Error reported to Coordinator: %s, %s", + type(ex[1]), compat.as_str_any(ex[1])) self._exc_info_to_raise = ex else: - logging.info("Error reported to Coordinator: %s", + logging.info("Error reported to Coordinator: %s, %s", + type(ex), compat.as_str_any(ex)) self._exc_info_to_raise = sys.exc_info() # self._exc_info_to_raise should contain a tuple containing exception |