Skip to content

Commit

Permalink
update float.
Browse files Browse the repository at this point in the history
  • Loading branch information
shibing624 committed Jun 18, 2023
1 parent bab51fe commit f04f7b8
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
10 changes: 10 additions & 0 deletions tests/test_model_spearman.py
Original file line number Diff line number Diff line change
Expand Up @@ -337,6 +337,16 @@ def test_ernie3_0_base_model(self):
# PAWSX spearman corr: 0.3428
# avg: 0.6281
# V100 QPS: 1526

# training with mean pooling and inference with mean pooling
# training data: all nli-zh-all sampled data
# STS-B spearman corr: 0.7742
# ATEC spearman corr: 0.4394
# BQ spearman corr: 0.6436
# LCQMC spearman corr: 0.7345
# PAWSX spearman corr: 0.3914
# avg: 0.5966
# V100 QPS: 1603
pass

def test_ernie3_0_xbase_model(self):
Expand Down
4 changes: 2 additions & 2 deletions text2vec/cosent_dataset.py
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,7 @@ def get_field_names(data_item):
if not field1 or not field2:
continue

text_a, text_b, score = entry[field1], entry[field2], int(entry["label"])
text_a, text_b, score = entry[field1], entry[field2], float(entry["label"])
data.append((text_a, score))
data.append((text_b, score))
else:
Expand All @@ -45,7 +45,7 @@ def get_field_names(data_item):
if len(line) != 3:
logger.warning(f'line size not match, pass: {line}')
continue
score = int(line[2])
score = float(line[2])
data.append((line[0], score))
data.append((line[1], score))
return data
Expand Down

0 comments on commit f04f7b8

Please sign in to comment.