Skip to content

Commit

Permalink
fix use monotonic time
Browse files Browse the repository at this point in the history
  • Loading branch information
samsja committed Jun 10, 2024
1 parent 050bb63 commit c84e6dd
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions hivemind/averaging/averager.py
Original file line number Diff line number Diff line change
Expand Up @@ -701,7 +701,7 @@ async def _load_state_from_peers(self, future: MPFuture, timeout: Optional[float
metadata = None
for peer in sorted(peer_priority.keys(), key=peer_priority.get, reverse=True):
if peer != self.peer_id:
t0 = time.time()
t0 = time.monotonic()
logger.info(f"Downloading parameters from peer {peer}")
try:
stub = self.get_stub(self._p2p, peer, namespace=self.prefix)
Expand All @@ -724,7 +724,7 @@ async def _load_state_from_peers(self, future: MPFuture, timeout: Optional[float
logger.debug(f"Peer {peer} did not send its state")
continue

t1 = time.time()
t1 = time.monotonic()
logger.info(f"Finished downloading state in {t1 - t0:.3f}s from {peer}")
future.set_result((metadata, tensors))
return
Expand Down

0 comments on commit c84e6dd

Please sign in to comment.