Skip to content

Commit 8d5985e

Browse files
authored
Merge pull request #490 from opentensor/feat/thewhaleking/add-yuma3-set
Merge issue: 488
2 parents 88224f1 + 98f4d28 commit 8d5985e

File tree

4 files changed

+11
-3
lines changed

4 files changed

+11
-3
lines changed

bittensor_cli/src/__init__.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -659,6 +659,7 @@ class WalletValidationTypes(Enum):
659659
False,
660660
),
661661
"yuma3_enabled": ("sudo_set_yuma3_enabled", False),
662+
"alpha_sigmoid_steepness": ("sudo_set_alpha_sigmoid_steepness", True),
662663
}
663664

664665
# Help Panels for cli help

bittensor_cli/src/bittensor/chain_data.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -178,6 +178,7 @@ class SubnetHyperparameters(InfoBase):
178178
alpha_low: int
179179
liquid_alpha_enabled: bool
180180
yuma3_enabled: bool
181+
alpha_sigmoid_steepness: int
181182

182183
@classmethod
183184
def _fix_decoded(
@@ -212,6 +213,7 @@ def _fix_decoded(
212213
alpha_low=decoded.get("alpha_low"),
213214
liquid_alpha_enabled=decoded.get("liquid_alpha_enabled"),
214215
yuma3_enabled=decoded.get("yuma3_enabled"),
216+
alpha_sigmoid_steepness=decoded.get("alpha_sigmoid_steepness"),
215217
)
216218

217219

bittensor_cli/src/bittensor/subtensor_interface.py

Lines changed: 7 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1128,17 +1128,21 @@ async def get_subnet_hyperparameters(
11281128
Understanding the hyperparameters is crucial for comprehending how subnets are configured and
11291129
managed, and how they interact with the network's consensus and incentive mechanisms.
11301130
"""
1131-
main_result, yuma3_result = await asyncio.gather(
1131+
main_result, yuma3_result, sigmoid_steepness = await asyncio.gather(
11321132
self.query_runtime_api(
11331133
runtime_api="SubnetInfoRuntimeApi",
11341134
method="get_subnet_hyperparams",
11351135
params=[netuid],
11361136
block_hash=block_hash,
11371137
),
11381138
self.query("SubtensorModule", "Yuma3On", [netuid]),
1139+
self.query("SubtensorModule", "AlphaSigmoidSteepness", [netuid]),
11391140
)
1140-
result = {**main_result, **{"yuma3_enabled": yuma3_result}}
1141-
1141+
result = {
1142+
**main_result,
1143+
**{"yuma3_enabled": yuma3_result},
1144+
**{"alpha_sigmoid_steepness": sigmoid_steepness},
1145+
}
11421146
if not main_result:
11431147
return []
11441148

bittensor_cli/src/bittensor/utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,7 @@ def normalize_hyperparameters(
739739
"kappa": u16_normalized_float,
740740
"alpha_high": u16_normalized_float,
741741
"alpha_low": u16_normalized_float,
742+
"alpha_sigmoid_steepness": u16_normalized_float,
742743
"min_burn": Balance.from_rao,
743744
"max_burn": Balance.from_rao,
744745
}

0 commit comments

Comments
 (0)