Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Release/6.7.0 #1674

Merged
merged 48 commits into from
Jan 25, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
48 commits
Select commit Hold shift + click to select a range
6104299
First docstrings formatting PR
Jan 22, 2024
2fc4826
take bt.config as a first argument regardless if specified by 'config…
ifrit98 Jan 22, 2024
52ee874
Merge pull request #1663 from rajkaramchedu/rajk/1-docstrings
ifrit98 Jan 22, 2024
864f273
Second docstrings formatting PR
Jan 23, 2024
cee7b32
Third docstrings formatting PR
Jan 23, 2024
426cad6
Merge pull request #1665 from rajkaramchedu/rajk/2-docstrings
ifrit98 Jan 23, 2024
f028548
Merge branch 'staging' into rajk/3-docstrings
ifrit98 Jan 23, 2024
65b370a
Merge pull request #1666 from rajkaramchedu/rajk/3-docstrings
ifrit98 Jan 23, 2024
00987a7
ensure branch off from staging and rm old docs
ifrit98 Jan 23, 2024
2516715
Merge branch 'staging' into bugfix/subtensor-config-slice-error
ifrit98 Jan 23, 2024
eacf48e
staging black format fix
ifrit98 Jan 23, 2024
da10732
upodated mac yaml:
Jan 23, 2024
5d868e3
Merge pull request #1668 from dougsillars/staging
ifrit98 Jan 23, 2024
991d05b
black format
ifrit98 Jan 23, 2024
6f59509
black format
ifrit98 Jan 23, 2024
1f72ddc
Merge branch 'staging' into bugfix/subtensor-config-slice-error
ifrit98 Jan 23, 2024
146e3af
Merge branch 'staging' into docs/make-clear-pr-rules
ifrit98 Jan 23, 2024
a2271f0
Merge branch 'staging' into staging-black-format
ifrit98 Jan 23, 2024
ef2c3f5
Fourth docstrings formatting PR
Jan 24, 2024
6e3f0c6
Fifth docstrings formatting PR
Jan 24, 2024
fa54a0a
Merge pull request #1670 from rajkaramchedu/rajk/4-docstrings
ifrit98 Jan 24, 2024
c8809f6
Merge branch 'staging' into rajk/5-docstrings
ifrit98 Jan 24, 2024
2709abb
Merge branch 'staging' into docs/make-clear-pr-rules
ifrit98 Jan 24, 2024
79f4f3a
Merge branch 'staging' into staging-black-format
ifrit98 Jan 24, 2024
c78f0c7
Merge pull request #1671 from rajkaramchedu/rajk/5-docstrings
ifrit98 Jan 24, 2024
1f3e7c0
Merge branch 'staging' into staging-black-format
ifrit98 Jan 24, 2024
22032aa
Merge branch 'staging' into docs/make-clear-pr-rules
ifrit98 Jan 24, 2024
3c61105
black
ifrit98 Jan 24, 2024
b4eb074
Merge branch 'staging' into bugfix/subtensor-config-slice-error
ifrit98 Jan 24, 2024
0f92029
Merge pull request #1667 from opentensor/docs/make-clear-pr-rules
ifrit98 Jan 24, 2024
045c606
Merge branch 'staging' into staging-black-format
ifrit98 Jan 24, 2024
cbac836
Merge branch 'staging' into bugfix/subtensor-config-slice-error
ifrit98 Jan 24, 2024
8ebda24
Merge pull request #1669 from opentensor/staging-black-format
ifrit98 Jan 24, 2024
df94fe5
Merge branch 'staging' into bugfix/subtensor-config-slice-error
ifrit98 Jan 24, 2024
d9a19c6
wallet history url for taostats
ifrit98 Jan 24, 2024
005b221
black
ifrit98 Jan 24, 2024
b416c44
Merge pull request #1672 from opentensor/wallet-history/tao-stats-url
ifrit98 Jan 24, 2024
e671156
Merge branch 'staging' into bugfix/subtensor-config-slice-error
ifrit98 Jan 24, 2024
64a7cc9
Merge pull request #1664 from opentensor/bugfix/subtensor-config-slic…
ifrit98 Jan 24, 2024
8fcb02f
Updated Bittensor API HYPERPARAMS with newly added ones.
Saevitus Jan 24, 2024
38eb272
Removed sensitive hparams
Saevitus Jan 24, 2024
4a427ce
Removed sensitive hparams
Saevitus Jan 24, 2024
2c6e167
Merge branch 'staging' into hparams-update
ifrit98 Jan 24, 2024
207bfd2
add bool typecheck for reg allowed
ifrit98 Jan 24, 2024
b08fd58
Merge pull request #1673 from opentensor/hparams-update
ifrit98 Jan 24, 2024
936e52f
Merge branch 'master' into release/6.7.0
ifrit98 Jan 24, 2024
8ec92f7
proper bool eval
ifrit98 Jan 25, 2024
e714414
release pre-process steps
ifrit98 Jan 25, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
23 changes: 23 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,28 @@
# Changelog


