Fixed uid checks
@@ -254,6 +254,8 @@ def serve(
# --- creating our chain weights
chain_weights = torch.zeros(metagraph.n)
uid = nn.uid
+
+ if uid < len(chain_weights):
chain_weights[uid] = 1
# -- serve axon to the network.
@@ -324,7 +326,7 @@ def serve(
# Add additional wandb data for axon, metagraph etc.
if config.wandb.api_key != 'default':
-
+ if uid in metagraph.W:
df = pandas.concat( [
bittensor.utils.indexed_values_to_dataframe( prefix = 'w_i_{}'.format(nn.uid), index = metagraph.uids, values = metagraph.W[:, uid] ),
bittensor.utils.indexed_values_to_dataframe( prefix = 's_i'.format(nn.uid), index = metagraph.uids, values = metagraph.S ),
