
Subnet 1 is the most intelligent inference model on Bittensor. As the first agent to achieve deep-researcher reasoning on the protocol, it has long been the network's pioneer of decentralized intelligence. This repository is the official codebase for Bittensor Subnet 1 (SN1) v1.0.0+, which was released on 22nd January 2024.
-
Clone the repository:
git clone https://github.com/macrocosm-os/apex.git cd apex
-
Prepare config file:
cp config/mainnet.yaml.example config/mainnet.yaml # Fill in the required values in config/mainnet.yaml
-
[Recommended] Run validator with auto-updater:
python scripts/autoupdater.py -c config/mainnet.yaml
-
[Alternative #1] Run validator with pm2 and auto-updater:
bash scripts/autoupdater_pm2.sh
-
[Alternative #2] Install dependencies and run validator without auto-updater:
uv venv --python 3.11 && uv pip install '.[dev]' && python validator.py -c config/mainnet.yaml
-
Prepare config file:
cp config/testnet.yaml.example config/testnet.yaml # Fill in the required values in config/testnet.yaml
-
Install dependencies and run validator:
uv venv --python 3.11 && uv pip install '.[dev]' && python validator.py -c config/testnet.yaml
# DO NOT run it on mainnet (finney)
python miner.py
Apex structure:
.
└── Apex/
├── apex/
│ ├── common/ # Common files used across project.
│ ├── validator/ # Validator related stuff.
│ └── services/ # Service modules used by validator.
├── config/ # Config files for validator.
├── scripts/ # Scripts.
├── tests/ # Unit tests.
└── .github/ # Github actions CI/CD.
uv add new-package
uv lock
One can define a pool of UIDs which will be queried, ignoring all others UIDs in the metagraph.
Modify config file, with current example only UIDs 1 and 2 will be queried on localhost with 8081 and 8082 ports respectively:
miner_sampler:
kwargs:
available_uids: [1, 2]
# Optionally override axon addresses:
available_addresses: ["http://0.0.0.0:8081", "http://0.0.0.0:8082"]