thomasw21
commited on
Commit
·
66052c6
1
Parent(s):
4d17ec4
Woops
Browse files
pmd.py
CHANGED
|
@@ -117,7 +117,8 @@ class DatasetsLoader(BaseLoader):
|
|
| 117 |
dataset_size = len(dset)
|
| 118 |
batch_end = min(batch_start + self.batch_size_per_proc, dataset_size)
|
| 119 |
batch = dset[batch_start:batch_end]
|
| 120 |
-
|
|
|
|
| 121 |
|
| 122 |
def _generate_batches(self):
|
| 123 |
dataset = load_dataset(self.dataset_name, self.config_name, split=self.split)
|
|
|
|
| 117 |
dataset_size = len(dset)
|
| 118 |
batch_end = min(batch_start + self.batch_size_per_proc, dataset_size)
|
| 119 |
batch = dset[batch_start:batch_end]
|
| 120 |
+
output_batch = self.cast_to_pmd_features(batch)
|
| 121 |
+
return pa.table(_FEATURES.encode_batch(output_batch))
|
| 122 |
|
| 123 |
def _generate_batches(self):
|
| 124 |
dataset = load_dataset(self.dataset_name, self.config_name, split=self.split)
|