akommula commited on
Commit
7bac6aa
·
1 Parent(s): 3035a4e

Fixing generate examples

Browse files
Files changed (1) hide show
  1. 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
- openpi_v2 = json.load(f)
156
- print(openpi_v2)
 
 
 
 
 
 
 
 
 
 
 
157
 
158
- for id_ in openpi_v2:
159
- yield id_, openpi_v2[id_]
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