MCPcopy Create free account
hub / github.com/PolymathicAI/AstroCLIP / __init__

Method __init__

astroclip/astrodino/utils.py:160–166  ·  view source on GitHub ↗
(self, window_size=20, fmt=None)

Source from the content-addressed store, hash-verified

158 """
159
160 def __init__(self, window_size=20, fmt=None):
161 if fmt is None:
162 fmt = "{median:.4f} ({global_avg:.4f})"
163 self.deque = deque(maxlen=window_size)
164 self.total = 0.0
165 self.count = 0
166 self.fmt = fmt
167
168 def update(self, value, num=1):
169 self.deque.append(value)

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected