bittensor.extrinsics.network
#
Module Contents#
Functions#
|
Registers a new subnetwork |
|
Sets a hyperparameter for a specific subnetwork. |
- bittensor.extrinsics.network.register_subnetwork_extrinsic(subtensor, wallet, wait_for_inclusion=False, wait_for_finalization=True, prompt=False)#
Registers a new subnetwork :param wallet: bittensor wallet object. :type wallet: bittensor.wallet :param wait_for_inclusion: If set, waits for the extrinsic to enter a block before returning true,
or returns false if the extrinsic fails to enter the block within the timeout.
- Parameters:
wait_for_finalization (bool) – If set, waits for the extrinsic to be finalized on the chain before returning true, or returns false if the extrinsic fails to be finalized within the timeout.
prompt (bool) – If true, the call waits for confirmation from the user before proceeding.
subtensor (bittensor.subtensor) –
wallet (bittensor.wallet) –
wait_for_inclusion (bool) –
- Returns:
flag is true if extrinsic was finalized or included in the block. If we did not wait for finalization / inclusion, the response is true.
- Return type:
success (bool)
- bittensor.extrinsics.network.set_hyperparameter_extrinsic(subtensor, wallet, netuid, parameter, value, wait_for_inclusion=False, wait_for_finalization=True, prompt=False)#
Sets a hyperparameter for a specific subnetwork. :param wallet: bittensor wallet object. :type wallet: bittensor.wallet :param netuid: Subnetwork uid. :type netuid: int :param parameter: Hyperparameter name. :type parameter: str :param value: New hyperparameter value. :type value: any :param wait_for_inclusion: If set, waits for the extrinsic to enter a block before returning true,
or returns false if the extrinsic fails to enter the block within the timeout.
- Parameters:
wait_for_finalization (bool) – If set, waits for the extrinsic to be finalized on the chain before returning true, or returns false if the extrinsic fails to be finalized within the timeout.
prompt (bool) – If true, the call waits for confirmation from the user before proceeding.
subtensor (bittensor.subtensor) –
wallet (bittensor.wallet) –
netuid (int) –
parameter (str) –
wait_for_inclusion (bool) –
- Returns:
flag is true if extrinsic was finalized or included in the block. If we did not wait for finalization / inclusion, the response is true.
- Return type:
success (bool)