diff --git a/bittensor_cli/cli.py b/bittensor_cli/cli.py index 26fff060a..55eb4098e 100755 --- a/bittensor_cli/cli.py +++ b/bittensor_cli/cli.py @@ -3904,6 +3904,16 @@ def sudo_set( ) param_name = hyperparam_list[choice - 1] + if param_name in ["alpha_high", "alpha_low"]: + param_name = "alpha_values" + low_val = FloatPrompt.ask( + "Enter the new value for [dark_orange]alpha_low[/dark_orange]" + ) + high_val = FloatPrompt.ask( + "Enter the new value for [dark_orange]alpha_high[/dark_orange]" + ) + param_value = f"{low_val},{high_val}" + if not param_value: param_value = Prompt.ask( f"Enter the new value for [dark_orange]{param_name}[/dark_orange] in the VALUE column format" diff --git a/bittensor_cli/src/__init__.py b/bittensor_cli/src/__init__.py index 8cf6aeff4..a5ca2170a 100644 --- a/bittensor_cli/src/__init__.py +++ b/bittensor_cli/src/__init__.py @@ -318,28 +318,32 @@ class WalletValidationTypes(Enum): HYPERPARAMS = { - "serving_rate_limit": "sudo_set_serving_rate_limit", + "rho": "sudo_set_rho", + "kappa": "sudo_set_kappa", + "immunity_period": "sudo_set_immunity_period", + "min_allowed_weights": "sudo_set_min_allowed_weights", + "max_weights_limit": "sudo_set_max_weight_limit", + "tempo": "sudo_set_tempo", "min_difficulty": "sudo_set_min_difficulty", "max_difficulty": "sudo_set_max_difficulty", "weights_version": "sudo_set_weights_version_key", "weights_rate_limit": "sudo_set_weights_set_rate_limit", - "max_weight_limit": "sudo_set_max_weight_limit", - "immunity_period": "sudo_set_immunity_period", - "min_allowed_weights": "sudo_set_min_allowed_weights", + "adjustment_interval": "sudo_set_adjustment_interval", "activity_cutoff": "sudo_set_activity_cutoff", - "network_registration_allowed": "sudo_set_network_registration_allowed", - "network_pow_registration_allowed": "sudo_set_network_pow_registration_allowed", + "target_regs_per_interval": "sudo_set_target_registrations_per_interval", "min_burn": "sudo_set_min_burn", "max_burn": "sudo_set_max_burn", + "bonds_moving_avg": "sudo_set_bonds_moving_average", + "max_regs_per_block": "sudo_set_max_registrations_per_block", + "serving_rate_limit": "sudo_set_serving_rate_limit", + "max_validators": "sudo_set_max_allowed_validators", "adjustment_alpha": "sudo_set_adjustment_alpha", - "rho": "sudo_set_rho", - "kappa": "sudo_set_kappa", "difficulty": "sudo_set_difficulty", - "bonds_moving_avg": "sudo_set_bonds_moving_average", "commit_reveal_weights_interval": "sudo_set_commit_reveal_weights_interval", "commit_reveal_weights_enabled": "sudo_set_commit_reveal_weights_enabled", "alpha_values": "sudo_set_alpha_values", "liquid_alpha_enabled": "sudo_set_liquid_alpha_enabled", + "registration_allowed": "sudo_set_network_registration_allowed", } # Help Panels for cli help diff --git a/bittensor_cli/src/commands/sudo.py b/bittensor_cli/src/commands/sudo.py index 5711a3c27..5c0057ce1 100644 --- a/bittensor_cli/src/commands/sudo.py +++ b/bittensor_cli/src/commands/sudo.py @@ -178,19 +178,20 @@ async def sudo_set_hyperparameter( normalized_value: Union[str, bool] if param_name in [ - "network_registration_allowed", + "registration_allowed", "network_pow_registration_allowed", "commit_reveal_weights_enabled", "liquid_alpha_enabled", ]: - normalized_value = param_value.lower() in ["true", "1"] + normalized_value = param_value.lower() in ["true", "True", "1"] else: normalized_value = param_value is_allowed_value, value = allowed_value(param_name, normalized_value) if not is_allowed_value: err_console.print( - f"Hyperparameter {param_name} value is not within bounds. Value is {normalized_value} but must be {value}" + f"Hyperparameter [dark_orange]{param_name}[/dark_orange] value is not within bounds. " + f"Value is {normalized_value} but must be {value}" ) return