@@ -161,7 +161,7 @@ async def set_hyperparameter_extrinsic(
161
161
wallet : "Wallet" ,
162
162
netuid : int ,
163
163
parameter : str ,
164
- value : Optional [Union [str , bool , float , list [float ]]],
164
+ value : Optional [Union [str , float , list [float ]]],
165
165
wait_for_inclusion : bool = False ,
166
166
wait_for_finalization : bool = True ,
167
167
prompt : bool = True ,
@@ -606,28 +606,11 @@ async def sudo_set_hyperparameter(
606
606
json_output : bool ,
607
607
):
608
608
"""Set subnet hyperparameters."""
609
-
610
- normalized_value : Union [str , bool ]
611
- if param_name in [
612
- "registration_allowed" ,
613
- "network_pow_registration_allowed" ,
614
- "commit_reveal_weights_enabled" ,
615
- "liquid_alpha_enabled" ,
616
- ]:
617
- normalized_value = param_value .lower () in ["true" , "1" ]
618
- elif param_value in ("True" , "False" ):
619
- normalized_value = {
620
- "True" : True ,
621
- "False" : False ,
622
- }[param_value ]
623
- else :
624
- normalized_value = param_value
625
-
626
- is_allowed_value , value = allowed_value (param_name , normalized_value )
609
+ is_allowed_value , value = allowed_value (param_name , param_value )
627
610
if not is_allowed_value :
628
611
err_console .print (
629
612
f"Hyperparameter [dark_orange]{ param_name } [/dark_orange] value is not within bounds. "
630
- f"Value is { normalized_value } but must be { value } "
613
+ f"Value is { param_value } but must be { value } "
631
614
)
632
615
return False
633
616
success = await set_hyperparameter_extrinsic (
0 commit comments