Skip to content

Commit

Permalink
Merge pull request #1359 from adriansmares/fix/vpermit-weights-erase
Browse files Browse the repository at this point in the history
Reset scores for validators
  • Loading branch information
ifrit98 authored May 30, 2023
2 parents 76e347c + 0f79973 commit 5241134
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions neurons/text/prompting/validators/core/neuron.py
Original file line number Diff line number Diff line change
Expand Up @@ -712,6 +712,8 @@ def check_weights(self):
for uid, hotkey in enumerate( self.hotkeys ):
if hotkey != self.metagraph.hotkeys[ uid ]:
self.moving_averaged_scores[ uid ] = 0 #hotkey has been replaced
if self.metagraph.validator_permit[ uid ]:
self.moving_averaged_scores[ uid ] = 0 # hotkey has validation rights
if len(self.hotkeys) < len(self.metagraph.hotkeys):
new_moving_average = torch.zeros((self.metagraph.n)).to( self.device )
new_moving_average[:len(self.hotkeys)] = self.moving_averaged_scores
Expand Down

0 comments on commit 5241134

Please sign in to comment.