Skip to content

Commit

Permalink
fix: pass netuid
Browse files Browse the repository at this point in the history
  • Loading branch information
distributedstatemachine committed Dec 30, 2024
1 parent 01d4e24 commit bacb695
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 3 deletions.
2 changes: 2 additions & 0 deletions .env-template
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,8 @@ WALLET_HOTKEY=
CUDA_DEVICE=
NETWORK=
DEBUG=
NETUID=268

# R2 Configuration
R2_ACCOUNT_ID=

Expand Down
3 changes: 2 additions & 1 deletion docker/compose.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
services:
node:
image: ghcr.io/tplr-ai/templar:v0.0.4
image: ghcr.io/tplr-ai/templar:v0.0.6
container_name: templar-${NODE_TYPE:-miner}-${WALLET_HOTKEY}
restart: unless-stopped
volumes:
Expand All @@ -13,6 +13,7 @@ services:
- CUDA_DEVICE=${CUDA_DEVICE:-cuda:0}
- NETWORK=${NETWORK:-finney}
- DEBUG=${DEBUG:-false}
- NETUID=${NETUID:-268}
- WANDB_API_KEY=${WANDB_API_KEY}
- HOST_CUDA_VERSION=12.6
- R2_ACCOUNT_ID=${R2_ACCOUNT_ID}
Expand Down
4 changes: 3 additions & 1 deletion scripts/entrypoint.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
set -e

# Check required environment variables
for var in WALLET_NAME WALLET_HOTKEY NODE_TYPE WANDB_API_KEY; do
for var in WALLET_NAME WALLET_HOTKEY NODE_TYPE WANDB_API_KEY NETUID; do
if [ -z "${!var}" ]; then
echo "Error: $var environment variable is required"
exit 1
Expand Down Expand Up @@ -42,6 +42,7 @@ if [ "$NODE_TYPE" = "miner" ]; then
exec python3 neurons/miner.py \
--wallet.name ${WALLET_NAME} \
--wallet.hotkey ${WALLET_HOTKEY} \
--netuid ${NETUID} \
--device ${CUDA_DEVICE} \
--subtensor.network ${NETWORK} \
--use_wandb \
Expand All @@ -51,6 +52,7 @@ elif [ "$NODE_TYPE" = "validator" ]; then
exec python3 neurons/validator.py \
--wallet.name ${WALLET_NAME} \
--wallet.hotkey ${WALLET_HOTKEY} \
--netuid ${NETUID} \
--device ${CUDA_DEVICE} \
--subtensor.network ${NETWORK} \
--use_wandb \
Expand Down
2 changes: 1 addition & 1 deletion src/tplr/chain.py
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,7 @@ async def commit(self, wallet: "bt.wallet", bucket: Bucket) -> None:
bucket (Bucket): Bucket configuration to commit
"""
if self.netuid:
raise ValueError("Subtensor and netuid must be set for chain operations")
raise ValueError("netuid must be set for chain operations")

concatenated = (
bucket.account_id + bucket.access_key_id + bucket.secret_access_key
Expand Down

0 comments on commit bacb695

Please sign in to comment.