Transactions

set-hyperparameter

Set an owner-settable subnet hyperparameter (btcli `sudo set`).

View as Markdown

Dispatches the matching AdminUtils sudo_set_* call for the named parameter. 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.

SignerPalletWraps
coldkeyAdminUtilsAdminUtils.sudo_set_immunity_period, AdminUtils.sudo_set_min_allowed_weights, AdminUtils.sudo_set_weights_version_key, AdminUtils.sudo_set_activity_cutoff, AdminUtils.sudo_set_min_burn, AdminUtils.sudo_set_bonds_moving_average, AdminUtils.sudo_set_serving_rate_limit, AdminUtils.sudo_set_commit_reveal_weights_interval, AdminUtils.sudo_set_max_allowed_uids, AdminUtils.sudo_set_burn_increase_mult, AdminUtils.sudo_set_burn_half_life, AdminUtils.sudo_set_commit_reveal_weights_enabled, AdminUtils.sudo_set_liquid_alpha_enabled, AdminUtils.sudo_set_network_pow_registration_allowed, AdminUtils.sudo_set_yuma3_enabled, AdminUtils.sudo_set_bonds_reset_enabled, AdminUtils.sudo_set_toggle_transfer, AdminUtils.sudo_set_owner_cut_enabled, AdminUtils.sudo_set_owner_cut_auto_lock_enabled

Parameters

ParameterTypeRequiredDescription
netuidintegeryesSubnet to configure; the signer must be its owner.
namestringyesHyperparameter to set. One of: activity_cutoff, bonds_moving_avg, bonds_reset_enabled, burn_half_life, burn_increase_mult, commit_reveal_period, commit_reveal_weights_enabled, immunity_period, liquid_alpha_enabled, max_allowed_uids, min_allowed_weights, min_burn, network_pow_registration_allowed, owner_cut_auto_lock_enabled, owner_cut_enabled, serving_rate_limit, transfers_enabled, weights_version, yuma3_enabled.
valueinteger | number | stringyesNew value. Give the raw on-chain integer, or the human form as a float or a string with a decimal point (a 0..1 fraction for normalized parameters, a TAO amount for rao parameters). Boolean parameters take true/false or 0/1.

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_coldkey

Python

import bittensor as sub
from bittensor.wallet import Wallet

wallet = Wallet(name="my_coldkey", hotkey="my_hotkey")
intent = sub.SetHyperparameter(netuid=1, name="...", value="...")

async with sub.Client("finney") as client:
    plan = await client.plan(intent, wallet)   # fee, effects, policy — no submission
    result = await client.execute(intent, wallet)
    if not result.success:
        print(result.error.code, result.error.remediation)

Or build it by op name, as an agent would:

await client.execute_tool("set_hyperparameter", {...}, wallet)