From 94befbd58b19c3e46d930e67797102bf174efd01 Mon Sep 17 00:00:00 2001 From: Ronak Date: Tue, 8 Sep 2020 23:08:37 +0530 Subject: [PATCH] change raw to metadata (#75) --- pygaggle/model/writer.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pygaggle/model/writer.py b/pygaggle/model/writer.py index 58f70dc7..8aad1c5e 100644 --- a/pygaggle/model/writer.py +++ b/pygaggle/model/writer.py @@ -28,4 +28,4 @@ def write(self, scores: List[float], example: RelevanceExample): doc_scores = sorted(list(zip(example.documents, scores)), key=lambda x: x[1], reverse=True) for ct, (doc, score) in enumerate(doc_scores): - self.write_line(f"{example.query.id}\t{doc.raw['docid']}\t{ct+1}") + self.write_line(f"{example.query.id}\t{doc.metadata['docid']}\t{ct+1}")