Datasets:
Fixing _generate_examples
Browse files- openpi_v2.py +6 -9
openpi_v2.py
CHANGED
|
@@ -144,17 +144,14 @@ class OpenpiV2(datasets.GeneratorBasedBuilder):
|
|
| 144 |
),
|
| 145 |
]
|
| 146 |
|
| 147 |
-
def _generate_examples(self, filepath
|
| 148 |
logger.info("generating examples from = %s", filepath)
|
| 149 |
|
| 150 |
-
|
| 151 |
-
|
| 152 |
-
|
| 153 |
-
print(openpi_v2)
|
| 154 |
|
| 155 |
-
|
| 156 |
-
|
| 157 |
-
|
| 158 |
-
break
|
| 159 |
|
| 160 |
|
|
|
|
| 144 |
),
|
| 145 |
]
|
| 146 |
|
| 147 |
+
def _generate_examples(self, filepath):
|
| 148 |
logger.info("generating examples from = %s", filepath)
|
| 149 |
|
| 150 |
+
with open(filepath) as f:
|
| 151 |
+
openpi_v2 = json.loads(f.read().decode("utf-8"))
|
| 152 |
+
print(openpi_v2)
|
|
|
|
| 153 |
|
| 154 |
+
for id_ in openpi_v2:
|
| 155 |
+
yield id_, openpi_v2[id_]
|
|
|
|
|
|
|
| 156 |
|
| 157 |
|