Skip to content

Commit

Permalink
fix wrong sorting in check (huggingface#305)
Browse files Browse the repository at this point in the history
Co-authored-by: Sander Land <[email protected]>
  • Loading branch information
sanderland and Sander Land authored Oct 4, 2022
1 parent 81f841b commit 830563e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/evaluate/module.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,7 +492,7 @@ def add_batch(self, *, predictions=None, references=None, **kwargs):
error_msg = (
f"Mismatch in the number of {col0} ({len(batch[col0])}) and {bad_col} ({len(batch[bad_col])})"
)
elif sorted(self.current_features) != ["references", "predictions"]:
elif set(self.current_features) != {"references", "predictions"}:
error_msg = (
f"Module inputs don't match the expected format.\n" f"Expected format: {self.current_features },\n"
)
Expand Down

0 comments on commit 830563e

Please sign in to comment.