update
This commit is contained in:
16
tests/test_callback_editops.py
Normal file
16
tests/test_callback_editops.py
Normal file
@@ -0,0 +1,16 @@
|
||||
import json
|
||||
|
||||
from schemas.dataset import QueryData
|
||||
from schemas.stream import StreamDataModel
|
||||
from utils.evaluator_plus import evaluate_editops
|
||||
|
||||
with open("out/detail_cases.json") as f:
|
||||
detail_cases = json.load(f)
|
||||
|
||||
detail_case = detail_cases[0]
|
||||
preds = []
|
||||
for pred in detail_case["preds"]:
|
||||
preds.append(StreamDataModel.model_validate(pred))
|
||||
label = QueryData.model_validate(detail_case["label"])
|
||||
|
||||
print(evaluate_editops(label, preds))
|
||||
Reference in New Issue
Block a user