Skip to content
This repository was archived by the owner on Jul 10, 2026. It is now read-only.

fix(sudo): show single numbered hyperparameter table in interactive sudo set#1028

Open
wouterharinghuizen wants to merge 1 commit into
RaoFoundation:stagingfrom
wouterharinghuizen:fix/sudo-set-single-hyperparam-table
Open

fix(sudo): show single numbered hyperparameter table in interactive sudo set#1028
wouterharinghuizen wants to merge 1 commit into
RaoFoundation:stagingfrom
wouterharinghuizen:fix/sudo-set-single-hyperparam-table

Conversation

@wouterharinghuizen

@wouterharinghuizen wouterharinghuizen commented Jul 10, 2026

Copy link
Copy Markdown
Contributor

Summary

  • Interactive btcli sudo set (no --param) printed the full hyperparameter values table and then a second picker table repeating the same names/descriptions before asking for a number
  • The values table now carries the selection numbers itself; the redundant picker table is removed
  • Settable hyperparameters absent from the get_subnet_hyperparams_v3 response (max_allowed_uids, min_allowed_uids, network_pow_registration_allowed, recycle_or_burn, sn_owner_hotkey) are read from SubtensorModule storage, so their rows show real on-chain values instead of placeholders
  • Setter aliases already reachable from displayed rows get no row of their own: alpha_high/alpha_low route to alpha_values, yuma_version routes to yuma3_enabled, and subnet_owner_hotkey is an alias of sn_owner_hotkey

Usage

btcli sudo set --netuid 18
# one table: # | HYPERPARAMETER | VALUE | NORMALIZED | OWNER SETTABLE | DESCRIPTION
# then: Enter the number of the hyperparameter:

Test plan

  • New: tests/unit_tests/test_sudo_get_hyperparameters.py (return contract, storage supplement, alias exclusion, storage-miss placeholder fallback, JSON path untouched, missing-subnet failure)
  • Full unit suite: 470 passed
  • Manual check on finney SN18: 38 rows, every row shows a real value (max_allowed_uids 257, recycle_or_burn Burn, sn_owner_hotkey ss58, ...), aliases excluded
  • Storage function names verified against live finney metadata

Notes

  • get_hyperparameters now returns (success, names in display order); storage reads and numbering only happen in interactive sudo set, so btcli sudo get, --json-output, and --no-prompt output are unchanged
  • Storage reads are skipped per-param if a future runtime starts reporting it; a param with no readable storage value degrades to a - row and stays selectable
  • Selection is resolved by name, so existing special cases (alpha_high/alpha_lowalpha_values, yuma_version, subnet_is_active, custom chain params) work as before

@wouterharinghuizen wouterharinghuizen force-pushed the fix/sudo-set-single-hyperparam-table branch 2 times, most recently from 9a641cf to fc3bbbc Compare July 10, 2026 10:41
Interactive `btcli sudo set` printed the full hyperparameter values table
and then a second picker table repeating names and descriptions. The values
table now carries the selection numbers itself.

Settable hyperparameters absent from the get_subnet_hyperparams_v3 response
(max_allowed_uids, min_allowed_uids, network_pow_registration_allowed,
recycle_or_burn, sn_owner_hotkey) are read from SubtensorModule storage so
their rows show real values. Setter aliases already reachable from displayed
rows (alpha_values, yuma3_enabled, subnet_owner_hotkey) get no row of their
own.
@wouterharinghuizen wouterharinghuizen force-pushed the fix/sudo-set-single-hyperparam-table branch from fc3bbbc to ee756d2 Compare July 10, 2026 10:55
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant