← back to Exo
faster initial node discovery
5c3f0e3ac67109ee76806b17ea1f35b223cb9e0f · 2024-07-17 17:11:50 -0700 · Alex Cheema
Files touched
M exo/networking/grpc/grpc_discovery.py
Diff
commit 5c3f0e3ac67109ee76806b17ea1f35b223cb9e0f
Author: Alex Cheema <alexcheema123@gmail.com>
Date: Wed Jul 17 17:11:50 2024 -0700
faster initial node discovery
---
exo/networking/grpc/grpc_discovery.py | 3 +--
1 file changed, 1 insertion(+), 2 deletions(-)
diff --git a/exo/networking/grpc/grpc_discovery.py b/exo/networking/grpc/grpc_discovery.py
index db4dd579..afc57971 100644
--- a/exo/networking/grpc/grpc_discovery.py
+++ b/exo/networking/grpc/grpc_discovery.py
@@ -51,11 +51,10 @@ class GRPCDiscovery(Discovery):
while True:
initial_peer_count = len(self.known_peers)
if DEBUG_DISCOVERY >= 2: print(f"Current number of known peers: {initial_peer_count}. Waiting {grace_period} seconds to discover more...")
- await asyncio.sleep(grace_period)
if len(self.known_peers) == initial_peer_count:
if wait_for_peers > 0:
+ await asyncio.sleep(grace_period)
if DEBUG_DISCOVERY >= 2: print(f"Waiting additional {wait_for_peers} seconds for more peers.")
- await asyncio.sleep(wait_for_peers)
wait_for_peers = 0
else:
if DEBUG_DISCOVERY >= 2: print("No new peers discovered in the last grace period. Ending discovery process.")
← 8a35fd83 support chatgpt api endpoint fron any node #24
·
back to Exo
·
default to llama-3-8b and temperature=0 if not provided 5de2ea51 →