Closed hide-on-bush-x closed 1 month ago
It is suggested to create a new virtual environment for this
conda create -n bt
conda activate bt
pip install "bittensor[cli]"
pip install "bittensor[sdk]"
pip install bittensor-wallet
pip list
You should see something similar to the following list
bittensor 8.1.0
bittensor-cli 8.1.0
bittensor-wallet 2.0.1
List of found issues when trying to run subnet 42
when trying to run a validator I am facing an error with the config object and the wallet class Command:
python neurons/validator.py --netuid 165 --subtensor.network test --wallet.name validator --wallet.hotkey default --logging.debug --axon.port 8092 --neuron.debug
Output:
TypeError: argument 'config': 'Config' object cannot be converted to 'Config'
This error is happening on base/neuron.py
file
│ │
│ 94 │ │ │ self.subtensor = MockSubtensor(self.config.netuid, wallet=self.wallet) │
│ 95 │ │ │ self.metagraph = MockMetagraph(self.config.netuid, subtensor=self.subtensor) │
│ 96 │ │ else: │
│ ❱ 97 │ │ │ self.wallet = bt.Wallet(config=self.config) │
│ 98 │ │ │ self.subtensor = bt.Subtensor(config=self.config) │
│ 99 │ │ │ self.metagraph = self.subtensor.metagraph(self.config.netuid)
List of attempts already tried
There is a new config file seems to be important but its just a base configuration, didn't affect this issue docs: https://docs.bittensor.com/btcli#config community message reference: https://discord.com/channels/1120750674595024897/1242998447125037106/1290369105412755600
The way the config object is created is the following
base_config = copy.deepcopy(config or BaseNeuron.config()) # Gets base configuration from config file
self.config = self.config() # Config coming from command parameters
self.config.merge(base_config) # Joins both configs
self.check_config(self.config)
By logging
isinstance(self.config, bt.Config)
we can deduce that self.config
is in fact a Config object
When logging
dir(self.config)
output: ['__is_set', 'axon', 'config', 'enable_validator_api', 'logging', 'mock', 'netuid', 'neuron', 'no_prompt', 'no_version_checking', 'strict', 'subtensor', 'wallet', 'wandb']
we can see that all the configs defined in the config.py file are there and seems fine
Tried doing
bt.Wallet(config=self.config.config)
But more errors rised and errors like "default wallet is not in the wallet list" showed up, what tells me that doing that only uses default configs
About to replicate, but based on these comments my first reaction is that it seems the issues are explicitly stemming from calls to bt.Wallet()
.
After catching up with the docs, it looks like the new bittensor-wallet
library is in fact auto-installed when you install the BTCLI / SDK, but these are just my initial reactions!
p.s. great explanation of the situation and what you've attempted to do, super helpful!
Oh that new wallet import may make the difference, will double check, thank you!
There is a new Config object with just wallet configuration, this is used in the new Wallet class, this class is called Config Before this new version we used the regular config object that has every config in it, this config object class was also called Config . Here is where the confussion started and why this error now makes sense TypeError: argument 'config': 'Config' object cannot be converted to 'Config' I hate that there was no disclaimer about this or nobody saying nothing on the discord channels :melting_face: Solution: Create a new config object just for bt.wallet and insert the required values from the main config wallet_specific_config = Config( hotkey=self.config.wallet.hotkey, name=self.config.wallet.name )
self.wallet = bt.wallet(config=wallet_specific_config)
Research BTCLI 8.0