Skip to content

Commit fac14cc

Browse files
committed
Additional debug info
1 parent 5580ee2 commit fac14cc

File tree

1 file changed

+31
-7
lines changed

1 file changed

+31
-7
lines changed

bittensor_cli/cli.py

Lines changed: 31 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1963,6 +1963,7 @@ def wallet_overview(
19631963
"Hotkeys names must be a comma-separated list, e.g., `--exclude-hotkeys hk1,hk2`.",
19641964
)
19651965
logger.debug(
1966+
"args:\n"
19661967
f"all_wallets: {all_wallets}\n"
19671968
f"sort_by: {sort_by}\n"
19681969
f"sort_order: {sort_order}\n"
@@ -2060,6 +2061,7 @@ def wallet_transfer(
20602061
elif not amount:
20612062
amount = FloatPrompt.ask("Enter amount (in TAO) to transfer.")
20622063
logger.debug(
2064+
"args:\n"
20632065
f"destination: {destination_ss58_address}\n"
20642066
f"amount: {amount}\n"
20652067
f"transfer_all: {transfer_all}\n"
@@ -2137,6 +2139,7 @@ def wallet_swap_hotkey(
21372139
validate=WV.WALLET_AND_HOTKEY,
21382140
)
21392141
logger.debug(
2142+
"args:\n"
21402143
f"original_wallet: {original_wallet}\n"
21412144
f"new_wallet: {new_wallet}\n"
21422145
f"netuid: {netuid}\n"
@@ -2306,6 +2309,7 @@ def wallet_faucet(
23062309
validate=WV.WALLET,
23072310
)
23082311
logger.debug(
2312+
"args:\n"
23092313
f"network {network}\n"
23102314
f"threads_per_block {threads_per_block}\n"
23112315
f"update_interval {update_interval}\n"
@@ -2708,6 +2712,7 @@ def wallet_associate_hotkey(
27082712
f"[{COLORS.GENERAL.HK}]({hotkey_ss58})[/{COLORS.GENERAL.HK}]"
27092713
)
27102714
logger.debug(
2715+
"args:\n"
27112716
f"network {network}\n"
27122717
f"hotkey_ss58 {hotkey_ss58}\n"
27132718
f"hotkey_display {hotkey_display}\n"
@@ -2871,6 +2876,7 @@ def wallet_check_ck_swap(
28712876
print_error("Invalid block number")
28722877
raise typer.Exit()
28732878
logger.debug(
2879+
"args:\n"
28742880
f"scheduled_block {scheduled_block}\n"
28752881
f"ss58_address {ss58_address}\n"
28762882
f"network {network}\n"
@@ -3041,6 +3047,7 @@ def wallet_balance(
30413047
validate=validate,
30423048
)
30433049
logger.debug(
3050+
"args:\n"
30443051
f"all_balances {all_balances}\n"
30453052
f"ss58_addresses {ss58_addresses}\n"
30463053
f"network {network}"
@@ -3195,7 +3202,7 @@ def wallet_set_id(
31953202
additional,
31963203
github_repo,
31973204
)
3198-
logger.debug(f"identity {identity}\nnetwork {network}\n")
3205+
logger.debug(f"args:\nidentity {identity}\nnetwork {network}\n")
31993206

32003207
return self._run_command(
32013208
wallets.set_id(
@@ -3458,6 +3465,7 @@ def wallet_swap_coldkey(
34583465
)
34593466
new_wallet_coldkey_ss58 = new_wallet.coldkeypub.ss58_address
34603467
logger.debug(
3468+
"args:\n"
34613469
f"network {network}\n"
34623470
f"new_coldkey_ss58 {new_wallet_coldkey_ss58}\n"
34633471
f"force_swap {force_swap}"
@@ -3534,6 +3542,7 @@ def stake_list(
35343542
wallet_name, wallet_path, wallet_hotkey, ask_for=[WO.NAME, WO.PATH]
35353543
)
35363544
logger.debug(
3545+
"args:\n"
35373546
f"coldkey_ss58 {coldkey_ss58}\n"
35383547
f"network {network}\n"
35393548
f"live: {live}\n"
@@ -3809,6 +3818,7 @@ def stake_add(
38093818
)
38103819
raise typer.Exit()
38113820
logger.debug(
3821+
"args:\n"
38123822
f"network: {network}\n"
38133823
f"netuids: {netuids}\n"
38143824
f"stake_all: {stake_all}\n"
@@ -4090,6 +4100,7 @@ def stake_remove(
40904100
validate=WV.WALLET_AND_HOTKEY,
40914101
)
40924102
logger.debug(
4103+
"args:\n"
40934104
f"network: {network}\n"
40944105
f"hotkey_ss58_address: {hotkey_ss58_address}\n"
40954106
f"unstake_all: {unstake_all}\n"
@@ -4151,6 +4162,7 @@ def stake_remove(
41514162
)
41524163
return False
41534164
logger.debug(
4165+
"args:\n"
41544166
f"network: {network}\n"
41554167
f"hotkey_ss58_address: {hotkey_ss58_address}\n"
41564168
f"all_hotkeys: {all_hotkeys}\n"
@@ -4330,6 +4342,7 @@ def stake_move(
43304342
"Enter the [blue]destination subnet[/blue] (netuid) to move stake to"
43314343
)
43324344
logger.debug(
4345+
"args:\n"
43334346
f"network: {network}\n"
43344347
f"origin_netuid: {origin_netuid}\n"
43354348
f"origin_hotkey: {origin_hotkey}\n"
@@ -4506,6 +4519,7 @@ def stake_transfer(
45064519
"Enter the [blue]destination subnet[/blue] (netuid)"
45074520
)
45084521
logger.debug(
4522+
"args:\n"
45094523
f"network: {network}\n"
45104524
f"origin_hotkey: {origin_hotkey}\n"
45114525
f"origin_netuid: {origin_netuid}\n"
@@ -4624,6 +4638,7 @@ def stake_swap(
46244638
if not amount and not swap_all:
46254639
amount = FloatPrompt.ask("Enter the [blue]amount[/blue] to swap")
46264640
logger.debug(
4641+
"args:\n"
46274642
f"network: {network}\n"
46284643
f"origin_netuid: {origin_netuid}\n"
46294644
f"dest_netuid: {dest_netuid}\n"
@@ -4784,6 +4799,7 @@ def stake_set_children(
47844799
validate=WV.WALLET_AND_HOTKEY,
47854800
)
47864801
logger.debug(
4802+
"args:\n"
47874803
f"network: {network}\n"
47884804
f"netuid: {netuid}\n"
47894805
f"children: {children}\n"
@@ -4857,6 +4873,7 @@ def stake_revoke_children(
48574873
"Enter netuid (leave blank for all)", default=None, show_default=True
48584874
)
48594875
logger.debug(
4876+
"args:\n"
48604877
f"network: {network}\n"
48614878
f"netuid: {netuid}\n"
48624879
f"wait_for_inclusion: {wait_for_inclusion}\n"
@@ -4941,6 +4958,7 @@ def stake_childkey_take(
49414958
"Enter netuid (leave blank for all)", default=None, show_default=True
49424959
)
49434960
logger.debug(
4961+
"args:\n"
49444962
f"network: {network}\n"
49454963
f"netuid: {netuid}\n"
49464964
f"take: {take}\n"
@@ -5083,6 +5101,7 @@ def sudo_set(
50835101
wallet_name, wallet_path, wallet_hotkey, ask_for=[WO.NAME, WO.PATH]
50845102
)
50855103
logger.debug(
5104+
"args:\n"
50865105
f"network: {network}\n"
50875106
f"netuid: {netuid}\n"
50885107
f"param_name: {param_name}\n"
@@ -5208,7 +5227,7 @@ def sudo_senate_vote(
52085227
ask_for=[WO.NAME, WO.PATH, WO.HOTKEY],
52095228
validate=WV.WALLET_AND_HOTKEY,
52105229
)
5211-
logger.debug(f"network: {network}\nproposal: {proposal}\nvote: {vote}\n")
5230+
logger.debug(f"args:\nnetwork: {network}\nproposal: {proposal}\nvote: {vote}\n")
52125231
return self._run_command(
52135232
sudo.senate_vote(
52145233
wallet, self.initialize_chain(network), proposal, vote, prompt
@@ -5261,7 +5280,7 @@ def sudo_set_take(
52615280
f"Take value must be between {min_value} and {max_value}. Provided value: {take}"
52625281
)
52635282
raise typer.Exit()
5264-
logger.debug(f"network: {network}\ntake: {take}")
5283+
logger.debug(f"args:\nnetwork: {network}\ntake: {take}")
52655284
result = self._run_command(
52665285
sudo.set_take(wallet, self.initialize_chain(network), take)
52675286
)
@@ -5605,7 +5624,7 @@ def subnets_create(
56055624
logo_url=logo_url,
56065625
additional=additional_info,
56075626
)
5608-
logger.debug(f"network: {network}\nidentity: {identity}\n")
5627+
logger.debug(f"args:\nnetwork: {network}\nidentity: {identity}\n")
56095628
self._run_command(
56105629
subnets.create(
56115630
wallet, self.initialize_chain(network), identity, json_output, prompt
@@ -5667,7 +5686,7 @@ def subnets_start(
56675686
],
56685687
validate=WV.WALLET,
56695688
)
5670-
logger.debug(f"network: {network}\nnetuid: {netuid}\n")
5689+
logger.debug(f"args:\nnetwork: {network}\nnetuid: {netuid}\n")
56715690
return self._run_command(
56725691
subnets.start_subnet(
56735692
wallet,
@@ -5783,7 +5802,9 @@ def subnets_set_identity(
57835802
logo_url=logo_url,
57845803
additional=additional_info,
57855804
)
5786-
logger.debug(f"network: {network}\nnetuid: {netuid}\nidentity: {identity}")
5805+
logger.debug(
5806+
f"args:\nnetwork: {network}\nnetuid: {netuid}\nidentity: {identity}"
5807+
)
57875808
success = self._run_command(
57885809
subnets.set_identity(
57895810
wallet, self.initialize_chain(network), netuid, identity, prompt
@@ -5921,7 +5942,7 @@ def subnets_register(
59215942
ask_for=[WO.NAME, WO.HOTKEY],
59225943
validate=WV.WALLET_AND_HOTKEY,
59235944
)
5924-
logger.debug(f"network: {network}\nnetuid: {netuid}\nperiod: {period}\n")
5945+
logger.debug(f"args:\nnetwork: {network}\nnetuid: {netuid}\nperiod: {period}\n")
59255946
return self._run_command(
59265947
subnets.register(
59275948
wallet,
@@ -6365,6 +6386,7 @@ def liquidity_add(
63656386
err_console.print("The low price must be lower than the high price.")
63666387
return False
63676388
logger.debug(
6389+
f"args:\n"
63686390
f"hotkey: {hotkey}\n"
63696391
f"netuid: {netuid}\n"
63706392
f"liquidity: {liquidity_}\n"
@@ -6472,6 +6494,7 @@ def liquidity_remove(
64726494
return_wallet_and_hotkey=True,
64736495
)
64746496
logger.debug(
6497+
f"args:\n"
64756498
f"network: {network}\n"
64766499
f"hotkey: {hotkey}\n"
64776500
f"netuid: {netuid}\n"
@@ -6543,6 +6566,7 @@ def liquidity_modify(
65436566
negative_allowed=True,
65446567
)
65456568
logger.debug(
6569+
f"args:\n"
65466570
f"network: {network}\n"
65476571
f"hotkey: {hotkey}\n"
65486572
f"netuid: {netuid}\n"

0 commit comments

Comments
 (0)