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

Sign in to the BitMind Platform

  1. Navigate to the BitMind Platform website.
  2. Click on Get started.
  3. 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.

Create a Workspace

  1. Navigate to the Workspaces page in the header.
  2. Click on New Workspace.
  3. Select the Bitmind Toolkit template.
  4. Continue with the recommended compute options by clicking on Next. We recommend using a GPU for training models.
  5. Review your workspace configuration. Optionally, you can change the name of the workspace.
  6. Click on Looks good, deploy!.

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

  1. Open the workspace in the browser by clicking on VS Code.

  2. The bitmind-subnet repo will be cloned in the workspace. Navigate to the docs/Mining.md file and get started by following the Installation instructions.

  3. Follow the Data instructions to download the necessary datasets.

  4. Open a new terminal and navigate to the base_miner/NPR directory:

    cd base_miner/NPR
    
  5. Ensure that the bitmind Conda environment that you created during the installation process is activated. Then, run the train_detector.py file to train the model:

    python train_detector.py
    
  6. 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.

  1. Open the Source Control tab.
  2. Enter a commit message and click on the checkmark to commit the changes.
  3. You will be prompted to authenticate with GitHub. Follow the instructions to authenticate.
  4. You will be prompted to choose either a public or private repository. Choose the appropriate option.
  5. The repository will be published to GitHub.

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

  1. 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.
  2. Navigate to the Miners page in the header.
  3. Click on New Miner.
  4. Choose the BitMind option, which will show subnet 168.
  5. To connect to your git provider, click on GitHub.
  6. Select the repository you published earlier.
  7. Continue with the recommended compute options by clicking on Next.
  8. Optionally, you can change the name of the miner.
  9. Select the model file that you copied to the mining_models directory.
  10. Before connecting to your wallet, you must change the wallet settings to use testnet. Learn more about changing networks.
  11. 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.
  12. Select the coldkey that you connected in the previous step.
  13. 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.
  14. Click Add hotkey and then Create 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.
  15. Select the hotkey that you created in the previous step.
  16. Click Register hotkey to sign and send a burnedRegistration transaction to the network. The burn fee is shown on the button. This registration cost will be recycled, meaning it is not refundable.
  17. You will be prompted to sign the transaction in your wallet extension. Enter your account password and click Sign the transaction to continue.
  18. 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.