MCPcopy Create free account
hub / github.com/Closed11/Unsupervised-Image-Classification / format

Method format

UIC/util.py:26–36  ·  view source on GitHub ↗
(self, record)

Source from the content-addressed store, hash-verified

24 self.start_time = time.time()
25
26 def format(self, record):
27 elapsed_seconds = round(record.created - self.start_time)
28
29 prefix = "%s - %s - %s" % (
30 record.levelname,
31 time.strftime('%x %X'),
32 timedelta(seconds=elapsed_seconds)
33 )
34 message = record.getMessage()
35 message = message.replace('\n', '\n' + ' ' * (len(prefix) + 3))
36 return "%s - %s" % (prefix, message) if message else ''
37
38
39def create_logger(filepath):

Callers 6

trainFunction · 0.80
validateFunction · 0.80
mainFunction · 0.80
trainFunction · 0.80
compute_labelsFunction · 0.80
__init__Method · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected