Skip to content

Commit

Permalink
fix: ensure to filter out aws_mturk set by miners, since it cannot be…
Browse files Browse the repository at this point in the history
… completed in 30s
  • Loading branch information
jarvis8x7b committed Feb 26, 2024
1 parent f9b4bb7 commit d328bfc
Showing 1 changed file with 9 additions and 2 deletions.
11 changes: 9 additions & 2 deletions neurons/validator.py
Original file line number Diff line number Diff line change
Expand Up @@ -264,11 +264,18 @@ async def send_request(

# The dendrite client queries the network.
responses: List[RankingRequest] = await self.dendrite(
axons=axons, synapse=synapse, deserialize=False, timeout=60
axons=axons, synapse=synapse, deserialize=False, timeout=30
)
bt.logging.info(f"Received responses: {responses}")

valid_responses = _filter_valid_responses(responses)
valid_responses = [
response
for response in responses
if len(response.ranks) > 0
and response.scoring_method in [method for method in ScoringMethod]
and response.scoring_method != ScoringMethod.AWS_MTURK
]

if not len(valid_responses):
bt.logging.warning("No valid responses received from miners.")
return
Expand Down

0 comments on commit d328bfc

Please sign in to comment.