MCPcopy Create free account
hub / github.com/InternScience/InternAgent / AVGMeter

Class AVGMeter

tasks/AutoPower/code/src/utils.py:56–70  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

54
55
56class AVGMeter():
57 def __init__(self):
58 self.value = 0
59 self.cnt = 0
60
61 def update(self, v_new):
62 self.value += v_new
63 self.cnt += 1
64
65 def agg(self):
66 return self.value / self.cnt
67
68 def reset(self):
69 self.value = 0
70 self.cnt = 0
71
72
73class Reporter():

Callers 2

exec_epochMethod · 0.90
exec_epochMethod · 0.90

Calls

no outgoing calls

Tested by

no test coverage detected