Skip to content

Commit

Permalink
fix: fixed from PR feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
codebender37 committed Dec 4, 2024
1 parent 041143a commit b24b780
Show file tree
Hide file tree
Showing 4 changed files with 2 additions and 7 deletions.
4 changes: 1 addition & 3 deletions .env.miner.example
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ SUBTENSOR_ENDPOINT=wss://entrypoint-finney.opentensor.ai:443
# NETUID=98
# SUBTENSOR_NETWORK=test
# SUBTENSOR_ENDPOINT=ws://testnet-lite:9944
# VALIDATOR_MIN_STAKE=20000

# Task related config
# this a maximum of 4 workers may submit responses for a single task
Expand Down Expand Up @@ -48,6 +49,3 @@ S3_PUBLIC_URL=
JWT_SECRET=
# e.g. infura, alchemy API url for ethereum
ETHEREUM_NODE=

# Add this line with other environment variables
VALIDATOR_MIN_STAKE=20000
2 changes: 1 addition & 1 deletion commons/score_storage.py
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class ScoreStorage:
"""Handles persistence of validator scores"""

SCORES_DIR = Path("scores")
SCORES_FILE = SCORES_DIR / "validator_scores.pt"
SCORES_FILE = SCORES_DIR / "miner_scores.pt"

@classmethod
async def migrate_from_db(cls) -> bool:
Expand Down
1 change: 0 additions & 1 deletion dojo/utils/uids.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@ def is_miner(metagraph: bt.metagraph, uid: int) -> bool:
stakes = metagraph.S.tolist()
from dojo import VALIDATOR_MIN_STAKE

print(f"Validator min stake {VALIDATOR_MIN_STAKE}")
return stakes[uid] < VALIDATOR_MIN_STAKE


Expand Down
2 changes: 0 additions & 2 deletions neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,6 @@
set_expire_time,
ttl_get_block,
)
from database.client import connect_db
from dojo import __spec_version__
from dojo.protocol import (
CompletionResponses,
Expand Down Expand Up @@ -731,7 +730,6 @@ async def save_state(

async def _load_state(self):
try:
await connect_db()
scores = await ScoreStorage.load()

if scores is None:
Expand Down

0 comments on commit b24b780

Please sign in to comment.