Datasets:
Fixing generate examples
Browse files- openpi_v2.py +15 -5
openpi_v2.py
CHANGED
|
@@ -152,10 +152,20 @@ class OpenpiV2(datasets.GeneratorBasedBuilder):
|
|
| 152 |
logger.info("generating examples from = %s", filepath)
|
| 153 |
|
| 154 |
with open(filepath) as f:
|
| 155 |
-
|
| 156 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 157 |
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
|
| 161 |
|
|
|
|
| 152 |
logger.info("generating examples from = %s", filepath)
|
| 153 |
|
| 154 |
with open(filepath) as f:
|
| 155 |
+
dataset = json.load(f)
|
| 156 |
+
|
| 157 |
+
for id_ in dataset:
|
| 158 |
+
print (dataset[id_])
|
| 159 |
+
print ("--------------")
|
| 160 |
+
|
| 161 |
+
yield id_, {
|
| 162 |
+
"goal": dataset[id_]["goal"]
|
| 163 |
+
"steps": dataset[id_]["steps"]
|
| 164 |
+
"topics": dataset[id_]["topics"]
|
| 165 |
+
"image_urls": dataset[id_]["image_urls"]
|
| 166 |
+
"states": dataset[id_]["states"]
|
| 167 |
+
}
|
| 168 |
|
| 169 |
+
print (filepath)
|
| 170 |
+
|
|
|
|
| 171 |
|