Transactions
set-hyperparameter
Set an owner-settable subnet hyperparameter (btcli `sudo set`).
Dispatches the matching AdminUtils sudo_set_* call for the named
parameter (alpha_low/alpha_high read the current pair from chain and
set both via sudo_set_alpha_values). The signer must be the subnet's
owner coldkey; root-only parameters are not available here and must go
through the raw-call escape hatch. Changes take effect on chain immediately
and shape subnet economics and consensus (registration costs, weight
rules, immunity, transfers), so
verify the raw value before sending — value accepts either the raw
on-chain integer or a human form that is converted for you. Some
parameters are rate-limited by the chain, so a quick follow-up change can
fail. Read current values back with the subnet_hyperparameters read.
Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
netuid | integer | yes | Subnet to configure; the signer must be its owner. |
name | string | yes | Hyperparameter to set. One of: activity_cutoff_factor, adjustment_alpha, alpha_high, alpha_low, alpha_sigmoid_steepness, bonds_moving_avg, bonds_penalty, bonds_reset_enabled, burn_half_life, burn_increase_mult, collateral_drain_ratio, collateral_lock_share, commit_reveal_period, commit_reveal_weights_enabled, immunity_period, liquid_alpha_enabled, max_allowed_uids, max_burn, max_difficulty, min_allowed_weights, min_burn, min_childkey_take, network_pow_registration_allowed, owner_cut_auto_lock_enabled, owner_cut_enabled, owner_immune_neuron_limit, rho, serving_rate_limit, tempo, transfers_enabled, weights_version, yuma3_enabled. |
value | integer | number | string | yes | New value. Give the raw on-chain integer (within the parameter's codec bounds), or the human form as a float or a string with a decimal point (a 0..1 fraction for normalized parameters, a non-negative TAO amount for rao parameters). Boolean parameters take true/false or 0/1 only. |
Address parameters (--hotkey, --coldkey, --dest, ...) accept a raw ss58
address, an address-book or proxy-book name, or a local wallet/hotkey name.
CLI
Preview with --dry-run (shows fee, effects, and policy result without
submitting), then submit:
btcli tx set-hyperparameter \
--netuid <int> \
--name <value> \
--value <value> --dry-run
btcli tx set-hyperparameter \
--netuid <int> \
--name <value> \
--value <value> -w my_coldkeyPython
import bittensor as bt
from bittensor.wallet import Wallet
wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = bt.SetHyperparameter(netuid=1, name="...", value="...")
sub = bt.Subtensor()
plan = sub.plan(intent, wallet) # fee, effects, policy — no submission
result = sub.execute(intent, wallet)
if not result.success:
print(result.error.code, result.error.remediation)(bt.Subtensor is also the async client — async with bt.Subtensor() as client:
— see The client.) Or build the intent by op name, as
an agent would:
result = sub.execute_tool("set_hyperparameter", {...}, wallet)On-chain implementation
| Chain call | Source |
|---|---|
AdminUtils.sudo_set_tempo | pallets/admin-utils/src/lib.rs#L1032 |
AdminUtils.sudo_set_immunity_period | pallets/admin-utils/src/lib.rs#L476 |
AdminUtils.sudo_set_min_allowed_weights | pallets/admin-utils/src/lib.rs#L509 |
AdminUtils.sudo_set_weights_version_key | pallets/admin-utils/src/lib.rs#L361 |
AdminUtils.sudo_set_activity_cutoff_factor | pallets/admin-utils/src/lib.rs#L681 |
AdminUtils.sudo_set_min_burn | pallets/admin-utils/src/lib.rs#L763 |
AdminUtils.sudo_set_max_burn | pallets/admin-utils/src/lib.rs#L802 |
AdminUtils.sudo_set_bonds_moving_average | pallets/admin-utils/src/lib.rs#L894 |
AdminUtils.sudo_set_bonds_penalty | pallets/admin-utils/src/lib.rs#L933 |
AdminUtils.sudo_set_serving_rate_limit | pallets/admin-utils/src/lib.rs#L278 |
AdminUtils.sudo_set_commit_reveal_weights_interval | pallets/admin-utils/src/lib.rs#L1376 |
AdminUtils.sudo_set_max_allowed_uids | pallets/admin-utils/src/lib.rs#L542 |
AdminUtils.sudo_set_burn_increase_mult | pallets/admin-utils/src/lib.rs#L2151 |
AdminUtils.sudo_set_burn_half_life | pallets/admin-utils/src/lib.rs#L2109 |
AdminUtils.sudo_set_collateral_lock_share | pallets/admin-utils/src/lib.rs#L2275 |
AdminUtils.sudo_set_collateral_drain_ratio | pallets/admin-utils/src/lib.rs#L2318 |
AdminUtils.sudo_set_adjustment_alpha | pallets/admin-utils/src/lib.rs#L445 |
AdminUtils.sudo_set_rho | pallets/admin-utils/src/lib.rs#L608 |
AdminUtils.sudo_set_max_difficulty | pallets/admin-utils/src/lib.rs#L328 |
AdminUtils.sudo_set_alpha_sigmoid_steepness | pallets/admin-utils/src/lib.rs#L1627 |
AdminUtils.sudo_set_min_childkey_take_per_subnet | pallets/admin-utils/src/lib.rs#L1200 |
AdminUtils.sudo_set_owner_immune_neuron_limit | pallets/admin-utils/src/lib.rs#L1813 |
AdminUtils.sudo_set_alpha_values | pallets/admin-utils/src/lib.rs#L1301 |
AdminUtils.sudo_set_commit_reveal_weights_enabled | pallets/admin-utils/src/lib.rs#L1239 |
AdminUtils.sudo_set_liquid_alpha_enabled | pallets/admin-utils/src/lib.rs#L1277 |
AdminUtils.sudo_set_network_pow_registration_allowed | pallets/admin-utils/src/lib.rs#L723 |
AdminUtils.sudo_set_yuma3_enabled | pallets/admin-utils/src/lib.rs#L1672 |
AdminUtils.sudo_set_bonds_reset_enabled | pallets/admin-utils/src/lib.rs#L1706 |
AdminUtils.sudo_set_toggle_transfer | pallets/admin-utils/src/lib.rs#L1465 |
AdminUtils.sudo_set_owner_cut_enabled | pallets/admin-utils/src/lib.rs#L2195 |
AdminUtils.sudo_set_owner_cut_auto_lock_enabled | pallets/admin-utils/src/lib.rs#L2219 |
Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).