Skip to content

Commit 0a09ba2

Browse files
committed
chore: sep lock
1 parent 016a515 commit 0a09ba2

File tree

2 files changed

+9
-4
lines changed

2 files changed

+9
-4
lines changed

neurons/validators/genie_validator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@
4949
class GenieValidator:
5050
def __init__(self, neuron: BaseNeuron):
5151
self.neuron = neuron
52-
self.lock = neuron.lock
52+
self.lock = threading.Lock()
5353
self.config = neuron.config
5454
self.miner_results = []
5555
self.synthetic_tasks = []

neurons/validators/score_manager.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
import bittensor as bt
22
import copy
33
import numpy as np
4-
4+
import threading
55
from io import StringIO
66
from rich.console import Console
77
from rich.table import Table
@@ -10,14 +10,19 @@
1010
from webgenie.base.neuron import BaseNeuron
1111

1212
from webgenie.challenges.challenge import Challenge, RESERVED_WEIGHTS
13-
from webgenie.constants import CONSIDERING_SESSION_COUNTS, __STATE_VERSION__, WORK_DIR
13+
from webgenie.constants import (
14+
CONSIDERING_SESSION_COUNTS,
15+
__STATE_VERSION__,
16+
WORK_DIR,
17+
MAX_UNANSWERED_TASKS
18+
)
1419
from webgenie.helpers.weights import save_file_to_wandb
1520

1621
class ScoreManager:
1722
def __init__(self, neuron: BaseNeuron):
1823
self.neuron = neuron
1924
self.state_path = self.neuron.config.neuron.full_path + "/state.npz"
20-
self.lock = neuron.lock
25+
self.lock = threading.Lock()
2126

2227
self.hotkeys = copy.deepcopy(self.neuron.metagraph.hotkeys)
2328
self.current_session = -1

0 commit comments

Comments
 (0)