Skip to content

Commit c5fb10d

Browse files
authored
Merge pull request #135 from web-genie-ai/feat/increase-task-count
Feat/increase task count
2 parents ea011f7 + 7ff3423 commit c5fb10d

File tree

2 files changed

+11
-4
lines changed

2 files changed

+11
-4
lines changed

neurons/validators/score_manager.py

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,12 @@
99

1010
from webgenie.base.neuron import BaseNeuron
1111
from webgenie.challenges.challenge import Challenge
12-
from webgenie.constants import CONSIDERING_SESSION_COUNTS, __STATE_VERSION__, WORK_DIR
12+
from webgenie.constants import (
13+
CONSIDERING_SESSION_COUNTS,
14+
__STATE_VERSION__,
15+
WORK_DIR,
16+
MAX_UNANSWERED_TASKS,
17+
)
1318
from webgenie.helpers.weights import save_file_to_wandb
1419

1520
class ScoreManager:
@@ -169,7 +174,7 @@ def get_winner(self, total_scores: np.ndarray, solved_tasks: np.ndarray, number_
169174
if self.is_blacklisted(uid):
170175
continue
171176

172-
if solved_tasks[uid] >= max(1, number_of_tasks - 10):
177+
if solved_tasks[uid] >= max(1, number_of_tasks - MAX_UNANSWERED_TASKS):
173178
avg_scores[uid] = total_scores[uid] / solved_tasks[uid]
174179
else:
175180
avg_scores[uid] = 0
@@ -222,7 +227,7 @@ def print_session_result(self, session_upto: int, console: Console):
222227

223228
avg_scores = np.zeros(self.neuron.metagraph.n, dtype=np.float32)
224229
for uid in range(self.neuron.metagraph.n):
225-
if solved_tasks[uid] >= max(1, number_of_tasks - 10):
230+
if solved_tasks[uid] >= max(1, number_of_tasks - MAX_UNANSWERED_TASKS):
226231
avg_scores[uid] = scores[uid] / solved_tasks[uid]
227232
else:
228233
avg_scores[uid] = 0

webgenie/constants.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
import psutil
44
# Change this value when updating your code base.
55
# Define the version of the webgenie.
6-
__VERSION__ = "1.1.27" # version
6+
__VERSION__ = "1.1.28" # version
77

88
SPEC_VERSION = (
99
(1000 * int(__VERSION__.split(".")[0]))
@@ -89,6 +89,8 @@
8989

9090
MAX_NUMBER_OF_TASKS_PER_SESSION = 18 # max number of tasks per session
9191

92+
MAX_UNANSWERED_TASKS = 3 # max unanswered tasks
93+
9294
NUMBER_OF_CONCURRENT_WORKERS = max(
9395
1,
9496
min(

0 commit comments

Comments
 (0)