Skip to content

Commit a47cdcc

Browse files
committed
hotfix: fix kwarg errors
1 parent 794de70 commit a47cdcc

File tree

1 file changed

+11
-11
lines changed

1 file changed

+11
-11
lines changed

neurons/validators/genie_validator.py

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -262,7 +262,7 @@ async def score(self):
262262
except Exception as e:
263263
bt.logging.error(f"Error storing results to database: {e}")
264264

265-
async def synthensize_task(self, session:int, task_index:int):
265+
async def synthensize_task(self, session:int, task_number:int):
266266
try:
267267
with self.lock:
268268
if len(self.synthetic_tasks) > MAX_SYNTHETIC_TASK_SIZE:
@@ -276,7 +276,7 @@ async def synthensize_task(self, session:int, task_index:int):
276276
weights=[weight for _, weight in self.task_generators],
277277
)[0]
278278

279-
task, synapse = await task_generator.generate_task(session=session, task_index=task_index)
279+
task, synapse = await task_generator.generate_task(session=session, task_number=task_number)
280280
with self.lock:
281281
self.synthetic_tasks.append((task, synapse))
282282

@@ -286,36 +286,36 @@ async def synthensize_task(self, session:int, task_index:int):
286286
bt.logging.error(f"Error in synthensize_task: {e}")
287287
raise e
288288

289-
def get_seed(self, session: int, task_index: int, hash_cache: dict = {}) -> int:
289+
def get_seed(self, session: int, task_number: int, hash_cache: dict = {}) -> int:
290290
if session not in hash_cache:
291291
session_start_block = session * SESSION_WINDOW_BLOCKS
292292
subtensor = self.neuron.subtensor
293293
block_hash = subtensor.get_block_hash(session_start_block)
294294
hash_cache[session] = int(block_hash[-15:], 16)
295-
return int(hash_cache[session] + task_index)
295+
return int(hash_cache[session] + task_number)
296296

297297
async def forward(self):
298298
try:
299299
with self.lock:
300300
session = self.neuron.session
301301
if self.neuron.score_manager.current_session != session:
302-
task_index = 0
302+
task_number = 0
303303
else:
304-
task_index = self.neuron.score_manager.number_of_tasks
304+
task_number = self.neuron.score_manager.number_of_tasks
305305

306-
if task_index >= MAX_NUMBER_OF_TASKS_PER_SESSION:
306+
if task_number >= MAX_NUMBER_OF_TASKS_PER_SESSION:
307307
return
308308

309-
bt.logging.info(f"Forwarding task #{task_index} in session #{session}")
310-
# seed = self.get_seed(session, task_index)
309+
bt.logging.info(f"Forwarding task #{task_number} in session #{session}")
310+
# seed = self.get_seed(session, task_number)
311311

312312
# bt.logging.info(f"Init random with seed: {seed}")
313313
# random.seed(seed)
314314
# set_seed(seed)
315315

316316
try:
317-
task, synapse = await self.synthensize_task(session, task_index)
318-
task.task_id = f"{session}_{task_index}"
317+
task, synapse = await self.synthensize_task(session, task_number)
318+
task.task_id = f"{session}_{task_number}"
319319
synapse.task_id = task.task_id
320320
except Exception as e:
321321
bt.logging.error(

0 commit comments

Comments
 (0)