Quickstart
This guide will help you to understand the Bitmind Platform and how to use it. We will be deploying a deploy a miner to the BitMind subnet.
Prerequisites
- A supported wallet extension installed. Learn more about supported wallets.
- A GitHub account.
Sign in to the BitMind Platform
- Navigate to the BitMind Platform website.
- Click on
Get started
. - Sign in using your preferred method, or register a new account.
Workspace
The workspace is a development environment where you can develop and train your models. We currently support in-browser VS Code and Jupyter notebooks.
If you want to skip the training step, you can use the pre-trained base miner. Continue to the Miner
section to deploy the miner. Leave the MODEL_PATH
environment variable as default when deploying the miner.
Create a Workspace
- Navigate to the
Workspaces
page in the header. - Click on
New Workspace
. - Select the
Bitmind Toolkit
template. - Continue with the recommended compute options by clicking on
Next
. We recommend using a GPU for training models. - Review your workspace configuration. Optionally, you can change the name of the workspace.
- Click on
Looks good, deploy!
.
You must have sufficient compute credits to run a workspace instance. You can manage your compute credits in the Billing
page.
It may take up to a few minutes to spin up a new instance for your workspace. Once it is ready, you can use the buttons to open the workspace in the browser.
Train a Model
-
Open the workspace in the browser by clicking on
VS Code
. -
The bitmind-subnet repo will be cloned in the workspace. Navigate to the
docs/Mining.md
file and get started by following theInstallation
instructions. -
Follow the
Data
instructions to download the necessary datasets. -
Open a new terminal and navigate to the
base_miner/NPR
directory:cd base_miner/NPR
-
Ensure that the
bitmind
Conda environment that you created during the installation process is activated. Then, run thetrain_detector.py
file to train the model:python train_detector.py
-
Once the model is trained, copy the best model file from this experiment to the
mining_models
directory. Take note of the file name as we will use it later when deploying the miner:cd checkpoints/experiment_name* // Your experiment name cp model_epoch_best.pth ../../../../mining_models/model.pth
Publish the repository
Currently, GitHub is the only supported Git provider when deploying a miner. You will need to publish the repository to GitHub.
The easiest way to publish the repository is to use the Source Control tab in the left sidebar of VS Code. You can also use the terminal to push the repository to GitHub.
- Open the Source Control tab.
- Enter a commit message and click on the checkmark to commit the changes.
- You will be prompted to authenticate with GitHub. Follow the instructions to authenticate.
- You will be prompted to choose either a public or private repository. Choose the appropriate option.
- The repository will be published to GitHub.
Now that training is finished, you can stop the workspace to save on compute credits. Workspaces automatically stop after 2 hours of inactivity. You can always start the workspace again when you need to train a new model.
Miner
The miner is a neuron that runs on a given subnet. The miner will use the model you trained to make predictions on provided images.
Create a Miner
- Ensure that
TESTNET
is selected in the top right corner of the header. This will allow you to test out the platform without using real funds. - Navigate to the
Miners
page in the header. - Click on
New Miner
. - Choose the
BitMind
option, which will show subnet 168. - To connect to your git provider, click on
GitHub
. - Select the repository you published earlier.
- Continue with the recommended compute options by clicking on
Next
. - Optionally, you can change the name of the miner.
- Select the model file that you copied to the
mining_models
directory. - Before connecting to your wallet, you must change the wallet settings to use testnet. Learn more about changing networks.
- Click
Connect to wallet
and you will be prompted to select which wallet you would like to connect to. Select at least one wallet to continue. Learn more about supported wallets. - Select the coldkey that you connected in the previous step.
- Optionally, you can request testnet tokens to fund your wallet. If your balance is insufficient, you won't be able to register the miner. Either request test tokens from the Bittensor Discord, or reach out to our support team by joining our Discord server. Be vigilant of scammers and never share your seed phrase with anyone. BitMind staff will never ask for your seed phrase.
- Click
Add hotkey
and thenCreate hotkey
to create a new hotkey. This hotkey will be managed on your behalf by the BitMind platform. You can also choose to import an existing hotkey, but remember that you can only use one hotkey per neuron on a given subnet. - Select the hotkey that you created in the previous step.
- Click
Register hotkey
to sign and send aburnedRegistration
transaction to the network. The burn fee is shown on the button. This registration cost will be recycled, meaning it is not refundable. - You will be prompted to sign the transaction in your wallet extension. Enter your account password and click
Sign the transaction
to continue. - Review the deployment configuration and click on
Looks good, deploy!
.
It may take up to a few minutes to spin up a new instance for your miner. You will be automatically redirected to the miner page once the instance is ready.
That's it! You have successfully deployed a miner to the BitMind subnet. Check back later to see the miner's performance.