Skip to content
Merged
Show file tree
Hide file tree
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
2 changes: 1 addition & 1 deletion VERSION
Original file line number Diff line number Diff line change
@@ -1 +1 @@
4.9.10
4.9.11
2 changes: 1 addition & 1 deletion gas/__init__.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
__version__ = "4.9.10"
__version__ = "4.9.11"

version_split = __version__.split(".")
__spec_version__ = (
Expand Down
19 changes: 14 additions & 5 deletions neurons/validator/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -222,7 +222,13 @@ async def set_weights(self, block):
netuid=self.config.netuid,
)

special_uids = {burn_uid, image_escrow_uid, video_escrow_uid, audio_escrow_uid}
# Escrow hotkeys can be unregistered (uid=None). Do not index
# numpy with None — that broadcasts and zeros the whole vector.
special_uids = {
uid
for uid in (burn_uid, image_escrow_uid, video_escrow_uid, audio_escrow_uid)
if uid is not None
}

# Compute norm excluding specials
norm = np.ones_like(self.scores)
Expand All @@ -243,10 +249,13 @@ async def set_weights(self, block):
active_mask = np.array([uid in active_uids_set for uid in range(len(normed_weights))])
normed_weights[active_mask] *= generator_pct

normed_weights[burn_uid] = burn_pct
normed_weights[video_escrow_uid] = video_pct
normed_weights[image_escrow_uid] = image_pct
normed_weights[audio_escrow_uid] = audio_pct
normed_weights[burn_uid] = burn_pct
if video_escrow_uid is not None:
normed_weights[video_escrow_uid] = video_pct
if image_escrow_uid is not None:
normed_weights[image_escrow_uid] = image_pct
if audio_escrow_uid is not None:
normed_weights[audio_escrow_uid] = audio_pct

# Verify allocations
total_weight = np.sum(normed_weights)
Expand Down
Loading