Skip to content

Commit

Permalink
Fix wandb data and miner bugs (#83)
Browse files Browse the repository at this point in the history
  • Loading branch information
MsRandom authored Oct 31, 2024
1 parent 6fa06dd commit 0669e0a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 15 deletions.
3 changes: 2 additions & 1 deletion neuron/neuron/submission_tester/inference_sandbox.py
Original file line number Diff line number Diff line change
Expand Up @@ -55,10 +55,11 @@ def __init__(
socket_path = abspath(self._sandbox_directory / "inferences.sock")
self.remove_socket(socket_path)

home = f"/home/{self._user}" if self._switch_user else Path.home()
self._process = Popen(
[
*self.sandbox_args(self._user),
f"/home/{self._user}/.local/bin/uv" if self._switch_user else "uv",
f"{home}/.local/bin/uv",
"run",
"start_inference",
],
Expand Down
2 changes: 1 addition & 1 deletion neuron/neuron/submission_tester/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
SANDBOX_DIRECTORY = Path("/sandbox")
BASELINE_SANDBOX_DIRECTORY = Path("/baseline-sandbox")
DEFAULT_LOAD_TIMEOUT = 500
MIN_LOAD_TIMEOUT = 120
MIN_LOAD_TIMEOUT = 240

EXECUTOR = ThreadPoolExecutor(max_workers=2)

Expand Down
2 changes: 1 addition & 1 deletion validator/base_validator/__init__.py
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
from .metrics import *

API_VERSION = "4.4.0"
API_VERSION = "4.4.1"
15 changes: 3 additions & 12 deletions validator/weight_setting/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
from .wandb_args import add_wandb_args
from .winner_selection import get_scores, get_contestant_scores, get_tiers, get_contestant_tier

VALIDATOR_VERSION: tuple[int, int, int] = (4, 5, 0)
VALIDATOR_VERSION: tuple[int, int, int] = (4, 5, 1)
VALIDATOR_VERSION_STRING = ".".join(map(str, VALIDATOR_VERSION))

WEIGHTS_VERSION = (
Expand Down Expand Up @@ -264,14 +264,10 @@ def send_wandb_metrics(self):
continue

data = {
"generation_time": benchmark.model.generation_time,
"similarity": benchmark.average_similarity,
"min_similarity": benchmark.min_similarity,
"size": benchmark.model.size,
"vram_used": benchmark.model.vram_used,
"watts_used": benchmark.model.watts_used,
"hotkey": self.hotkeys[uid],
}
} | benchmark.model_dump()

if self.baseline_metrics:
data["score"] = benchmark.calculate_score(self.baseline_metrics)
Expand All @@ -291,12 +287,7 @@ def send_wandb_metrics(self):
log_data["average_benchmark_time"] = self.average_benchmarking_time

if self.baseline_metrics:
log_data["baseline"] = {
"generation_time": self.baseline_metrics.generation_time,
"size": self.baseline_metrics.size,
"vram_used": self.baseline_metrics.vram_used,
"watts_used": self.baseline_metrics.watts_used,
}
log_data["baseline"] = self.baseline_metrics.model_dump()

self.wandb_run.log(data=log_data)

Expand Down

0 comments on commit 0669e0a

Please sign in to comment.