MCPcopy Create free account
hub / github.com/Relento/lego_release / __init__

Method __init__

tu/loggers/visualizer.py:15–26  ·  view source on GitHub ↗
(self, opt)

Source from the content-addressed store, hash-verified

13
14class HTMLVisualizer(BaseHTMLHelper):
15 def __init__(self, opt):
16
17 self.vis = HTMLTableVisualizer(visdir=os.path.join(opt.checkpoints_dir, opt.name, 'web'),
18 title=f"{opt.name}_{datetime.datetime.now().strftime('%Y_%m%d_%H%M_%S')}",
19 persist_row_counter=False) # rewritten each time so not persisting row counts
20
21 # create a logging file to store training losses
22 os.makedirs(os.path.join(opt.checkpoints_dir, opt.name), exist_ok=True)
23 self.log_name = os.path.join(opt.checkpoints_dir, opt.name, 'loss_log.txt')
24 # with open(self.log_name, "a") as log_file:
25 # now = time.strftime("%c")
26 # log_file.write('================ Training Loss (%s) ================\n' % now)
27
28 def reset(self):
29 """Reset the self.saved status"""

Callers

nothing calls this directly

Calls 1

HTMLTableVisualizerClass · 0.90

Tested by

no test coverage detected