Skip to content

Commit

Permalink
Merge pull request #262 from opentensor/feat/thewhaleking/hyperparams…
Browse files Browse the repository at this point in the history
…-set

Show hyperparams during `sudo set` only sometimes
  • Loading branch information
thewhaleking authored Dec 4, 2024
2 parents b08adf3 + abf8a34 commit 5474a23
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
12 changes: 6 additions & 6 deletions bittensor_cli/cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -3884,12 +3884,12 @@ def sudo_set(
"""
self.verbosity_handler(quiet, verbose)

hyperparams = self._run_command(
sudo.get_hyperparameters(self.initialize_chain(network), netuid)
)

if not hyperparams:
raise typer.Exit()
if not param_name or not param_value:
hyperparams = self._run_command(
sudo.get_hyperparameters(self.initialize_chain(network), netuid)
)
if not hyperparams:
raise typer.Exit()

if not param_name:
hyperparam_list = [field.name for field in fields(SubnetHyperparameters)]
Expand Down
5 changes: 4 additions & 1 deletion bittensor_cli/src/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -340,7 +340,10 @@ class WalletValidationTypes(Enum):
"max_validators": ("sudo_set_max_allowed_validators", True),
"adjustment_alpha": ("sudo_set_adjustment_alpha", False),
"difficulty": ("sudo_set_difficulty", False),
"commit_reveal_weights_interval": ("sudo_set_commit_reveal_weights_interval", False),
"commit_reveal_weights_interval": (
"sudo_set_commit_reveal_weights_interval",
False,
),
"commit_reveal_weights_enabled": ("sudo_set_commit_reveal_weights_enabled", False),
"alpha_values": ("sudo_set_alpha_values", False),
"liquid_alpha_enabled": ("sudo_set_liquid_alpha_enabled", False),
Expand Down

0 comments on commit 5474a23

Please sign in to comment.