bittensor-cli 8.4.2__py3-none-any.whl → 9.0.0rc1__py3-none-any.whl
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/__init__.py +2 -2
- bittensor_cli/cli.py +1503 -1372
- bittensor_cli/src/__init__.py +625 -197
- bittensor_cli/src/bittensor/balances.py +41 -8
- bittensor_cli/src/bittensor/chain_data.py +557 -428
- bittensor_cli/src/bittensor/extrinsics/registration.py +161 -47
- bittensor_cli/src/bittensor/extrinsics/root.py +14 -8
- bittensor_cli/src/bittensor/extrinsics/transfer.py +14 -21
- bittensor_cli/src/bittensor/minigraph.py +46 -8
- bittensor_cli/src/bittensor/subtensor_interface.py +572 -253
- bittensor_cli/src/bittensor/utils.py +326 -75
- bittensor_cli/src/commands/stake/__init__.py +154 -0
- bittensor_cli/src/commands/stake/children_hotkeys.py +123 -91
- bittensor_cli/src/commands/stake/move.py +1000 -0
- bittensor_cli/src/commands/stake/stake.py +1637 -1264
- bittensor_cli/src/commands/subnets/__init__.py +0 -0
- bittensor_cli/src/commands/subnets/price.py +867 -0
- bittensor_cli/src/commands/subnets/subnets.py +2043 -0
- bittensor_cli/src/commands/sudo.py +529 -26
- bittensor_cli/src/commands/wallets.py +231 -535
- bittensor_cli/src/commands/weights.py +15 -11
- {bittensor_cli-8.4.2.dist-info → bittensor_cli-9.0.0rc1.dist-info}/METADATA +7 -4
- bittensor_cli-9.0.0rc1.dist-info/RECORD +32 -0
- bittensor_cli/src/bittensor/async_substrate_interface.py +0 -2748
- bittensor_cli/src/commands/root.py +0 -1752
- bittensor_cli/src/commands/subnets.py +0 -897
- bittensor_cli-8.4.2.dist-info/RECORD +0 -31
- {bittensor_cli-8.4.2.dist-info → bittensor_cli-9.0.0rc1.dist-info}/WHEEL +0 -0
- {bittensor_cli-8.4.2.dist-info → bittensor_cli-9.0.0rc1.dist-info}/entry_points.txt +0 -0
- {bittensor_cli-8.4.2.dist-info → bittensor_cli-9.0.0rc1.dist-info}/top_level.txt +0 -0
@@ -7,7 +7,7 @@ from bittensor_wallet import Wallet
|
|
7
7
|
import numpy as np
|
8
8
|
from numpy.typing import NDArray
|
9
9
|
from rich.prompt import Confirm
|
10
|
-
from
|
10
|
+
from async_substrate_interface.errors import SubstrateRequestException
|
11
11
|
|
12
12
|
from bittensor_cli.src.bittensor.utils import err_console, console, format_error_message
|
13
13
|
from bittensor_cli.src.bittensor.extrinsics.root import (
|
@@ -134,7 +134,9 @@ class SetWeightsExtrinsic:
|
|
134
134
|
try:
|
135
135
|
success, message = await self.do_commit_weights(commit_hash=commit_hash)
|
136
136
|
except SubstrateRequestException as e:
|
137
|
-
err_console.print(
|
137
|
+
err_console.print(
|
138
|
+
f"Error committing weights: {format_error_message(e, self.subtensor.substrate)}"
|
139
|
+
)
|
138
140
|
# bittensor.logging.error(f"Error committing weights: {e}")
|
139
141
|
success = False
|
140
142
|
message = "No attempt made. Perhaps it is too soon to commit weights!"
|
@@ -146,7 +148,7 @@ class SetWeightsExtrinsic:
|
|
146
148
|
) -> tuple[bool, str]:
|
147
149
|
interval = int(
|
148
150
|
await self.subtensor.get_hyperparameter(
|
149
|
-
param_name="
|
151
|
+
param_name="get_commit_reveal_period",
|
150
152
|
netuid=self.netuid,
|
151
153
|
reuse_block=False,
|
152
154
|
)
|
@@ -255,7 +257,7 @@ class SetWeightsExtrinsic:
|
|
255
257
|
wait_for_finalization=self.wait_for_finalization,
|
256
258
|
)
|
257
259
|
except SubstrateRequestException as e:
|
258
|
-
return False, format_error_message(e)
|
260
|
+
return False, format_error_message(e, self.subtensor.substrate)
|
259
261
|
# We only wait here if we expect finalization.
|
260
262
|
if not self.wait_for_finalization and not self.wait_for_inclusion:
|
261
263
|
return True, "Not waiting for finalization or inclusion."
|
@@ -264,7 +266,9 @@ class SetWeightsExtrinsic:
|
|
264
266
|
if await response.is_success:
|
265
267
|
return True, "Successfully set weights."
|
266
268
|
else:
|
267
|
-
return False, format_error_message(
|
269
|
+
return False, format_error_message(
|
270
|
+
await response.error_message, self.subtensor.substrate
|
271
|
+
)
|
268
272
|
|
269
273
|
with console.status(
|
270
274
|
f":satellite: Setting weights on [white]{self.subtensor.network}[/white] ..."
|
@@ -310,7 +314,7 @@ class SetWeightsExtrinsic:
|
|
310
314
|
wait_for_finalization=self.wait_for_finalization,
|
311
315
|
)
|
312
316
|
except SubstrateRequestException as e:
|
313
|
-
return False, format_error_message(e)
|
317
|
+
return False, format_error_message(e, self.subtensor.substrate)
|
314
318
|
|
315
319
|
if not self.wait_for_finalization and not self.wait_for_inclusion:
|
316
320
|
success, error_message = True, ""
|
@@ -322,7 +326,9 @@ class SetWeightsExtrinsic:
|
|
322
326
|
else:
|
323
327
|
success, error_message = (
|
324
328
|
False,
|
325
|
-
format_error_message(
|
329
|
+
format_error_message(
|
330
|
+
await response.error_message, self.subtensor.substrate
|
331
|
+
),
|
326
332
|
)
|
327
333
|
|
328
334
|
if success:
|
@@ -372,7 +378,6 @@ async def reveal_weights(
|
|
372
378
|
weights: list[float],
|
373
379
|
salt: list[int],
|
374
380
|
version: int,
|
375
|
-
prompt: bool = True,
|
376
381
|
) -> None:
|
377
382
|
"""Reveal weights for a specific subnet."""
|
378
383
|
uids_ = np.array(
|
@@ -392,7 +397,7 @@ async def reveal_weights(
|
|
392
397
|
)
|
393
398
|
# Call the reveal function in the module set_weights from extrinsics package
|
394
399
|
extrinsic = SetWeightsExtrinsic(
|
395
|
-
subtensor, wallet, netuid, uids_, weights_, list(salt_), version
|
400
|
+
subtensor, wallet, netuid, uids_, weights_, list(salt_), version
|
396
401
|
)
|
397
402
|
success, message = await extrinsic.reveal(weight_uids, weight_vals)
|
398
403
|
|
@@ -410,7 +415,6 @@ async def commit_weights(
|
|
410
415
|
weights: list[float],
|
411
416
|
salt: list[int],
|
412
417
|
version: int,
|
413
|
-
prompt: bool = True,
|
414
418
|
):
|
415
419
|
"""Commits weights and then reveals them for a specific subnet"""
|
416
420
|
uids_ = np.array(
|
@@ -426,7 +430,7 @@ async def commit_weights(
|
|
426
430
|
dtype=np.int64,
|
427
431
|
)
|
428
432
|
extrinsic = SetWeightsExtrinsic(
|
429
|
-
subtensor, wallet, netuid, uids_, weights_, list(salt_), version
|
433
|
+
subtensor, wallet, netuid, uids_, weights_, list(salt_), version
|
430
434
|
)
|
431
435
|
success, message = await extrinsic.set_weights_extrinsic()
|
432
436
|
if success:
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: bittensor-cli
|
3
|
-
Version:
|
3
|
+
Version: 9.0.0rc1
|
4
4
|
Summary: Bittensor CLI
|
5
5
|
Home-page: https://github.com/opentensor/btcli
|
6
6
|
Author: bittensor.com
|
@@ -25,6 +25,7 @@ Requires-Python: >=3.9
|
|
25
25
|
Description-Content-Type: text/markdown
|
26
26
|
Requires-Dist: wheel
|
27
27
|
Requires-Dist: async-property==0.2.2
|
28
|
+
Requires-Dist: async-substrate-interface>=1.0.0rc10
|
28
29
|
Requires-Dist: aiohttp~=3.10.2
|
29
30
|
Requires-Dist: backoff~=2.2.1
|
30
31
|
Requires-Dist: GitPython>=3.0.0
|
@@ -38,11 +39,12 @@ Requires-Dist: pytest
|
|
38
39
|
Requires-Dist: python-Levenshtein
|
39
40
|
Requires-Dist: rich~=13.7
|
40
41
|
Requires-Dist: scalecodec==1.2.11
|
41
|
-
Requires-Dist: substrate-interface~=1.7.9
|
42
42
|
Requires-Dist: typer~=0.12
|
43
43
|
Requires-Dist: websockets>=14.1
|
44
|
-
Requires-Dist: bittensor-wallet>=
|
45
|
-
Requires-Dist:
|
44
|
+
Requires-Dist: bittensor-wallet>=3.0.2
|
45
|
+
Requires-Dist: plotille
|
46
|
+
Requires-Dist: pywry
|
47
|
+
Requires-Dist: plotly
|
46
48
|
Provides-Extra: cuda
|
47
49
|
Requires-Dist: cubit>=1.1.0; extra == "cuda"
|
48
50
|
Requires-Dist: torch; extra == "cuda"
|
@@ -50,6 +52,7 @@ Requires-Dist: torch; extra == "cuda"
|
|
50
52
|
<div align="center">
|
51
53
|
|
52
54
|
# Bittensor CLI <!-- omit in toc -->
|
55
|
+
### Rao Development Version
|
53
56
|
[](https://discord.gg/bittensor)
|
54
57
|
[](https://opensource.org/licenses/MIT)
|
55
58
|
[](https://badge.fury.io/py/bittensor_cli)
|
@@ -0,0 +1,32 @@
|
|
1
|
+
bittensor_cli/__init__.py,sha256=_wu53H9cImHNd2OosHWZFOfBvwei1MrAXYcHKWt97Oc,1216
|
2
|
+
bittensor_cli/cli.py,sha256=fPZXlch1DdsLsRgoIFrRUSrC-nTYoTrRFtAtH0cA4GQ,174067
|
3
|
+
bittensor_cli/doc_generation_helper.py,sha256=GexqjEIKulWg84hpNBEchJ840oOgOi7DWpt447nsdNI,91
|
4
|
+
bittensor_cli/src/__init__.py,sha256=lrffEuuv097_afKj12obl841l4CWYm1ijnshq2CSj_4,25382
|
5
|
+
bittensor_cli/src/bittensor/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
6
|
+
bittensor_cli/src/bittensor/balances.py,sha256=E-niENvR7lAaoS5ZyCmwl_9M-nspnkcuIxf_dHiJIDg,11078
|
7
|
+
bittensor_cli/src/bittensor/chain_data.py,sha256=6VyuoDLaJz2QC9NJz9x2Ampi2fdqXumg6cCFfN-Vpq4,30642
|
8
|
+
bittensor_cli/src/bittensor/minigraph.py,sha256=BIzmSVLfBYiRAeGD_i1LAC8Cw7zxp38a91SIFEPMqYc,10479
|
9
|
+
bittensor_cli/src/bittensor/networking.py,sha256=pZLMs8YXpZzDMLXWMBb_Bj6TVkm_q9khyY-lnbwVMuE,462
|
10
|
+
bittensor_cli/src/bittensor/subtensor_interface.py,sha256=koqbGIUhqHBpY4ckDF--kmwXjXb9hRK0ye5uFDUBL-g,53072
|
11
|
+
bittensor_cli/src/bittensor/utils.py,sha256=oFr_gKcKOSi1nR6hFA2lKpnnLcOZTg5dGbKlyZE3LnU,42353
|
12
|
+
bittensor_cli/src/bittensor/extrinsics/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
13
|
+
bittensor_cli/src/bittensor/extrinsics/registration.py,sha256=OYRq6hjKzKpZuMjsVK-3O6xeV3TCOZch3VEt8hGITjo,64169
|
14
|
+
bittensor_cli/src/bittensor/extrinsics/root.py,sha256=PvAPkLqfcCRLAR_d1qu3YfKhywFZuHuUyy5h_XZzfR8,19359
|
15
|
+
bittensor_cli/src/bittensor/extrinsics/transfer.py,sha256=mg7hyvQX2IGVh4hkTd1u_ouRi6U4t_HBgNtRbsWiHbM,8352
|
16
|
+
bittensor_cli/src/bittensor/templates/table.j2,sha256=P2EFiksnO1cQsB8zjK6hVJwUryHTsLslzRE0YtobAV8,10601
|
17
|
+
bittensor_cli/src/commands/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
18
|
+
bittensor_cli/src/commands/sudo.py,sha256=PTOTp0_OmWksi29k4d33qmNWZAOKAcjZyU7G3wNIdjs,26343
|
19
|
+
bittensor_cli/src/commands/wallets.py,sha256=VgTIgA9L-Ugf6n2ut3b9cmAeRKbfNznB0_mYKoeR6IA,49197
|
20
|
+
bittensor_cli/src/commands/weights.py,sha256=icJpHGLBxMUYvVUFkmPxMYuKAgBx4ELjY7f1WvX3rqg,16433
|
21
|
+
bittensor_cli/src/commands/stake/__init__.py,sha256=uxomMv_QrYt5Qn3_X5UWFFh45ISjB0JmDmCFxVyX8nQ,6495
|
22
|
+
bittensor_cli/src/commands/stake/children_hotkeys.py,sha256=HiiX8UaNdJHkDI7dfH7gNMrJuJmEdqZ6MmN3196-3nY,29977
|
23
|
+
bittensor_cli/src/commands/stake/move.py,sha256=yXpBiOZJy1L3-N8t5ezerGTMeaiQpsdqjxOA7EE1iXs,37467
|
24
|
+
bittensor_cli/src/commands/stake/stake.py,sha256=_0zUeEXm0iRQtqWAvk6qq9Y44GcItiyb2g9Ee9bdxYY,77686
|
25
|
+
bittensor_cli/src/commands/subnets/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
26
|
+
bittensor_cli/src/commands/subnets/price.py,sha256=TWcRXUFeS_Q-pfyv0YIluAL8SE7d2gzTODK-9M2J5pw,29878
|
27
|
+
bittensor_cli/src/commands/subnets/subnets.py,sha256=I-k_DEC2QMaNX1MR03-Nf6zhtmKkhcGnKoKmrEBSVYg,80062
|
28
|
+
bittensor_cli-9.0.0rc1.dist-info/METADATA,sha256=rpTXPB_DIPSF6tyijpkBxaOINsJ0DkBh8hyCow254lA,6862
|
29
|
+
bittensor_cli-9.0.0rc1.dist-info/WHEEL,sha256=tZoeGjtWxWRfdplE7E3d45VPlLNQnvbKiYnx7gwAy8A,92
|
30
|
+
bittensor_cli-9.0.0rc1.dist-info/entry_points.txt,sha256=hBTLGLbVxmAKy69XSKaUZvjTCmyEzDGZKq4S8UOto8I,49
|
31
|
+
bittensor_cli-9.0.0rc1.dist-info/top_level.txt,sha256=DvgvXpmTtI_Q1BbDZMlK90LFcGFCreN1daViEPV2iFw,14
|
32
|
+
bittensor_cli-9.0.0rc1.dist-info/RECORD,,
|