Skip to content

Commit 1eef92f

Browse files
authored
Merge pull request #103 from Datura-ai/hotfix-main-bittensor
wait for synthetic task complete
2 parents 78bdc66 + 511b781 commit 1eef92f

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

validators/services/capacity.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ class CapacityService:
1010
def __init__(self, metagraph, dendrite):
1111
self.metagraph = metagraph
1212
self.dendrite: bt.dendrite = dendrite
13-
self.timeout = 4
13+
self.timeout = 30
1414
self.uid_to_capacity = {}
1515
self.remain_uid_to_capacity = {}
1616

validators/weight_setter.py

+4-1
Original file line numberDiff line numberDiff line change
@@ -348,7 +348,7 @@ async def get_available_uids(self):
348348
async def check_uid(self, axon, uid):
349349
"""Asynchronously check if a UID is available."""
350350
try:
351-
response = await self.dendrite(axon, IsAlive(), timeout=4)
351+
response = await self.dendrite(axon, IsAlive(), timeout=30)
352352
if response.completion == 'True':
353353
bt.logging.trace(f"UID {uid} is active")
354354
return axon # Return the axon info instead of the UID
@@ -599,6 +599,9 @@ async def process_queries_from_database(self):
599599
if not self.is_epoch_end():
600600
bt.logging.debug("no end of epoch. so continue...")
601601
continue
602+
if not self.synthetic_task_done:
603+
bt.logging.debug("wait for synthetic tasks to complete.")
604+
continue
602605

603606
bt.logging.info(f"start scoring process...")
604607

0 commit comments

Comments
 (0)