bittensor.commands.weights#
Module that encapsulates the CommitWeightCommand and the RevealWeightCommand. Used to commit and reveal weights for a specific subnet on the Bittensor Network.
Classes#
Executes the |
|
Executes the |
Module Contents#
- class bittensor.commands.weights.CommitWeightCommand[source]#
Executes the
commit
command to commit weights for specific subnet on the Bittensor network.- Usage:
The command allows committing weights for a specific subnet. Users need to specify the netuid (network unique identifier), corresponding UIDs, and weights they wish to commit.
- Optional arguments:
--netuid
(int): The netuid of the subnet for which weights are to be commited.--uids
(str): Corresponding UIDs for the specified netuid, in comma-separated format.--weights
(str): Corresponding weights for the specified UIDs, in comma-separated format.
- Example usage:
$ btcli wt commit –netuid 1 –uids 1,2,3,4 –weights 0.1,0.2,0.3,0.4
Note
This command is used to commit weights for a specific subnet and requires the user to have the necessary permissions.
- static run(cli)[source]#
Commit weights for a specific subnet.
- Parameters:
cli (bittensor.cli)
- static _run(cli, subtensor)[source]#
Commit weights for a specific subnet
- Parameters:
cli (bittensor.cli)
subtensor (bittensor.subtensor)
- static add_args(parser)[source]#
- Parameters:
parser (argparse.ArgumentParser)
- static check_config(config)[source]#
- Parameters:
config (bittensor.config)
- class bittensor.commands.weights.RevealWeightCommand[source]#
Executes the
reveal
command to reveal weights for a specific subnet on the Bittensor network. Usage:The command allows revealing weights for a specific subnet. Users need to specify the netuid (network unique identifier), corresponding UIDs, and weights they wish to reveal.
- Optional arguments:
--netuid
(int): The netuid of the subnet for which weights are to be revealed.--uids
(str): Corresponding UIDs for the specified netuid, in comma-separated format.--weights
(str): Corresponding weights for the specified UIDs, in comma-separated format.--salt
(str): Corresponding salt for the hash function, integers in comma-separated format.
- Example usage::
$ btcli wt reveal –netuid 1 –uids 1,2,3,4 –weights 0.1,0.2,0.3,0.4 –salt 163,241,217,11,161,142,147,189
Note
This command is used to reveal weights for a specific subnet and requires the user to have the necessary permissions.
- static run(cli)[source]#
Reveal weights for a specific subnet.
- Parameters:
cli (bittensor.cli)
- static _run(cli, subtensor)[source]#
Reveal weights for a specific subnet.
- Parameters:
cli (bittensor.cli)
subtensor (bittensor.subtensor)
- static add_args(parser)[source]#
- Parameters:
parser (argparse.ArgumentParser)
- static check_config(config)[source]#
- Parameters:
config (bittensor.config)