generated from opentensor/bittensor-subnet-template
-
Notifications
You must be signed in to change notification settings - Fork 40
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Changes: - New multi-choice benchmarking task; - Refactor changes (.env config-based, decoupled parts of the code); - Poetry setup; - Only 5 tasks are included: QA, DateQA, Summary, MultiChoice, Organic.
- Loading branch information
Showing
132 changed files
with
12,436 additions
and
7,728 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# The network UID [1, 61] | ||
NETUID=61 | ||
|
||
# The network name [test, finney, local] | ||
SUBTENSOR_NETWORK = "test" | ||
|
||
# The chain endpoint, only required to be set if you run local. | ||
SUBTENSOR_CHAIN_ENDPOINT = None | ||
|
||
# The name of your wallet. | ||
WALLET_NAME="miner" | ||
|
||
# The name of the hotkey associated with the validator wallet. | ||
HOTKEY="default" | ||
|
||
# Open port which can be used to connect to the network. | ||
AXON_PORT=22116 | ||
|
||
# The OpenAI API key (only needed for the OpenAI test miner). | ||
OPENAI_API_KEY="YOUR_API_HERE" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
# The network UID. If 1 for main, 61 for testnet. | ||
NETUID=61 | ||
|
||
# The network name [test, finney, local]. | ||
SUBTENSOR_NETWORK = "test" | ||
|
||
# The chain endpoint, only required to be set if you run local. | ||
SUBTENSOR_CHAIN_ENDPOINT = None | ||
|
||
# The name of your wallet. | ||
WALLET_NAME="validator" | ||
|
||
# The name of the hotkey associated with the validator wallet. | ||
HOTKEY="default" | ||
|
||
# Open port which can be used to connect to the network. | ||
AXON_PORT=22116 | ||
|
||
# HuggingFace Access Token. | ||
HF_TOKEN="" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
repos: | ||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v2.3.0 | ||
hooks: | ||
- id: check-yaml | ||
- id: end-of-file-fixer | ||
- id: trailing-whitespace | ||
- repo: https://github.com/astral-sh/ruff-pre-commit | ||
# Ruff version. | ||
rev: v0.5.2 | ||
hooks: | ||
# Run the linter. | ||
- id: ruff | ||
args: [ --fix ] | ||
# Run the formatter. | ||
- id: ruff-format |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
SHELL:=/bin/bash | ||
|
||
promote-changes: | ||
./scripts/promote_changes.sh | ||
./scripts/promote_changes.sh |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,59 @@ | ||
# **Miners** | ||
|
||
# ⚠️ **DISCLAIMER** ⚠️ **DO NOT RUN THIS MINER ON MAINNET!** | ||
|
||
> **The openai miner provided in this repo is _not intended_ to be run on mainnet!** | ||
> | ||
> **If you run the base miner on mainnet, you will not earn anything!** | ||
> It is provided as an example to help you build your own custom mining operation! | ||
> | ||
## Compute Requirements | ||
|
||
| Resource | Requirement | | ||
|---------------|-------------------| | ||
| **VRAM** | None | | ||
| **vCPU** | 8 vCPU | | ||
| **RAM** | 8 GB | | ||
| **Storage** | 80 GB | | ||
|
||
## Installation | ||
|
||
Clone this repository and run the [install.sh](./install.sh) script. | ||
|
||
```bash | ||
git clone https://github.com/opentensor/prompting.git | ||
cd prompting | ||
bash install.sh | ||
``` | ||
|
||
## Configuration | ||
⚠️ **Reminder! Do not run this miner on main!** ⚠️ | ||
Before running a miner, you will need to create a .env.miner environment file. It is necessary for you to provide the following | ||
|
||
```text | ||
NETUID= #[1, 61, 102] | ||
SUBTENSOR_NETWORK= #The network name [test, main, local] | ||
SUBTENSOR_CHAIN_ENDPOINT= #The chain endpoint [test if running on test, main if running on main, custom endpoint if running on local] | ||
WALLET_NAME= #Name of your wallet(coldkey) | ||
HOTKEY= #Name of your hotkey associated with above wallet | ||
AXON_PORT= #Number of the open tcp port | ||
OPENAI_API_KEY= #The openai key that you would like to mine with | ||
``` | ||
## Testnet - RECOMMENDED | ||
We highly recommend that you run your miners on testnet before deploying on main. This is give you an opportunity to debug your systems, and ensure that you will not lose valuable immunity time. The SN1 testnet is **netuid 61**. | ||
|
||
In order to run on testnet, you will need to go through the same hotkey registration proceure as on main, but using **testtao**. You will need to ask for some in the community discord if you do not have any. | ||
|
||
Then, simply set test=True in your .env file and execute all other steps as before. | ||
|
||
Then post in the Subnet 1 channel on discord so we can activate a validator for your miner to respond to. | ||
|
||
You can use wandb to see how successful your miner would be on mainnet, an example notebook is pinned in the channel. | ||
|
||
## Running | ||
|
||
After creating the above environment file, run | ||
|
||
```bash | ||
pm2 start "poetry run python neurons/miners/openai/miner.py" | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,50 @@ | ||
# **VALIDATORS** | ||
|
||
## Compute Requirements | ||
|
||
| Resource | Requirement | | ||
|---------------|-------------------| | ||
| **VRAM** | 62 GB | | ||
| **vCPU** | 24 vCPU | | ||
| **RAM** | 60 GB | | ||
| **Storage** | 150 GB | | ||
|
||
## Installation | ||
|
||
Clone this repository and run the [install.sh](./install.sh) script. | ||
|
||
```bash | ||
git clone https://github.com/opentensor/prompting.git | ||
cd prompting | ||
bash install.sh | ||
``` | ||
|
||
You will also need to log into huggingface and accept the License Agreement for the LMSYS-Chat-1M dataset: https://huggingface.co/datasets/lmsys/lmsys-chat-1m : | ||
```shell | ||
huggingface-cli login | ||
``` | ||
|
||
## Configuration | ||
|
||
Before running a validator, you will need to create a .env.validator environment file. It is necessary for you to provide the following | ||
|
||
```text | ||
NETUID= #[1, 61, 102] | ||
SUBTENSOR_NETWORK= #The network name [test, main, local] | ||
SUBTENSOR_CHAIN_ENDPOINT= #The chain endpoint [test if running on test, main if running on main, custom endpoint if running on local] | ||
WALLET_NAME= #Name of your wallet(coldkey) | ||
HOTKEY= #Name of your hotkey associated with above wallet | ||
AXON_PORT= #Number of the open tcp port | ||
HF_TOKEN= #Access token from Hugging Face where you accepted the License Agreement for lmsys | ||
``` | ||
|
||
## Running | ||
|
||
After creating the above environment file, run | ||
|
||
```bash | ||
bash run.sh | ||
``` | ||
It will spawn 2 pm2 processes, one to run the validator and one to autoupdate. | ||
|
||
> Note: this is not an end solution, major releases or changes in requirements will still require you to manually restart the processes. Regularly monitor the health of your validator to ensure optimal performance. |
Oops, something went wrong.