fix(sudo): show single numbered hyperparameter table in interactive sudo set#1028
Open
wouterharinghuizen wants to merge 1 commit into
Open
Conversation
9a641cf to
fc3bbbc
Compare
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.
fc3bbbc to
ee756d2
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
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 numberget_subnet_hyperparams_v3response (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 placeholdersalpha_high/alpha_lowroute toalpha_values,yuma_versionroutes toyuma3_enabled, andsubnet_owner_hotkeyis an alias ofsn_owner_hotkeyUsage
Test plan
tests/unit_tests/test_sudo_get_hyperparameters.py(return contract, storage supplement, alias exclusion, storage-miss placeholder fallback, JSON path untouched, missing-subnet failure)max_allowed_uids257,recycle_or_burnBurn,sn_owner_hotkeyss58, ...), aliases excludedNotes
get_hyperparametersnow returns(success, names in display order); storage reads and numbering only happen in interactivesudo set, sobtcli sudo get,--json-output, and--no-promptoutput are unchanged-row and stays selectablealpha_high/alpha_low→alpha_values,yuma_version,subnet_is_active, custom chain params) work as before