import datasets | |
import evaluate | |
from docred import docred | |
train_data = datasets.load_dataset("docred", split="train_annotated[:10]") | |
data = datasets.load_dataset("docred", split="validation[:10]") | |
metric = docred() | |
print(metric.compute(predictions=data.to_list(), references=data.to_list())) | |