(self, file_path: str)
| 128 | self.batch_size = opt.rollout_batch_size # batch size for sampling from env |
| 129 | |
| 130 | def load_data(self, file_path: str): |
| 131 | with open(file_path, 'r') as f: |
| 132 | data: List[List[str]] = json.load(f) |
| 133 | |
| 134 | output: List[List[str]] = [sample for sample in data if all(sample)] |
| 135 | del data |
| 136 | |
| 137 | return output |
| 138 | |
| 139 | def format(self, sample: List[str]) -> Dict[str, Any]: |
| 140 | context = sample |