Skip to content

Commit

Permalink
fix: non-zero incentive organic targets
Browse files Browse the repository at this point in the history
  • Loading branch information
GentikSolm committed Dec 5, 2024
1 parent 9e1c00b commit 5b19170
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions miner-cache/cache.py
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,8 @@

async def sync_miners():
metagraph = subtensor.metagraph(netuid=4)
indices = numpy.argsort(metagraph.incentive)[-200:]
non_zero = sum([1 for x in metagraph.incentive if x])
indices = numpy.argsort(metagraph.incentive)[-non_zero:]

# Get the corresponding uids
uids_with_highest_incentives: List[int] = metagraph.uids[indices].tolist()
Expand All @@ -26,7 +27,6 @@ async def sync_miners():
axons: List[Tuple[bt.AxonInfo, int]] = [
(metagraph.axons[uid], uid) for uid in uids_with_highest_incentives
]
ips = []
miner_models = {}
for axon, uid in axons:
headers = generate_header(hotkey, b"", axon.hotkey)
Expand Down

0 comments on commit 5b19170

Please sign in to comment.