Take a single document and the LM results and evaluates, returning a dict where keys are the names of submetrics and values are the values of the metric for that one document :param doc: The document as returned from training_docs, validation_docs, or test_docs.
(self, doc, results)
| 63 | ] |
| 64 | |
| 65 | def process_results(self, doc, results): |
| 66 | """Take a single document and the LM results and evaluates, returning a |
| 67 | dict where keys are the names of submetrics and values are the values of |
| 68 | the metric for that one document |
| 69 | |
| 70 | :param doc: |
| 71 | The document as returned from training_docs, validation_docs, or test_docs. |
| 72 | :param results: |
| 73 | The results of the requests created in construct_requests. |
| 74 | """ |
| 75 | continuation = results[0] |
| 76 | |
| 77 | return { |
| 78 | "contains": contains_score(continuation, [doc["value"]]) |
| 79 | } |
| 80 | |
| 81 | def aggregation(self): |
| 82 | """ |
nothing calls this directly
no test coverage detected