bittensor.commands.misc#
Attributes#
Classes#
Executes the |
|
Show users how to install and run autocompletion for Bittensor CLI. |
Module Contents#
- bittensor.commands.misc.console#
- class bittensor.commands.misc.UpdateCommand[source]#
Executes the
updatecommand 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_promptsetting. Ifno_promptis set toTrue, or if the user explicitly confirms withYwhen 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 usingpip.
The command structure is as follows:
Change directory to the Bittensor package directory.
Check out the master branch of the Bittensor GitHub repository.
Pull the latest changes with the
--ff-onlyoption to ensure a fast-forward update.Reinstall the Bittensor package using pip.
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.
- static check_config(config)[source]#
- Parameters:
config (bittensor.config)
- static add_args(parser)[source]#
- Parameters:
parser (argparse.ArgumentParser)