diff --git a/neurons/validator.py b/neurons/validator.py index a2d5e65..db6d8cd 100644 --- a/neurons/validator.py +++ b/neurons/validator.py @@ -403,16 +403,24 @@ async def run_step(self): ) normalized_score = constants.DEFAULT_SCORE else: - normalized_score = compute_score( - scores_per_uid[uid], - competition.bench, - competition.minb, - competition.maxb, - competition.pow, - competition.bheight, - metadata.id.competition_id, - competition.id, + # Get metadata for this UID + metadata = retrieve_model_metadata( + self.subtensor, self.config.netuid, self.metagraph.hotkeys[uid] ) + if metadata is None: + bt.logging.warning(f"No metadata found for UID {uid}; defaulting score to 0") + normalized_score = constants.DEFAULT_SCORE + else: + normalized_score = compute_score( + scores_per_uid[uid], + competition.bench, + competition.minb, + competition.maxb, + competition.pow, + competition.bheight, + metadata.id.competition_id, + competition.id, + ) normalized_scores[uid] = normalized_score else: bt.logging.debug(f"Setting zero normalized score for UID {uid}")