| title | set-hyperparameter |
|---|---|
| description | Set an owner-settable subnet hyperparameter (btcli `sudo set`). |
{/* GENERATED by scripts/generate.py from the SDK registries — do not edit. */}
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.
| 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.
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_coldkeyimport 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)| Chain call | Source |
|---|---|
AdminUtils.sudo_set_tempo |
pallets/admin-utils/src/lib.rs#L1049 |
AdminUtils.sudo_set_immunity_period |
pallets/admin-utils/src/lib.rs#L493 |
AdminUtils.sudo_set_min_allowed_weights |
pallets/admin-utils/src/lib.rs#L526 |
AdminUtils.sudo_set_weights_version_key |
pallets/admin-utils/src/lib.rs#L378 |
AdminUtils.sudo_set_activity_cutoff_factor |
pallets/admin-utils/src/lib.rs#L698 |
AdminUtils.sudo_set_min_burn |
pallets/admin-utils/src/lib.rs#L780 |
AdminUtils.sudo_set_max_burn |
pallets/admin-utils/src/lib.rs#L819 |
AdminUtils.sudo_set_bonds_moving_average |
pallets/admin-utils/src/lib.rs#L911 |
AdminUtils.sudo_set_bonds_penalty |
pallets/admin-utils/src/lib.rs#L950 |
AdminUtils.sudo_set_serving_rate_limit |
pallets/admin-utils/src/lib.rs#L295 |
AdminUtils.sudo_set_commit_reveal_weights_interval |
pallets/admin-utils/src/lib.rs#L1393 |
AdminUtils.sudo_set_max_allowed_uids |
pallets/admin-utils/src/lib.rs#L559 |
AdminUtils.sudo_set_burn_increase_mult |
pallets/admin-utils/src/lib.rs#L2228 |
AdminUtils.sudo_set_burn_half_life |
pallets/admin-utils/src/lib.rs#L2186 |
AdminUtils.sudo_set_collateral_lock_share |
pallets/admin-utils/src/lib.rs#L2352 |
AdminUtils.sudo_set_collateral_drain_ratio |
pallets/admin-utils/src/lib.rs#L2395 |
AdminUtils.sudo_set_adjustment_alpha |
pallets/admin-utils/src/lib.rs#L462 |
AdminUtils.sudo_set_rho |
pallets/admin-utils/src/lib.rs#L625 |
AdminUtils.sudo_set_max_difficulty |
pallets/admin-utils/src/lib.rs#L345 |
AdminUtils.sudo_set_alpha_sigmoid_steepness |
pallets/admin-utils/src/lib.rs#L1644 |
AdminUtils.sudo_set_min_childkey_take_per_subnet |
pallets/admin-utils/src/lib.rs#L1217 |
AdminUtils.sudo_set_owner_immune_neuron_limit |
pallets/admin-utils/src/lib.rs#L1830 |
AdminUtils.sudo_set_alpha_values |
pallets/admin-utils/src/lib.rs#L1318 |
AdminUtils.sudo_set_commit_reveal_weights_enabled |
pallets/admin-utils/src/lib.rs#L1256 |
AdminUtils.sudo_set_liquid_alpha_enabled |
pallets/admin-utils/src/lib.rs#L1294 |
AdminUtils.sudo_set_network_pow_registration_allowed |
pallets/admin-utils/src/lib.rs#L740 |
AdminUtils.sudo_set_yuma3_enabled |
pallets/admin-utils/src/lib.rs#L1689 |
AdminUtils.sudo_set_bonds_reset_enabled |
pallets/admin-utils/src/lib.rs#L1723 |
AdminUtils.sudo_set_toggle_transfer |
pallets/admin-utils/src/lib.rs#L1482 |
AdminUtils.sudo_set_owner_cut_enabled |
pallets/admin-utils/src/lib.rs#L2272 |
AdminUtils.sudo_set_owner_cut_auto_lock_enabled |
pallets/admin-utils/src/lib.rs#L2296 |
Every file is browsable under /code exactly as built into the runtime, or as plain text under /code/raw/<path> (index: /code/index.json).