Skip to content

Commit

Permalink
Merge branch 'main' into delayed-weight-setting
Browse files Browse the repository at this point in the history
  • Loading branch information
MsRandom authored Nov 1, 2024
2 parents 4777b4a + 657c7fc commit ecc84fb
Show file tree
Hide file tree
Showing 6 changed files with 5 additions and 9 deletions.
2 changes: 1 addition & 1 deletion neuron/neuron/submission_tester/testing.py
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@

EXECUTOR = ThreadPoolExecutor(max_workers=2)

debug = int(os.getenv("VALIDATOR_DEBUG", 0)) > 0
debug = int(os.getenv("VALIDATOR_DEBUG") or 0) > 0
logger = logging.getLogger(__name__)


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.1"
API_VERSION = "4.4.2"
3 changes: 0 additions & 3 deletions validator/generate_compose.py
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,6 @@
source: ~/.netrc
target: /home/validator/.netrc
environment:
WANDB_API_KEY: $WANDB_API_KEY
command: --benchmarker_api {apis} $VALIDATOR_ARGS
network_mode: host
Expand Down
2 changes: 1 addition & 1 deletion validator/submission_tester/api.py
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
)

hotkey = os.getenv("VALIDATOR_HOTKEY_SS58_ADDRESS")
debug = int(os.getenv("VALIDATOR_DEBUG", 0)) > 0
debug = int(os.getenv("VALIDATOR_DEBUG") or 0) > 0

if not hotkey:
raise ValueError("Environment variable VALIDATOR_HOTKEY_SS58_ADDRESS was not specified")
Expand Down
1 change: 0 additions & 1 deletion validator/weight_setting/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ COPY validator/weight_setting/__init__.py validator/weight_setting/

USER root
RUN chown -R validator:validator /app
RUN echo "Defaults env_keep += \"WANDB_API_KEY\"" >> /etc/sudoers
USER validator

WORKDIR /app/validator
Expand Down
4 changes: 2 additions & 2 deletions validator/weight_setting/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -376,13 +376,13 @@ def save_state(self):

def load_state(self):
"""Loads the state of the validator from a file."""
logger.info("Loading validator state.")

path = self.state_path

if not isfile(path):
return

logger.info("Loading validator state.")

# Load the state of the validator from file.
with open(path, "rb") as file:
state = load(file)
Expand Down

0 comments on commit ecc84fb

Please sign in to comment.