Skip to content

Refactor/tests #69

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 16 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions ecosystem.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,36 @@ module.exports = {
},
args: `--wallet.name Bistro --wallet.hotkey M2 --device cuda:1 --subtensor.network local --netuid 2 --use_wandb --project "${PROJECT_NAME}"`
},
{
name: "TM3",
script: "neurons/miner.py",
interpreter: "python3",
env: {
...process.env,
PROJECT_NAME: PROJECT_NAME
},
args: `--wallet.name Bistro --wallet.hotkey M3 --device cuda:4 --subtensor.network local --netuid 2 --use_wandb --project "${PROJECT_NAME}"`
},
{
name: "TM4",
script: "neurons/miner.py",
interpreter: "python3",
env: {
...process.env,
PROJECT_NAME: PROJECT_NAME
},
args: `--wallet.name Bistro --wallet.hotkey M4 --device cuda:5 --subtensor.network local --netuid 2 --use_wandb --project "${PROJECT_NAME}"`
},
{
name: "TM5",
script: "neurons/miner.py",
interpreter: "python3",
env: {
...process.env,
PROJECT_NAME: PROJECT_NAME
},
args: `--wallet.name Bistro --wallet.hotkey M5 --device cuda:7 --subtensor.network local --netuid 2 --use_wandb --project "${PROJECT_NAME}"`
},
{
name: "TV1",
script: "neurons/validator.py",
Expand Down
7 changes: 5 additions & 2 deletions hparams.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,11 @@
"catch_up_threshold": 15,
"catch_up_batch_size": 5,
"catch_up_timeout": 300,
"uids_per_window": 2,
"time_window_delta_seconds": 20,
"reset_inactivity_windows": 25,
"max_gradient_score": 0.05
"max_gradient_score": 0.05,
"uids_per_window": 6,
"max_eval_peers": 6,
"peers_per_eval_round": 3
}

23 changes: 22 additions & 1 deletion justfile
Original file line number Diff line number Diff line change
Expand Up @@ -10,14 +10,35 @@ lint:
# Run both check and format in a single command
fix: lint

# Run the application and monitor with PM2
test-run:
./scripts/start.sh

# Install package in development mode using uv package manager
dev:
uv pip install --pre -e ".[dev]"

test: dev
uv run --prerelease=allow pytest -sv
uv run pytest -sv --prerelease=allow

# Run specific test file
test-file file:
uv run pytest -sv {{file}}

# Run tests with coverage
test-cov:
uv run pytest -sv --cov=src --cov-report=term-missing

# Run tests in parallel
# Do not use this . Current test have weird async behaviour
# and it breaks when you try to run this
test-parallel:
uv run pytest -sv -n auto

# Run tests matching a specific pattern
test-k pattern:
uv run pytest -sv -k "{{pattern}}"


bistro:
ps aux | grep Bistro
Empty file added neurons/__init__.py
Empty file.
3 changes: 2 additions & 1 deletion neurons/miner.py
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@
import asyncio
import argparse
import threading
from datetime import datetime, timedelta, timezone

# Third party
import torch
Expand Down Expand Up @@ -704,4 +705,4 @@ def handler(event):

# Start miner.
if __name__ == "__main__":
asyncio.run(Miner().run())
asyncio.run(Miner().run())
Loading
Loading