Skip to content

Commit 8c97e0e

Browse files
committed
Blue for setting weights + improv
1 parent 3a28e4d commit 8c97e0e

File tree

1 file changed

+9
-11
lines changed

1 file changed

+9
-11
lines changed

validator.py

Lines changed: 9 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -44,16 +44,14 @@ def get_config(self):
4444
# Parse the config.
4545
config = bt.config(parser)
4646
# Set up logging directory.
47-
48-
logging_path = "{}/{}/{}/netuid{}/{}".format(
49-
config.logging.logging_dir,
50-
config.wallet.name,
51-
config.wallet.hotkey_str,
52-
config.netuid,
53-
"validator",
47+
config.full_path = os.path.expanduser(
48+
"{}/{}/{}/netuid{}/validator".format(
49+
config.logging.logging_dir,
50+
config.wallet.name,
51+
config.wallet.hotkey_str,
52+
config.netuid,
53+
)
5454
)
55-
config.full_path = os.path.expanduser(logging_path)
56-
5755
# Ensure the logging directory exists.
5856
os.makedirs(config.full_path, exist_ok=True)
5957
return config
@@ -89,7 +87,7 @@ def setup_bittensor_objects(self):
8987
# Connect the validator to the network.
9088
if self.wallet.hotkey.ss58_address not in self.metagraph.hotkeys:
9189
bt.logging.error(
92-
f"Your validator: {self.wallet} is not registered to chain connection: {self.subtensor} \nRun 'btcli register' and try again."
90+
f"\nYour validator: {self.wallet} is not registered to chain connection: {self.subtensor} \nRun 'btcli register' and try again."
9391
)
9492
exit()
9593
else:
@@ -149,7 +147,7 @@ def run(self):
149147
if self.last_update > self.tempo + 1:
150148
total = sum(self.moving_avg_scores)
151149
weights = [score / total for score in self.moving_avg_scores]
152-
bt.logging.info(f"Setting weights: {weights}")
150+
bt.logging.info(f"[blue]Setting weights: {weights}[/blue]")
153151
# Update the incentive mechanism on the Bittensor blockchain.
154152
result = self.subtensor.set_weights(
155153
netuid=self.config.netuid,

0 commit comments

Comments
 (0)