Skip to content
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

lint/fix warnings #33

Closed
wants to merge 2 commits into from
Closed
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
3 changes: 1 addition & 2 deletions neurons/miner.py
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
# Global imports.
import sys
import time
import wandb
import torch
import random
import asyncio
Expand Down Expand Up @@ -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(
Expand Down
10 changes: 5 additions & 5 deletions neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -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({
Expand Down
1 change: 1 addition & 0 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ dependencies = [
[tool.uv]
dev-dependencies = [
"pytest>=8.3.3",
"ruff>=0.8.1",
]

[project.urls]
Expand Down
Loading