## 6.7.0 / 2024-01-25

## What's Changed
* First docstrings formatting PR by @rajkaramchedu in https://github.com/opentensor/bittensor/pull/1663
* Second docstrings formatting PR by @rajkaramchedu in https://github.com/opentensor/bittensor/pull/1665
* Third docstrings formatting PR by @rajkaramchedu in https://github.com/opentensor/bittensor/pull/1666
* updated mac yaml mac yaml by @dougsillars in https://github.com/opentensor/bittensor/pull/1668
* Fourth docstrings formatting PR by @rajkaramchedu in https://github.com/opentensor/bittensor/pull/1670
* Fifth docstrings formatting PR by @rajkaramchedu in https://github.com/opentensor/bittensor/pull/1671
* ensure branch off from staging and rm old docs by @ifrit98 in https://github.com/opentensor/bittensor/pull/1667
* staging black format fix by @ifrit98 in https://github.com/opentensor/bittensor/pull/1669
* wallet history url for taostats by @ifrit98 in https://github.com/opentensor/bittensor/pull/1672
* take bt.config as a first argument regardless if specified by @ifrit98 in https://github.com/opentensor/bittensor/pull/1664
* Hparams update by @ifrit98 in https://github.com/opentensor/bittensor/pull/1673

## New Contributors
* @rajkaramchedu made their first contribution in https://github.com/opentensor/bittensor/pull/1663
* @dougsillars made their first contribution in https://github.com/opentensor/bittensor/pull/1668

**Full Changelog**: https://github.com/opentensor/bittensor/compare/v6.6.1...v6.7.0


## 6.6.1 / 2024-01-17

## What's Changed
Expand Down
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
6.6.1
6.7.0
2 changes: 1 addition & 1 deletion bittensor/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
nest_asyncio.apply()

# Bittensor code and protocol version.
__version__ = "6.6.1"
__version__ = "6.7.0"

