justheuristic 4 éve
szülő
commit
b6c2cf65cd
1 módosított fájl, 3 hozzáadás és 0 törlés
  1. 3 0
      hivemind/optim/performance_ema.py

+ 3 - 0
hivemind/optim/performance_ema.py

@@ -44,6 +44,9 @@ class PerformanceEMA:
             self.timestamp = get_dht_time()
             self.paused = was_paused
 
+    def __repr__(self):
+        return f"{self.__class__.__name__}(ema={self.samples_per_second:.5f}, num_updates={self.num_updates})"
+
     @contextmanager
     def update_threadsafe(self, task_size: int):
         """measure the EMA throughout of the code that runs inside the context"""