bittensor.core.chain_data.subnet_info#

Classes#

SubnetInfo

Dataclass for subnet info.

Module Contents#

class bittensor.core.chain_data.subnet_info.SubnetInfo[source]#

Dataclass for subnet info.

netuid: int#
rho: int#
kappa: int#
difficulty: int#
immunity_period: int#
max_allowed_validators: int#
min_allowed_weights: int#
max_weight_limit: float#
scaling_law_power: float#
subnetwork_n: int#
max_n: int#
blocks_since_epoch: int#
tempo: int#
modality: int#
connection_requirements: dict[str, float]#
emission_value: float#
burn: bittensor.utils.balance.Balance#
owner_ss58: str#
classmethod from_vec_u8(vec_u8)[source]#

Returns a SubnetInfo object from a vec_u8.

Parameters:

vec_u8 (list[int])

Return type:

Optional[SubnetInfo]

classmethod list_from_vec_u8(vec_u8)[source]#

Returns a list of SubnetInfo objects from a vec_u8.

Parameters:

vec_u8 (list[int])

Return type:

list[SubnetInfo]

classmethod fix_decoded_values(decoded)[source]#

Returns a SubnetInfo object from a decoded SubnetInfo dictionary.

Parameters:

decoded (dict)

Return type:

SubnetInfo

to_parameter_dict()[source]#

Returns a torch tensor or dict of the subnet info.

Return type:

Union[dict[str, Any], bittensor.utils.registration.torch.nn.ParameterDict]

classmethod from_parameter_dict(parameter_dict)[source]#

Creates a SubnetInfo instance from a parameter dictionary.

Parameters:

parameter_dict (Union[dict[str, Any], bittensor.utils.registration.torch.nn.ParameterDict])

Return type:

SubnetInfo