diff --git a/neurons/miner.py b/neurons/miner.py index 984ceda..b7881d9 100644 --- a/neurons/miner.py +++ b/neurons/miner.py @@ -19,7 +19,6 @@ # Global imports. import sys import time -import wandb import torch import random import asyncio @@ -180,7 +179,7 @@ def __init__(self): tplr.logger.error(f"Failed to delete {file_path}: {e}") # Load checkpoint if it exists - self.checkpoint_path = f"checkpoint-V1.pth" if self.config.checkpoint_path is None else self.config.checkpoint_path + self.checkpoint_path = "checkpoint-V1.pth" if self.config.checkpoint_path is None else self.config.checkpoint_path if os.path.exists(self.checkpoint_path): tplr.logger.info(f"Loading checkpoint from {self.checkpoint_path}") global_step, _ = asyncio.run(tplr.load_checkpoint( diff --git a/neurons/validator.py b/neurons/validator.py index d77965d..2047a80 100644 --- a/neurons/validator.py +++ b/neurons/validator.py @@ -556,11 +556,11 @@ async def run(self): tplr.logger.info(f"{tplr.P(window, gs_end - gs_start)}[{window_delta_str}]: Finished step.") # Log main metrics wandb.log({ - f"loss": step_loss, - f"tokens_per_step": tokens_per_step, - f"tokens_per_second": tokens_per_second, - f"sample_rate": self.sample_rate, - f"utilization": eval_duration / (gs_end - gs_start) + "loss": step_loss, + "tokens_per_step": tokens_per_step, + "tokens_per_second": tokens_per_second, + "sample_rate": self.sample_rate, + "utilization": eval_duration / (gs_end - gs_start) }, step=self.global_step) for uid_i in valid_score_indices: wandb.log({ diff --git a/pyproject.toml b/pyproject.toml index 79ef417..1541a57 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -38,6 +38,7 @@ dependencies = [ [tool.uv] dev-dependencies = [ "pytest>=8.3.3", + "ruff>=0.8.1", ] [project.urls]