Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 4 additions & 2 deletions neurons/validator/core/serving_queue.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,12 +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:
if uid not in self.synthentic_rewarded or self.synthentic_rewarded[uid] <= 10:
return True
if self.synthentic_rewarded[uid] <= 10:
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

Expand Down