version_split = __version__.split(".")
__version_as_int__ = (
Expand Down
362 changes: 167 additions & 195 deletions bittensor/axon.py

Large diffs are not rendered by default.

191 changes: 87 additions & 104 deletions bittensor/commands/delegates.py

Large diffs are not rendered by default.

70 changes: 37 additions & 33 deletions bittensor/commands/identity.py
Original file line number Diff line number Diff line change
Expand Up @@ -9,21 +9,22 @@

class SetIdentityCommand:
"""
Executes the 'set_identity' command within the Bittensor network, which allows for the
creation or update of a delegate's on-chain identity. This identity includes various
Executes the :func:`set_identity` command within the Bittensor network, which allows for the creation or update of a delegate's on-chain identity.

This identity includes various
attributes such as display name, legal name, web URL, PGP fingerprint, and contact
information, among others.

Optional Arguments:
--display: The display name for the identity.
--legal: The legal name for the identity.
--web: The web URL for the identity.
--riot: The riot handle for the identity.
--email: The email address for the identity.
--pgp_fingerprint: The PGP fingerprint for the identity.
--image: The image URL for the identity.
--info: The info for the identity.
--twitter: The twitter URL for the identity.
- ``display``: The display name for the identity.
- ``legal``: The legal name for the identity.
- ``web``: The web URL for the identity.
- ``riot``: The riot handle for the identity.
- ``email``: The email address for the identity.
- ``pgp_fingerprint``: The PGP fingerprint for the identity.
- ``image``: The image URL for the identity.
- ``info``: The info for the identity.
- ``twitter``: The X (twitter) URL for the identity.

The command prompts the user for the different identity attributes and validates the
input size for each attribute. It provides an option to update an existing validator
Expand All @@ -33,25 +34,26 @@ class SetIdentityCommand:
Each field has a maximum size of 64 bytes. The PGP fingerprint field is an exception
and has a maximum size of 20 bytes. The user is prompted to enter the PGP fingerprint
as a hex string, which is then converted to bytes. The user is also prompted to enter
the coldkey or hotkey ss58 address for the identity to be updated. If the user does
the coldkey or hotkey ``ss58`` address for the identity to be updated. If the user does
not have a hotkey, the coldkey address is used by default.

If setting a validator identity, the hotkey will be used by default. If the user is
setting an identity for a subnet, the coldkey will be used by default.

Usage:
The user should call this command from the command line and follow the interactive
prompts to enter or update the identity information. The command will display the
updated identity details in a table format upon successful execution.
The user should call this command from the command line and follow the interactive
prompts to enter or update the identity information. The command will display the
updated identity details in a table format upon successful execution.

Example usage::

Example usage:
>>> btcli root set_identity
btcli wallet set_identity

Note:
This command should only be used if the user is willing to incur the 1 TAO transaction
fee associated with setting an identity on the blockchain. It is a high-level command
that makes changes to the blockchain state and should not be used programmatically as
part of other scripts or applications.
This command should only be used if the user is willing to incur the 1 TAO transaction
fee associated with setting an identity on the blockchain. It is a high-level command
that makes changes to the blockchain state and should not be used programmatically as
part of other scripts or applications.
"""

def run(cli: "bittensor.cli"):
Expand Down Expand Up @@ -240,33 +242,35 @@ def add_args(parser: argparse.ArgumentParser):

class GetIdentityCommand:
"""
Executes the 'get_identity' command, which retrieves and displays the identity details
of a user's coldkey or hotkey associated with the Bittensor network. This function
Executes the :func:`get_identity` command, which retrieves and displays the identity details of a user's coldkey or hotkey associated with the Bittensor network. This function
queries the subtensor chain for information such as the stake, rank, and trust associated
with the provided key.

Optional Arguments:
--key: The ss58 address of the coldkey or hotkey to query.
- ``key``: The ``ss58`` address of the coldkey or hotkey to query.

The command performs the following actions:

- Connects to the subtensor network and retrieves the identity information.
- Displays the information in a structured table format.

The displayed table includes:
- Address: The ss58 address of the queried key.
- Item: Various attributes of the identity such as stake, rank, and trust.
- Value: The corresponding values of the attributes.

- **Address**: The ``ss58`` address of the queried key.
- **Item**: Various attributes of the identity such as stake, rank, and trust.
- **Value**: The corresponding values of the attributes.

Usage:
The user must provide an ss58 address as input to the command. If the address is not
provided in the configuration, the user is prompted to enter one.
The user must provide an ``ss58`` address as input to the command. If the address is not
provided in the configuration, the user is prompted to enter one.

Example usage::

Example usage:
>>> btli get_identity --key <s58_address>
btcli wallet get_identity --key <s58_address>

Note:
This function is designed for CLI use and should be executed in a terminal. It is
primarily used for informational purposes and has no side effects on the network state.
This function is designed for CLI use and should be executed in a terminal. It is
primarily used for informational purposes and has no side effects on the network state.
"""

def run(cli: "bittensor.cli"):
Expand Down
43 changes: 23 additions & 20 deletions bittensor/commands/inspect.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,41 +73,44 @@ def _get_hotkey_wallets_for_wallet(wallet) -> List["bittensor.wallet"]:

class InspectCommand:
"""
Executes the 'inspect' command, which compiles and displays a detailed report of a user's
wallet pairs (coldkey, hotkey) on the Bittensor network. This report includes balance and
Executes the ``inspect`` command, which compiles and displays a detailed report of a user's wallet pairs (coldkey, hotkey) on the Bittensor network.

This report includes balance and
staking information for both the coldkey and hotkey associated with the wallet.

Optional arguments:
-all: If set to True, the command will inspect all wallets located within the specified
path. If set to False, the command will inspect only the wallet specified by the user.
- ``all``: If set to ``True``, the command will inspect all wallets located within the specified path. If set to ``False``, the command will inspect only the wallet specified by the user.

The command gathers data on:

- Coldkey balance and delegated stakes.
- Hotkey stake and emissions per neuron on the network.
- Delegate names and details fetched from the network.

The resulting table includes columns for:
- Coldkey: The coldkey associated with the user's wallet.
- Balance: The balance of the coldkey.
- Delegate: The name of the delegate to which the coldkey has staked funds.
- Stake: The amount of stake held by both the coldkey and hotkey.
- Emission: The emission or rewards earned from staking.
- Netuid: The network unique identifier of the subnet where the hotkey is active.
- Hotkey: The hotkey associated with the neuron on the network.

- **Coldkey**: The coldkey associated with the user's wallet.
- **Balance**: The balance of the coldkey.
- **Delegate**: The name of the delegate to which the coldkey has staked funds.
- **Stake**: The amount of stake held by both the coldkey and hotkey.
- **Emission**: The emission or rewards earned from staking.
- **Netuid**: The network unique identifier of the subnet where the hotkey is active.
- **Hotkey**: The hotkey associated with the neuron on the network.

Usage:
This command can be used to inspect a single wallet or all wallets located within a
specified path. It is useful for a comprehensive overview of a user's participation
and performance in the Bittensor network.
This command can be used to inspect a single wallet or all wallets located within a
specified path. It is useful for a comprehensive overview of a user's participation
and performance in the Bittensor network.

Example usage::

Example usage:
>>> btcli inspect
>>> btcli inspect --all
btcli wallet inspect
btcli wallet inspect --all

Note:
The 'inspect' command is for displaying information only and does not perform any
transactions or state changes on the Bittensor network. It is intended to be used as
part of the Bittensor CLI and not as a standalone function within user code.
The ``inspect`` command is for displaying information only and does not perform any
transactions or state changes on the Bittensor network. It is intended to be used as
part of the Bittensor CLI and not as a standalone function within user code.
"""

@staticmethod
Expand Down
22 changes: 10 additions & 12 deletions bittensor/commands/list.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,28 +26,26 @@

class ListCommand:
"""
Executes the 'list' command which enumerates all wallets and their respective hotkeys
present in the user's Bittensor configuration directory. The command organizes the
information in a tree structure, displaying each wallet along with the SS58 addresses
for the coldkey public key and any hotkeys associated with it.
Executes the ``list`` command which enumerates all wallets and their respective hotkeys present in the user's Bittensor configuration directory.

The command organizes the information in a tree structure, displaying each wallet along with the ``ss58`` addresses for the coldkey public key and any hotkeys associated with it.

Optional arguments:
-p, --path: The path to the Bittensor configuration directory. Defaults to '~/.bittensor'.
- ``-p``, ``--path``: The path to the Bittensor configuration directory. Defaults to '~/.bittensor'.

The output is presented in a hierarchical tree format, with each wallet as a root node,
and any associated hotkeys as child nodes. The SS58 address is displayed for each
and any associated hotkeys as child nodes. The ``ss58`` address is displayed for each
coldkey and hotkey that is not encrypted and exists on the device.

Usage:
Upon invocation, the command scans the wallet directory and prints a list of all wallets,
indicating whether the public keys are available ('?' denotes unavailable or encrypted keys).
Upon invocation, the command scans the wallet directory and prints a list of all wallets, indicating whether the public keys are available (``?`` denotes unavailable or encrypted keys).

Example usage::

Example usage:
>>> btcli list --path ~/.bittensor
btcli wallet list --path ~/.bittensor

Note:
This command is read-only and does not modify the filesystem or the network state. It is
intended for use within the Bittensor CLI to provide a quick overview of the user's wallets.
This command is read-only and does not modify the filesystem or the network state. It is intended for use within the Bittensor CLI to provide a quick overview of the user's wallets.
"""

@staticmethod
Expand Down
29 changes: 15 additions & 14 deletions bittensor/commands/metagraph.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,16 +26,18 @@

class MetagraphCommand:
"""
Executes the 'metagraph' command to retrieve and display the entire metagraph
for a specified network. This metagraph contains detailed information about
Executes the ``metagraph`` command to retrieve and display the entire metagraph for a specified network.

This metagraph contains detailed information about
all the neurons (nodes) participating in the network, including their stakes,
trust scores, and more.

Optional arguments:
--netuid: The netuid of the network to query. Defaults to the default network UID.
--subtensor.network: The name of the network to query. Defaults to the default network name.
- ``--netuid``: The netuid of the network to query. Defaults to the default network UID.
- ``--subtensor.network``: The name of the network to query. Defaults to the default network name.

The table displayed includes the following columns for each neuron:

- UID: Unique identifier of the neuron.
- STAKE(τ): Total stake of the neuron in Tau (τ).
- RANK: Rank score of the neuron.
Expand All @@ -52,21 +54,20 @@ class MetagraphCommand:
- HOTKEY: Partial hotkey (public key) of the neuron.
- COLDKEY: Partial coldkey (public key) of the neuron.

The command also prints network-wide statistics such as total stake, issuance,
and difficulty.
The command also prints network-wide statistics such as total stake, issuance, and difficulty.

Usage:
The user must specify the network UID to query the metagraph. If not specified,
the default network UID is used.
The user must specify the network UID to query the metagraph. If not specified, the default network UID is used.

Example usage::

Example usage:
>>> btcli metagraph --netuid 0 # Root network
>>> btcli metagraph --netuid 1 --subtensor.network test
btcli subnet metagraph --netuid 0 # Root network
btcli subnet metagraph --netuid 1 --subtensor.network test

Note:
This command provides a snapshot of the network's state at the time of calling.
It is useful for network analysis and diagnostics. It is intended to be used as
part of the Bittensor CLI and not as a standalone function within user code.
This command provides a snapshot of the network's state at the time of calling.
It is useful for network analysis and diagnostics. It is intended to be used as
part of the Bittensor CLI and not as a standalone function within user code.
"""

@staticmethod
Expand Down
16 changes: 10 additions & 6 deletions bittensor/commands/misc.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,22 +28,26 @@

class UpdateCommand:
"""
Executes the 'update' command to update the local Bittensor package. This command performs a series of operations to ensure that the user's local Bittensor installation is updated to the latest version from the master branch of its GitHub repository. It primarily involves pulling the latest changes from the repository and reinstalling the package.
Executes the ``update`` command to update the local Bittensor package.

This command performs a series of operations to ensure that the user's local Bittensor installation is updated to the latest version from the master branch of its GitHub repository. It primarily involves pulling the latest changes from the repository and reinstalling the package.

Usage:
Upon invocation, the command first checks the user's configuration for the 'no_prompt' setting. If 'no_prompt' is set to True, or if the user explicitly confirms with 'Y' when prompted, the command proceeds to update the local Bittensor package. It changes the current directory to the Bittensor package directory, checks out the master branch of the Bittensor repository, pulls the latest changes, and then reinstalls the package using pip.
Upon invocation, the command first checks the user's configuration for the ``no_prompt`` setting. If ``no_prompt`` is set to ``True``, or if the user explicitly confirms with ``Y`` when prompted, the command proceeds to update the local Bittensor package. It changes the current directory to the Bittensor package directory, checks out the master branch of the Bittensor repository, pulls the latest changes, and then reinstalls the package using ``pip``.

The command structure is as follows:

1. Change directory to the Bittensor package directory.
2. Check out the master branch of the Bittensor GitHub repository.
3. Pull the latest changes with the '--ff-only' option to ensure a fast-forward update.
3. Pull the latest changes with the ``--ff-only`` option to ensure a fast-forward update.
4. Reinstall the Bittensor package using pip.

Example usage:
>>> btcli legacy update
Example usage::

btcli legacy update

Note:
This command is intended to be used within the Bittensor CLI to facilitate easy updates of the Bittensor package. It should be used with caution as it directly affects the local installation of the package. It is recommended to ensure that any important data or configurations are backed up before running this command.
This command is intended to be used within the Bittensor CLI to facilitate easy updates of the Bittensor package. It should be used with caution as it directly affects the local installation of the package. It is recommended to ensure that any important data or configurations are backed up before running this command.
"""

@staticmethod
Expand Down
Loading