MCPcopy Create free account
hub / github.com/pytorch/pytorch / put_metric

Method put_metric

caffe2/python/parallel_workers.py:104–108  ·  view source on GitHub ↗
(self, key, value, count=True)

Source from the content-addressed store, hash-verified

102 print("Failed to call ExternalLogger: {}".format(e))
103
104 def put_metric(self, key, value, count=True):
105 self._metrics[key] += value
106 if count:
107 count_key = '{}_count'.format(key)
108 self._metrics[count_key] += 1
109
110
111class State():

Callers 4

finishMethod · 0.80
_enqueue_batchMethod · 0.80
finishMethod · 0.80

Calls 1

formatMethod · 0.45

Tested by

no test coverage detected