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
2 changes: 1 addition & 1 deletion prompting/weight_setting/weight_setter.py
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,7 @@ async def _compute_avg_reward(self) -> npt.NDArray[np.float32]:
# Accumulate rewards for each epoch only if hotkey was not changed for the given UID.
for epoch_info in self.reward_history:
for uid_str, info in epoch_info.items():
if active_hotkeys[int(uid_str)] == info["hotkey"]:
if active_hotkeys[int(uid_str)] == info.get("hotkey"):
accum[int(uid_str)] += float(info["reward"])

avg = accum / len(self.reward_history)
Expand Down