bittensor.extras.dev_framework.subnet#

Attributes#

Classes#

CALL_RECORD

TestSubnet

Class for managing test subnet operations.

Module Contents#

class bittensor.extras.dev_framework.subnet.CALL_RECORD#

Bases: tuple

idx#
operation#
response#
bittensor.extras.dev_framework.subnet.NETUID = 'SN_NETUID'#
class bittensor.extras.dev_framework.subnet.TestSubnet(subtensor, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True)#

Class for managing test subnet operations.

Parameters:
  • subtensor (bittensor.extras.SubtensorApi)

  • period (Optional[int])

  • raise_error (bool)

  • wait_for_inclusion (bool)

  • wait_for_finalization (bool)

async async_execute_one(step)#

Executes one step asynchronously.

Parameters:

step (Union[bittensor.extras.dev_framework.utils.STEPS, tuple])

Return type:

bittensor.core.types.ExtrinsicResponse

async async_execute_steps(steps)#

Executes a multiple steps asynchronously.

Parameters:

steps (list[Union[bittensor.extras.dev_framework.utils.STEPS, tuple]])

async async_set_hyperparameter(sudo_or_owner_wallet, call_function, call_module, call_params, sudo_call=False, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True)#

Set hyperparameter for the chain or subnet.

Parameters:
  • sudo_or_owner_wallet (bittensor_wallet.Wallet)

  • call_function (str)

  • call_module (str)

  • call_params (dict)

  • sudo_call (bool)

  • period (Optional[int])

  • raise_error (bool)

  • wait_for_inclusion (bool)

  • wait_for_finalization (bool)

Return type:

bittensor.core.types.ExtrinsicResponse

async async_wait_next_epoch(netuid=None)#

Async wait until the next epoch first block is reached.

Parameters:

netuid (Optional[int])

property calls: list[CALL_RECORD]#
Return type:

list[CALL_RECORD]

execute_one(step)#

Executes one step synchronously.

Parameters:

step (Union[bittensor.extras.dev_framework.utils.STEPS, tuple])

Return type:

bittensor.core.types.ExtrinsicResponse

execute_steps(steps)#

Executes a multiple steps synchronously.

Parameters:

steps (list[Union[bittensor.extras.dev_framework.utils.STEPS, tuple]])

property netuid: int#
Return type:

int

property owner: bittensor_wallet.Wallet#
Return type:

bittensor_wallet.Wallet

period = None#
raise_error = False#
s: bittensor.extras.SubtensorApi#
set_hyperparameter(sudo_or_owner_wallet, call_function, call_module, call_params, sudo_call=False, period=None, raise_error=False, wait_for_inclusion=True, wait_for_finalization=True)#

Set hyperparameter for the chain or subnet.

Parameters:
  • sudo_or_owner_wallet (bittensor_wallet.Wallet)

  • call_function (str)

  • call_module (str)

  • call_params (dict)

  • sudo_call (bool)

  • period (Optional[int])

  • raise_error (bool)

  • wait_for_inclusion (bool)

  • wait_for_finalization (bool)

Return type:

bittensor.core.types.ExtrinsicResponse

wait_for_finalization = True#
wait_for_inclusion = True#
wait_next_epoch(netuid=None)#

Sync wait until the next epoch first block is reached.

Parameters:

netuid (Optional[int])