bittensor-cli 8.2.0rc7__tar.gz → 8.2.0rc9__tar.gz
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/PKG-INFO +1 -1
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/__init__.py +1 -1
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/cli.py +1 -1
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/commands/stake/stake.py +16 -15
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/commands/subnets.py +14 -8
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/commands/sudo.py +5 -1
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli.egg-info/PKG-INFO +1 -1
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/README.md +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/doc_generation_helper.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/__init__.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/__init__.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/async_substrate_interface.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/balances.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/chain_data.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/extrinsics/__init__.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/extrinsics/registration.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/extrinsics/root.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/extrinsics/transfer.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/minigraph.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/networking.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/subtensor_interface.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/templates/table.j2 +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/utils.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/commands/__init__.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/commands/stake/__init__.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/commands/stake/children_hotkeys.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/commands/wallets.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/commands/weights.py +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli.egg-info/SOURCES.txt +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli.egg-info/dependency_links.txt +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli.egg-info/entry_points.txt +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli.egg-info/requires.txt +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli.egg-info/top_level.txt +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/setup.cfg +0 -0
- {bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/setup.py +0 -0
@@ -1206,14 +1206,14 @@ async def unstake_selection(
|
|
1206
1206
|
|
1207
1207
|
hotkeys_info = []
|
1208
1208
|
for idx, (hotkey_ss58, netuid_stakes) in enumerate(hotkey_stakes.items()):
|
1209
|
-
|
1210
|
-
|
1211
|
-
|
1212
|
-
|
1213
|
-
|
1214
|
-
hotkey_name =
|
1215
|
-
|
1216
|
-
|
1209
|
+
if hk_identity := identities["hotkeys"].get(hotkey_ss58):
|
1210
|
+
hotkey_name = hk_identity.get("identity", {}).get(
|
1211
|
+
"name", ""
|
1212
|
+
) or hk_identity.get("display", "~")
|
1213
|
+
elif old_identity := old_identities.get(hotkey_ss58):
|
1214
|
+
hotkey_name = old_identity.display
|
1215
|
+
else:
|
1216
|
+
hotkey_name = "~"
|
1217
1217
|
# TODO: Add wallet ids here.
|
1218
1218
|
|
1219
1219
|
hotkeys_info.append(
|
@@ -1479,15 +1479,16 @@ async def _unstake_all(
|
|
1479
1479
|
total_received_value += received_amount
|
1480
1480
|
|
1481
1481
|
# Get hotkey identity
|
1482
|
-
|
1483
|
-
|
1484
|
-
) or old_identities.get(stake.hotkey_ss58)
|
1485
|
-
hotkey_display = stake.hotkey_ss58
|
1486
|
-
if identity:
|
1487
|
-
hotkey_name = identity.get("identity", {}).get(
|
1482
|
+
if hk_identity := ck_hk_identities["hotkeys"].get(stake.hotkey_ss58):
|
1483
|
+
hotkey_name = hk_identity.get("identity", {}).get(
|
1488
1484
|
"name", ""
|
1489
|
-
) or
|
1485
|
+
) or hk_identity.get("display", "~")
|
1490
1486
|
hotkey_display = f"{hotkey_name}"
|
1487
|
+
elif old_identity := old_identities.get(stake.hotkey_ss58):
|
1488
|
+
hotkey_name = old_identity.display
|
1489
|
+
hotkey_display = f"{hotkey_name}"
|
1490
|
+
else:
|
1491
|
+
hotkey_display = stake.hotkey_ss58
|
1491
1492
|
|
1492
1493
|
if dynamic_info.is_dynamic:
|
1493
1494
|
slippage_pct_float = (
|
@@ -801,7 +801,10 @@ async def show(
|
|
801
801
|
) -> Optional[str]:
|
802
802
|
async def show_root():
|
803
803
|
all_subnets = await subtensor.get_all_subnet_dynamic_info()
|
804
|
-
root_info = all_subnets
|
804
|
+
root_info = next((s for s in all_subnets if s.netuid == 0), None)
|
805
|
+
if root_info is None:
|
806
|
+
print_error("The root subnet does not exist")
|
807
|
+
raise typer.Exit()
|
805
808
|
|
806
809
|
hex_bytes_result, identities, old_identities = await asyncio.gather(
|
807
810
|
subtensor.query_runtime_api(
|
@@ -1035,24 +1038,27 @@ async def show(
|
|
1035
1038
|
subtensor.query_all_identities(),
|
1036
1039
|
subtensor.get_delegate_identities(),
|
1037
1040
|
)
|
1038
|
-
subnet_info = _subnet_info
|
1041
|
+
subnet_info = next((s for s in _subnet_info if s.netuid == netuid_), None)
|
1042
|
+
if subnet_info is None:
|
1043
|
+
print_error(f"Subnet {netuid_} does not exist")
|
1044
|
+
raise typer.Exit()
|
1039
1045
|
|
1040
1046
|
if (bytes_result := hex_bytes_result) is None:
|
1041
|
-
|
1042
|
-
|
1047
|
+
print_error(f"Subnet {netuid_} does not exist")
|
1048
|
+
raise typer.Exit()
|
1043
1049
|
|
1044
1050
|
if bytes_result.startswith("0x"):
|
1045
1051
|
bytes_result = bytes.fromhex(bytes_result[2:])
|
1046
1052
|
|
1047
1053
|
subnet_state: "SubnetState" = SubnetState.from_vec_u8(bytes_result)
|
1048
1054
|
if subnet_info is None:
|
1049
|
-
|
1050
|
-
|
1055
|
+
print_error(f"Subnet {netuid_} does not exist")
|
1056
|
+
raise typer.Exit()
|
1051
1057
|
elif len(subnet_state.hotkeys) == 0:
|
1052
|
-
|
1058
|
+
print_error(
|
1053
1059
|
f"Subnet {netuid_} is currently empty with 0 UIDs registered."
|
1054
1060
|
)
|
1055
|
-
|
1061
|
+
raise typer.Exit()
|
1056
1062
|
|
1057
1063
|
# Define table properties
|
1058
1064
|
table = Table(
|
@@ -1,6 +1,7 @@
|
|
1
1
|
import asyncio
|
2
2
|
from typing import TYPE_CHECKING, Union, Optional
|
3
3
|
|
4
|
+
import typer
|
4
5
|
from bittensor_wallet import Wallet
|
5
6
|
from bittensor_wallet.errors import KeyFileError
|
6
7
|
from rich import box
|
@@ -495,7 +496,10 @@ async def get_hyperparameters(subtensor: "SubtensorInterface", netuid: int):
|
|
495
496
|
return False
|
496
497
|
subnet = await subtensor.get_subnet_hyperparameters(netuid)
|
497
498
|
_subnet_info = await subtensor.get_all_subnet_dynamic_info()
|
498
|
-
subnet_info = _subnet_info
|
499
|
+
subnet_info = next((s for s in _subnet_info if s.netuid == netuid), None)
|
500
|
+
if subnet_info is None:
|
501
|
+
print_error(f"Subnet with netuid {netuid} does not exist.")
|
502
|
+
raise typer.Exit()
|
499
503
|
|
500
504
|
table = Table(
|
501
505
|
Column("[white]HYPERPARAMETER", style=COLOR_PALETTE['SUDO']['HYPERPARAMETER']),
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/extrinsics/__init__.py
RENAMED
File without changes
|
File without changes
|
{bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/extrinsics/root.py
RENAMED
File without changes
|
{bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/extrinsics/transfer.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
{bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/subtensor_interface.py
RENAMED
File without changes
|
{bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/bittensor/templates/table.j2
RENAMED
File without changes
|
File without changes
|
File without changes
|
{bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli/src/commands/stake/__init__.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{bittensor-cli-8.2.0rc7 → bittensor-cli-8.2.0rc9}/bittensor_cli.egg-info/dependency_links.txt
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|