Skip to content

Commit

Permalink
Make message results check more pythony
Browse files Browse the repository at this point in the history
  • Loading branch information
maximusunc committed Feb 15, 2024
1 parent 7fc0032 commit 9177ef9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion benchmarks_runner/eval.py
Original file line number Diff line number Diff line change
Expand Up @@ -90,7 +90,7 @@ def evaluate_results(
message = results_dir.get(uid, {}).get("message", {})

results_k = sorted(
message.get('results') or [],
[] if message.get('results') is None else message['results'],
key=lambda r: r.get('analyses', [{ 'score': 0 }])[0].get('score', 0),
reverse=True
)[:k]
Expand Down

0 comments on commit 9177ef9

Please sign in to comment.