Skip to content

Commit 88fb54e

Browse files
authored
fix: Pair classification convert to dict (#4119)
fix pair classification
1 parent 3a7566f commit 88fb54e

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

mteb/abstasks/pair_classification.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -115,7 +115,9 @@ def _evaluate_subset(
115115

116116
if self.metadata.modalities == ["text"]:
117117
# for compatibility with v1 version where datasets were stored in a single row
118-
data_split = data_split[0] if len(data_split) == 1 else data_split
118+
data_split = (
119+
Dataset.from_dict(data_split[0]) if len(data_split) == 1 else data_split
120+
)
119121
evaluator = PairClassificationEvaluator(
120122
data_split,
121123
self.input1_column_name,

pyproject.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,3 +506,4 @@ Altas = "Altas"
506506
matche = "matche"
507507
expresso = "expresso"
508508
Expresso = "Expresso"
509+
NIFE = "NIFE"

0 commit comments

Comments
 (0)