Skip to content

Commit

Permalink
Suggestions impl
Browse files Browse the repository at this point in the history
  • Loading branch information
ibraheem-opentensor committed Dec 17, 2024
1 parent dec2f8d commit 3a28e4d
Showing 1 changed file with 10 additions and 9 deletions.
19 changes: 10 additions & 9 deletions validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -44,15 +44,16 @@ def get_config(self):
# Parse the config.
config = bt.config(parser)
# Set up logging directory.
config.full_path = os.path.expanduser(
"{}/{}/{}/netuid{}/{}".format(
config.logging.logging_dir,
config.wallet.name,
config.wallet.hotkey_str,
config.netuid,
"validator",
)

logging_path = "{}/{}/{}/netuid{}/{}".format(
config.logging.logging_dir,
config.wallet.name,
config.wallet.hotkey_str,
config.netuid,
"validator",
)
config.full_path = os.path.expanduser(logging_path)

# Ensure the logging directory exists.
os.makedirs(config.full_path, exist_ok=True)
return config
Expand Down Expand Up @@ -88,7 +89,7 @@ def setup_bittensor_objects(self):
# Connect the validator to the network.
if self.wallet.hotkey.ss58_address not in self.metagraph.hotkeys:
bt.logging.error(
f"\nYour validator: {self.wallet} is not registered to chain connection: {self.subtensor} \nRun 'btcli register' and try again."
f"Your validator: {self.wallet} is not registered to chain connection: {self.subtensor} \nRun 'btcli register' and try again."
)
exit()
else:
Expand Down

0 comments on commit 3a28e4d

Please sign in to comment.