提交 e19c23fd 编写于 作者: J Justine Tunney 提交者: TensorFlower Gardener

TensorBoard: Ignore deleted files on Colossus

Change: 137907844
上级 0c8417f1
......@@ -19,6 +19,7 @@ from __future__ import print_function
import collections
import os.path
import re
import threading
import numpy as np
......@@ -98,10 +99,18 @@ STORE_EVERYTHING_SIZE_GUIDANCE = {
HISTOGRAMS: 0,
}
# When files on Colossus are deleted, they are actually renamed.
_CNS_DELETED_FILE_PATTERN = re.compile(r'\.~\d+~(/|$)')
def IsTensorFlowEventsFile(path):
"""Check the path name to see if it is probably a TF Events file."""
return 'tfevents' in compat.as_str_any(os.path.basename(path))
if 'tfevents' not in compat.as_str_any(os.path.basename(path)):
return False
if _CNS_DELETED_FILE_PATTERN.search(path):
logging.info('Ignoring deleted Colossus file: %s', path)
return False
return True
class EventAccumulator(object):
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册