(
self, doc, num_fewshot, provide_description=None, rnd=None, description=None
)
| 51 | return self.dataset["train"] |
| 52 | |
| 53 | def fewshot_context( |
| 54 | self, doc, num_fewshot, provide_description=None, rnd=None, description=None |
| 55 | ): |
| 56 | assert num_fewshot == 0 |
| 57 | assert ( |
| 58 | rnd is not None |
| 59 | ), "A `random.Random` generator argument must be provided to `rnd`" |
| 60 | assert not provide_description, ( |
| 61 | "The `provide_description` arg will be removed in future versions. To prepend " |
| 62 | "a custom description to the context, supply the corresponding string via the " |
| 63 | "`description` arg." |
| 64 | ) |
| 65 | if provide_description is not None: |
| 66 | # nudge people to not specify it at all |
| 67 | print( |
| 68 | "WARNING: provide_description is deprecated and will be removed in a future version in favor of description_dict" |
| 69 | ) |
| 70 | |
| 71 | return "" |
| 72 | |
| 73 | def doc_to_text(self, doc): |
| 74 | # this method is invoked by tests only |
nothing calls this directly
no outgoing calls
no test coverage detected