Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
josejg committed Feb 11, 2024
1 parent b4a341c commit 31782da
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions composer/metrics/nlp.py
Original file line number Diff line number Diff line change
Expand Up @@ -660,7 +660,7 @@ def compute(self):
for k in self.pass_at_k:
results[f'pass@{k}'] = sum([self.estimator(n, c.item(), k) for c in self.correct]) / dataset_size

if len(results) == 0: # backwards compatibility
return results[0]
if len(results) == 1: # backwards compatibility
return list(results.values())[0]

return results

0 comments on commit 31782da

Please sign in to comment.