Skip to content

Commit

Permalink
refactor: clean up TODOs, make scoring happen every hour
Browse files Browse the repository at this point in the history
  • Loading branch information
jarvis8x7b committed Oct 16, 2024
1 parent 760f41b commit 2510e10
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 13 deletions.
2 changes: 1 addition & 1 deletion commons/orm.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ class ORM:
async def get_last_expire_at_cutoff(
validator_hotkeys: list[str],
expire_at: datetime = datetime_as_utc(
datetime.now(timezone.utc) - 1.5 * timedelta(seconds=TASK_DEADLINE)
datetime.now(timezone.utc) - timedelta(seconds=TASK_DEADLINE)
),
) -> datetime:
"""
Expand Down
11 changes: 5 additions & 6 deletions docker-compose.miner.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -167,7 +167,7 @@ services:
logging: *default-logging

dojo-cli:
image: ghcr.io/tensorplex-labs/dojo:dev
image: ghcr.io/tensorplex-labs/dojo:main
volumes:
- ./:/app
- ./.env.miner:/app/.env
Expand All @@ -181,7 +181,7 @@ services:
# ============== TEST NET ============== #

miner-testnet-decentralised:
image: ghcr.io/tensorplex-labs/dojo:dev
image: ghcr.io/tensorplex-labs/dojo:main
working_dir: /app
env_file:
- .env.miner
Expand All @@ -206,7 +206,7 @@ services:
- external

miner-testnet-centralised:
image: ghcr.io/tensorplex-labs/dojo:dev
image: ghcr.io/tensorplex-labs/dojo:main
working_dir: /app
env_file:
- .env.miner
Expand All @@ -228,7 +228,7 @@ services:
# ============== MAIN NET ============== #

miner-mainnet-decentralised:
image: ghcr.io/tensorplex-labs/dojo:dev
image: ghcr.io/tensorplex-labs/dojo:main
working_dir: /app
env_file:
- .env.miner
Expand All @@ -254,8 +254,7 @@ services:
logging: *default-logging

miner-mainnet-centralised:
# TODO @dev regex change later
image: ghcr.io/tensorplex-labs/dojo:dev
image: ghcr.io/tensorplex-labs/dojo:main
working_dir: /app
env_file:
- .env.miner
Expand Down
5 changes: 2 additions & 3 deletions docker-compose.validator.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,7 +118,7 @@ services:
# ============== TEST NET ============== #

validator-testnet:
image: ghcr.io/tensorplex-labs/dojo:dev
image: ghcr.io/tensorplex-labs/dojo:main
working_dir: /app
env_file:
- .env.validator
Expand Down Expand Up @@ -150,8 +150,7 @@ services:
# ============== MAIN NET ============== #

validator-mainnet:
# TODO @dev regex change later
image: ghcr.io/tensorplex-labs/dojo:dev
image: ghcr.io/tensorplex-labs/dojo:main
working_dir: /app
env_file:
- .env.validator
Expand Down
2 changes: 1 addition & 1 deletion dojo/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ def get_latest_git_tag():
# Define the time intervals for various tasks.
VALIDATOR_RUN = 300
VALIDATOR_HEARTBEAT = 150
VALIDATOR_UPDATE_SCORE = 1200
VALIDATOR_UPDATE_SCORE = 3600
VALIDATOR_STATUS = 60
MINER_STATUS = 60
DOJO_TASK_MONITORING = 60
Expand Down
2 changes: 0 additions & 2 deletions neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -507,7 +507,6 @@ async def send_request(
vali_request_model = await ORM.save_task(
validator_request=synapse,
miner_responses=valid_miner_responses,
# TODO the way we save obfuscated models is a bit redundant atm
ground_truth=data.ground_truth,
)

Expand Down Expand Up @@ -566,7 +565,6 @@ def set_weights(self):
"""

# Check if self.scores contains any NaN values and log a warning if it does.
# TODO @torch fix inconsistency between numpy and torch
if torch.isnan(self.scores).any():
logger.warning(
"Scores contain NaN values. This may be due to a lack of responses from miners, or a bug in your reward functions."
Expand Down

0 comments on commit 2510e10

Please sign in to comment.