Skip to content

Commit

Permalink
Fix divide be 0 error
Browse files Browse the repository at this point in the history
  • Loading branch information
MsRandom committed Nov 28, 2024
1 parent 698d54e commit e45a1e7
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion validator/weight_setting/benchmarking_api.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@ def send_submissions_to_api(version: str, all_apis: list[BenchmarkingApi], submi
contest_api_assignment[lowest_contest_id].append(api)

for contest_id, apis in contest_api_assignment.items():
if contest_id not in submissions_by_contest and contest_id in ACTIVE_CONTESTS:
if not contest_id in ACTIVE_CONTESTS:
continue
if contest_id not in submissions_by_contest:
raise RuntimeError(f"No API compatible with contest type {contest_id.name}")

contest_submissions = submissions_by_contest[contest_id]
Expand Down

0 comments on commit e45a1e7

Please sign in to comment.