From ebfbd6ea72f21ac6afd9bdd87cd2f84a96afb335 Mon Sep 17 00:00:00 2001 From: trungthanhnguyen0502 Date: Sat, 4 Jan 2025 22:18:45 +0700 Subject: [PATCH 1/2] increase probability of rewarding --- neurons/validator/core/serving_queue.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/neurons/validator/core/serving_queue.py b/neurons/validator/core/serving_queue.py index 382c4acb..0c4a5205 100644 --- a/neurons/validator/core/serving_queue.py +++ b/neurons/validator/core/serving_queue.py @@ -90,10 +90,12 @@ def get_batch_query(self, batch_size: int): yield category, uids_to_query, should_rewards, time_to_sleep def random_should_reward(self, uid): - if uid not in self.synthentic_rewarded: + if uid not in self.synthentic_rewarded or self.synthentic_rewarded[uid] <= 5: return True if self.synthentic_rewarded[uid] <= 10: - return random.random() < 0.5 ## 50% chance of rewarding + return random.random() < 0.6 ## 60% chance of rewarding + elif self.synthentic_rewarded[uid] <= 20: + return random.random() < 0.4 ## 40% chance of rewarding elif self.synthentic_rewarded[uid] <= 30: return random.random() < 0.3 ## 30% chance of rewarding else: From a66c9ebc8e8c4fe1a9deed4f44d00cc25f1ef76c Mon Sep 17 00:00:00 2001 From: trungthanhnguyen0502 Date: Sat, 4 Jan 2025 22:39:44 +0700 Subject: [PATCH 2/2] increase probability of rewarding --- neurons/validator/core/serving_queue.py | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/neurons/validator/core/serving_queue.py b/neurons/validator/core/serving_queue.py index 0c4a5205..026d6090 100644 --- a/neurons/validator/core/serving_queue.py +++ b/neurons/validator/core/serving_queue.py @@ -90,14 +90,14 @@ def get_batch_query(self, batch_size: int): yield category, uids_to_query, should_rewards, time_to_sleep def random_should_reward(self, uid): - if uid not in self.synthentic_rewarded or self.synthentic_rewarded[uid] <= 5: + if uid not in self.synthentic_rewarded or self.synthentic_rewarded[uid] <= 10: return True - if self.synthentic_rewarded[uid] <= 10: - return random.random() < 0.6 ## 60% chance of rewarding - elif self.synthentic_rewarded[uid] <= 20: - return random.random() < 0.4 ## 40% chance of rewarding + if self.synthentic_rewarded[uid] <= 20: + return random.random() < 0.5 ## 50% chance of rewarding elif self.synthentic_rewarded[uid] <= 30: return random.random() < 0.3 ## 30% chance of rewarding + elif self.synthentic_rewarded[uid] <= 40: + return random.random() < 0.2 ## 20% chance of rewarding else: return random.random() < 0.1 ## 10% chance of rewarding