Skip to content

Commit

Permalink
reverted some changes
Browse files Browse the repository at this point in the history
  • Loading branch information
hscott-yuma committed Dec 5, 2024
1 parent 9313a46 commit 603c9fa
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 9 deletions.
6 changes: 3 additions & 3 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ localnet_netuid = 1
logging_level = trace # options= ['info', 'debug', 'trace']

netuid = $(testnet_netuid)
network = test
network = $(testnet)

## User Parameters
coldkey = default
Expand All @@ -29,7 +29,7 @@ validator:
--neuron.name validator \
--wallet.name $(coldkey) \
--wallet.hotkey $(validator_hotkey) \
--network $(network) \
--subtensor.network $(network) \
--axon.port 30335 \
--netuid $(netuid) \
--logging.level $(logging_level)
Expand All @@ -39,7 +39,7 @@ miner:
--neuron.name miner \
--wallet.name $(coldkey) \
--wallet.hotkey $(miner_hotkey) \
--network $(network) \
--subtensor.network $(network) \
--axon.port 30336 \
--netuid $(netuid) \
--logging.level $(logging_level) \
Expand Down
10 changes: 6 additions & 4 deletions precog/utils/bittensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,13 +5,15 @@

def setup_bittensor_objects(self):
# if chain enpoint isn't set, use the network arg
if self.config.chain_endpoint is None:
self.config.chain_endpoint = bt.subtensor.determine_chain_endpoint_and_network(self.config.network)[1]
if self.config.subtensor.chain_endpoint is None:
self.config.subtensor.chain_endpoint = bt.subtensor.determine_chain_endpoint_and_network(
self.config.subtensor.network
)[1]
else:
# if chain endpoint is set, overwrite network arg
self.config.network = self.config.chain_endpoint
self.config.subtensor.network = self.config.subtensor.chain_endpoint
# Initialize subtensor.
self.subtensor = bt.subtensor(config=self.config, network=self.config.network)
self.subtensor = bt.subtensor(config=self.config, network=self.config.subtensor.network)
self.metagraph = self.subtensor.metagraph(self.config.netuid)
self.wallet = bt.wallet(name=self.config.wallet.name, hotkey=self.config.wallet.hotkey)
self.dendrite = bt.dendrite(wallet=self.wallet)
Expand Down
6 changes: 4 additions & 2 deletions precog/utils/general.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,11 @@ def parse_arguments(parser: Optional[argparse.ArgumentParser] = None):
"""
if parser is None:
parser = argparse.ArgumentParser(description="Configuration")
parser.add_argument("--chain_endpoint", type=str, default=None) # for testnet: wss://test.finney.opentensor.ai:443
parser.add_argument(
"--network",
"--subtensor.chain_endpoint", type=str, default=None
) # for testnet: wss://test.finney.opentensor.ai:443
parser.add_argument(
"--subtensor.network",
choices=["finney", "test", "local"],
default="finney",
)
Expand Down

0 comments on commit 603c9fa

Please sign in to comment.