Skip to content

Commit

Permalink
Hyperparams get update (#1614)
Browse files Browse the repository at this point in the history
* fixes `btcli sudo get`

* black
  • Loading branch information
Eugene-hu authored Dec 11, 2023
1 parent 831612e commit 1553c3e
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions bittensor/chain_data.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,8 @@
["max_burn", "Compact<u64>"],
["bonds_moving_avg", "Compact<u64>"],
["max_regs_per_block", "Compact<u16>"],
["serving_rate_limit", "Compact<u64>"],
["max_validators", "Compact<u16>"],
],
},
}
Expand Down Expand Up @@ -963,6 +965,8 @@ class SubnetHyperparameters:
max_burn: int
bonds_moving_avg: int
max_regs_per_block: int
serving_rate_limit: int
max_validators: int

@classmethod
def from_vec_u8(cls, vec_u8: List[int]) -> Optional["SubnetHyperparameters"]:
Expand Down Expand Up @@ -1013,6 +1017,8 @@ def fix_decoded_values(cls, decoded: Dict) -> "SubnetHyperparameters":
max_burn=decoded["max_burn"],
bonds_moving_avg=decoded["bonds_moving_avg"],
max_regs_per_block=decoded["max_regs_per_block"],
max_validators=decoded["max_validators"],
serving_rate_limit=decoded["serving_rate_limit"],
)

def to_parameter_dict(self) -> "torch.nn.ParameterDict":
Expand Down

0 comments on commit 1553c3e

Please sign in to comment.