Skip to content

Commit ec235c6

Browse files
author
acer-king
committedNov 11, 2024
detail logs in updating weight_setter
1 parent 5010077 commit ec235c6

File tree

1 file changed

+7
-7
lines changed

1 file changed

+7
-7
lines changed
 

‎validators/weight_setter.py

+7-7
Original file line numberDiff line numberDiff line change
@@ -295,11 +295,11 @@ async def perform_synthetic_queries_one_cycle(self):
295295

296296
async def perform_synthetic_queries(self):
297297
while True:
298-
# if not self.is_cycle_end():
299-
# await asyncio.sleep(12)
300-
# continue
301-
# self.set_up_next_block_to_wait()
302-
await asyncio.sleep(432)
298+
if not self.is_cycle_end():
299+
await asyncio.sleep(12)
300+
continue
301+
self.set_up_next_block_to_wait()
302+
# await asyncio.sleep(432)
303303
self.loop.create_task(self.perform_synthetic_queries_one_cycle())
304304

305305
def pop_synthetic_tasks_max_100_per_miner(self, synthetic_tasks):
@@ -394,15 +394,15 @@ async def set_weights(self, scores):
394394
self.moving_average_scores = alpha * scores + (1 - alpha) * self.moving_average_scores
395395
bt.logging.info(f"Updated moving average of weights: {self.moving_average_scores}")
396396
start_time = time.time()
397-
self.subtensor.set_weights(
397+
success, msg = self.subtensor.set_weights(
398398
netuid=self.config.netuid,
399399
wallet=self.wallet,
400400
uids=self.metagraph.uids,
401401
weights=self.moving_average_scores,
402402
wait_for_inclusion=True,
403403
version_key=cortext.__weights_version__,
404404
)
405-
bt.logging.success(f"Successfully included weights in block. {time.time() - start_time} elaspsed for updating weights.")
405+
bt.logging.info(f"done setting weights: {success}, {msg}. {time.time() - start_time} elaspsed for updating weights.")
406406

407407
def blacklist_prompt(self, synapse: StreamPrompting) -> Tuple[bool, str]:
408408
blacklist = self.base_blacklist(synapse, cortext.PROMPT_BLACKLIST_STAKE)

0 commit comments

Comments
 (0)