File tree Expand file tree Collapse file tree 2 files changed +12
-1
lines changed
Expand file tree Collapse file tree 2 files changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -57,7 +57,8 @@ def Load(self):
5757 # GetNext() expects a status argument on TF <= 1.7
5858 with tf .errors .raise_exception_on_not_ok_status () as status :
5959 self ._reader .GetNext (status )
60- except (tf .errors .DataLossError , tf .errors .OutOfRangeError ):
60+ except (tf .errors .DataLossError , tf .errors .OutOfRangeError ) as e :
61+ tf .logging .debug ('Cannot read more events: %s' , e )
6162 # We ignore partial read exceptions, because a record may be truncated.
6263 # PyRecordReader holds the offset prior to the failed read, so retrying
6364 # will succeed.
Original file line number Diff line number Diff line change 2525from __future__ import division
2626from __future__ import print_function
2727
28+ # pylint: disable=g-import-not-at-top
29+ # Disable the TF GCS filesystem cache which interacts pathologically with the
30+ # pattern of reads used by TensorBoard for logdirs. See for details:
31+ # https://github.com/tensorflow/tensorboard/issues/1225
32+ # This must be set before the first import of tensorflow.
33+ import os
34+ os .environ ['GCS_READ_CACHE_DISABLED' ] = '1'
35+
2836import tensorflow as tf
2937
38+ # pylint: enable=g-import-not-at-top
39+
3040from tensorboard import default
3141from tensorboard import program
3242
You can’t perform that action at this time.
0 commit comments