Generate results given a list of inputs. Args: inputs (List[str]): A list of strings. max_out_len (int): The maximum length of the output. Returns: List[str]: A list of generated strings.
(self, inputs: List[str], max_out_len: int)
| 51 | |
| 52 | @abstractmethod |
| 53 | def generate(self, inputs: List[str], max_out_len: int) -> List[str]: |
| 54 | """Generate results given a list of inputs. |
| 55 | |
| 56 | Args: |
| 57 | inputs (List[str]): A list of strings. |
| 58 | max_out_len (int): The maximum length of the output. |
| 59 | |
| 60 | Returns: |
| 61 | List[str]: A list of generated strings. |
| 62 | """ |
| 63 | raise NotImplementedError(f'{self.__class__.__name__} does not support' |
| 64 | ' gen-based evaluation yet, try ppl-based ' |
| 65 | 'instead.') |
| 66 | |
| 67 | @abstractmethod |
| 68 | def get_ppl(self, |
no outgoing calls
no test coverage detected