Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Hyperparams get update #1614

Merged
merged 2 commits into from
Dec 11, 2023
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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