MCPcopy Index your code
hub / github.com/tensorpack/tensorpack / _write_stat

Method _write_stat

tensorpack/callbacks/monitor.py:400–407  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

398 self._write_stat()
399
400 def _write_stat(self):
401 tmp_filename = self._fname + '.tmp'
402 try:
403 with open(tmp_filename, 'w') as f:
404 json.dump(self._stats, f)
405 shutil.move(tmp_filename, self._fname)
406 except IOError: # disk error sometimes..
407 logger.exception("Exception in JSONWriter._write_stat()!")
408
409
410class ScalarPrinter(MonitorBase):

Callers 1

_triggerMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected