Uses RequestFactory to construct Requests and returns an iterable of Requests which will be sent to the LM. :param doc: The document as returned from training_docs, validation_docs, or test_docs. :param ctx: str The context string, generated by fewsho
(self, doc, ctx, **kwargs)
| 488 | |
| 489 | @abc.abstractmethod |
| 490 | def construct_requests(self, doc, ctx, **kwargs): |
| 491 | """Uses RequestFactory to construct Requests and returns an iterable of |
| 492 | Requests which will be sent to the LM. |
| 493 | |
| 494 | :param doc: |
| 495 | The document as returned from training_docs, validation_docs, or test_docs. |
| 496 | :param ctx: str |
| 497 | The context string, generated by fewshot_context. This includes the natural |
| 498 | language description, as well as the few shot examples, and the question |
| 499 | part of the document for `doc`. |
| 500 | :param doc_idx: int |
| 501 | The index of a document within `self.test_docs()` or `self.validation_docs()`, |
| 502 | whichever is the main split used. |
| 503 | :param repeats: int |
| 504 | TODO: update this docstring |
| 505 | The number of times each instance in a dataset is inferred on. Defaults to 1, |
| 506 | can be increased for techniques like majority voting. |
| 507 | """ |
| 508 | pass |
| 509 | |
| 510 | @abc.abstractmethod |
| 511 | def process_results(self, doc, results): |
no outgoing calls
no test coverage detected