Skip to content

Commit bb0007e

Browse files
committed
add refusal bench
1 parent dc50195 commit bb0007e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

fastchat/serve/monitor/classify/display_score.py

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
import pandas as pd
22
import argparse
33
import os
4+
from pathlib import Path
45
from glob import glob
56
from sklearn.metrics import recall_score, precision_score
67

@@ -9,6 +10,7 @@
910
"math_bench": ("math_v0.1", "math"),
1011
"hard_bench": ("criteria_v0.1", "hard"),
1112
"creative_writing_bench": ("creative_writing_v0.1", "creative_writing"),
13+
"refusal_bench": ("refusal_v0.2", "refusal"),
1214
}
1315

1416

@@ -39,7 +41,7 @@
3941
recall = recall_score(y_pred=test.pred, y_true=test.label)
4042
precision = precision_score(y_pred=test.pred, y_true=test.label)
4143

42-
print(f"Model: {output.model[0]}")
44+
print(f"Classifier: {Path(file).stem}")
4345
print(f"Accuracy: {round(accuracy, 3)}")
4446
print(f"Precision: {round(precision, 3)}")
4547
print(f"Recall: {round(recall, 3)}")

0 commit comments

Comments
 (0)