File size: 55,110 Bytes
056e092
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
556
557
558
559
560
561
562
563
564
565
566
567
568
569
570
571
572
573
574
575
576
577
578
579
580
581
582
583
584
585
586
587
588
589
590
591
592
593
594
595
596
597
598
599
600
601
602
603
604
605
606
607
608
609
610
611
612
613
614
615
616
617
618
619
620
621
622
623
624
625
626
627
628
629
630
631
632
633
634
635
636
637
638
639
640
641
642
643
644
645
646
647
648
649
650
651
652
653
654
655
656
657
658
659
660
661
662
663
664
665
666
667
668
669
670
671
672
673
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691
692
693
694
695
696
697
698
699
700
701
702
703
704
705
706
707
708
709
710
711
712
713
714
715
716
717
718
719
720
721
722
723
724
725
726
727
728
729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
745
746
747
748
749
750
751
752
753
754
755
756
757
758
759
760
761
762
763
764
765
766
767
768
769
770
771
772
773
774
775
776
777
778
779
780
781
782
783
784
785
786
787
788
789
790
791
792
793
794
795
796
797
798
799
800
801
802
803
804
805
806
807
808
809
810
811
812
813
814
815
816
817
818
819
820
821
822
823
824
825
826
827
828
829
830
831
832
833
834
835
836
837
838
839
840
841
842
843
844
845
846
847
848
849
850
851
852
853
854
855
856
857
858
859
860
861
862
863
864
865
866
867
868
869
870
871
872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
887
888
889
890
891
892
893
894
895
896
897
898
899
900
901
902
903
904
905
906
907
908
909
910
911
912
913
914
915
916
917
918
919
920
921
922
923
924
925
926
927
928
929
930
931
932
933
934
935
936
937
938
939
940
941
942
943
944
945
946
947
948
949
950
951
952
953
954
955
956
957
958
959
960
961
962
963
964
965
966
967
968
969
970
971
972
973
974
975
976
977
978
979
980
981
982
983
984
985
986
987
988
989
990
991
992
993
994
995
996
997
998
999
1000
1001
1002
1003
1004
1005
1006
1007
1008
1009
1010
1011
1012
1013
1014
1015
1016
1017
1018
1019
1020
1021
1022
1023
1024
1025
1026
1027
1028
1029
1030
1031
1032
1033
1034
1035
1036
1037
1038
1039
1040
1041
1042
1043
1044
1045
1046
1047
1048
1049
1050
1051
1052
1053
1054
1055
1056
1057
1058
1059
1060
1061
1062
1063
1064
1065
1066
1067
1068
1069
1070
1071
1072
1073
1074
1075
1076
1077
1078
1079
1080
1081
1082
1083
1084
1085
1086
1087
1088
1089
1090
1091
1092
1093
1094
1095
1096
1097
1098
1099
1100
1101
1102
1103
1104
1105
1106
1107
1108
1109
1110
1111
1112
1113
1114
1115
1116
1117
1118
1119
1120
1121
1122
1123
1124
1125
1126
1127
1128
1129
1130
1131
1132
1133
1134
1135
diff --git a/src/lcd/apps/train_gcbc.py b/src/lcd/apps/train_gcbc.py
index 2c79d9d..8733059 100644
--- a/src/lcd/apps/train_gcbc.py
+++ b/src/lcd/apps/train_gcbc.py
@@ -61,7 +61,7 @@ def main(
     width: int = 256,
     upscaled_state_dim: int = 2048,
     upscale: bool = False,
-    depth: int = 2,
+    depth: int = 3,
     num_epochs: int = 100,
     num_steps: int = int(1e4),
     batch_size: int = 512,
@@ -70,6 +70,7 @@ def main(
     use_wandb: bool = False,
     skip_eval: bool = True,
     clevr: bool = True,
+    weight_decay: float= 1e-4,
 ):
     set_seed(seed)
 
@@ -85,22 +86,26 @@ def main(
     )
     args.log_dir = exp_path
     exp_path.mkdir(parents=True)
-    print("Saving to", exp_path)
     if use_wandb:
         wandb.init(
             project="vanilla-diffuser",
             entity="lang-diffusion",
-            name=f"{env_name}-ce",
+            name=f"{env_name}-ce-post-activation-weight-decay",
             config=vars(args),
         )
+    print("Saving to", exp_path)
 
     if not upscale:
         upscaled_state_dim = 10
     # model
     final_dim = 40 if clevr else None
+    num_units = [width] * depth
+    num_units[-1] = diffusion_dim
     model = ForwardModel(
-        in_dim=upscaled_state_dim * 2, final_dim=final_dim, diffusion_dim=diffusion_dim, num_units=[width] * depth
+        in_dim=upscaled_state_dim, final_dim=final_dim, diffusion_dim=diffusion_dim, num_units=num_units
     )
+    # model = torch.load("/home/ubuntu/talar/lcd-iclr24-clevr/submodules/data/clevr/11-19_18:42:51.252737/model_99.pt",    )
+    print(model)
     summary(model)
 
     # dataset
@@ -132,7 +137,8 @@ def main(
     evaluate(eval_arg)
 
     # train
-    optimizer = torch.optim.Adam(model.parameters(), lr=lr)
+    optimizer = torch.optim.AdamW(model.parameters(), lr=lr, weight_decay=weight_decay)
+    
     # optimizer = torch.optim.SGD(model.parameters(), lr=lr, weight_decay=1e-4)
     device = "cuda:" + get_best_cuda()
     model.to(device)
@@ -156,7 +162,8 @@ def main(
                 extra_stats = {}
                 batch = next(dataloader).to(device).float()
                 pred = model.forward(
-                    torch.concat((batch["obs"], batch["next_obs"]), dim=-1)
+                    # torch.concat((batch["obs"], batch["next_obs"]), dim=-1)
+                    batch['obs'], batch['next_obs']
                 ).to(device)
 
                 act_int = batch["actions"].to(torch.int64)
@@ -311,8 +318,8 @@ def evaluate(eval_arg: EvalArgs = None):
         
         for ts in range(10):
             next_obs = ds['next_obs'][ds_idx:ds_idx+1]
-            model_input = torch.concat((obs, next_obs), dim=-1).to(p)
-            action = eval_arg.model(model_input).argmax()[None]
+            # model_input = torch.concat((obs, next_obs), dim=-1).to(p)
+            action = eval_arg.model(obs.to(p), next_obs.to(p)).argmax()[None]
             obs, rewards, dones, info = eval_arg.env.step(action)
             obs = preprocess_obs(obs[0])
             print('a_hat:', action)
diff --git a/src/lcd/datasets/__init__.py b/src/lcd/datasets/__init__.py
index 6ff45ff..d8f8a22 100644
--- a/src/lcd/datasets/__init__.py
+++ b/src/lcd/datasets/__init__.py
@@ -1 +1 @@
-from .sequence import HulcDataset
+from .sequence import HulcDataset, ClevrDataset
diff --git a/src/lcd/datasets/sequence.py b/src/lcd/datasets/sequence.py
index b34b912..4566982 100644
--- a/src/lcd/datasets/sequence.py
+++ b/src/lcd/datasets/sequence.py
@@ -79,3 +79,47 @@ class HulcDataset(torch.utils.data.Dataset):
         return KwargsBatch(
             Batch(traj, lang), {"inpaint": {0: traj[0, self.action_dim :]}}
         )
+
+
+class ClevrDataset(torch.utils.data.Dataset):
+    "Characterizes a dataset for PyTorch"
+
+    def __init__(
+        self,
+        *args,
+        buf,
+        lang_embeds,
+        encoder_path,
+        frame_offset=0,
+        horizon=4,
+        clip_stride=16,
+        **kwargs,
+    ):
+        print(f"{buf=}")
+        self.clip_stride = clip_stride
+        self.frame_offset = frame_offset
+        self.horizon = horizon        
+        self.buf = buf
+        self.lang_embeds = torch.load(lang_embeds)
+        encoder = torch.load(encoder_path)
+        encoder_type = next(encoder.parameters())
+        
+        def encode(buf):
+            with torch.no_grad():
+                buf['obs'] = encoder.encode(buf['obs'].to(encoder_type))
+                buf['next_obs'] = encoder.encode(buf['next_obs'].to(encoder_type))
+        
+        encode(self.buf)
+        
+        self.observation_dim = kwargs.get("observation_dim")
+        self.action_dim = kwargs.get("action_dim")
+
+    def __len__(self):
+        return self.buf.shape[0]
+
+    def __getitem__(self, index):
+        lang = self.lang_embeds[str(self.buf['obs_goal'][index].int().tolist())]
+        traj = torch.concat((self.buf["obs"][index:index+1], self.buf["next_obs"][index:index+1]), dim=1)
+        return KwargsBatch(
+            Batch(traj, lang), {"inpaint": {0: traj[0, self.action_dim :]}}
+        )
diff --git a/src/lcd/models/mlp.py b/src/lcd/models/mlp.py
index 232db08..416c007 100644
--- a/src/lcd/models/mlp.py
+++ b/src/lcd/models/mlp.py
@@ -1,21 +1,47 @@
+import einops
 from torch import nn
-
+import torch
 
 class ForwardModel(nn.Module):
     def __init__(
         self, in_dim=(39 + 40 + 40 + 1), diffusion_dim=16, final_dim=39, num_units=[512, 512, 512]
     ):
         super(ForwardModel, self).__init__()
-        actor_layers = []
+        encoder = []
         for out_dim in num_units:
-            actor_layers.append(nn.Linear(in_dim, out_dim))
-            actor_layers.append(nn.ReLU())
+            encoder.append(nn.Linear(in_dim, out_dim))
+            encoder.append(nn.ReLU())
+            encoder.append(nn.LayerNorm(out_dim))
             in_dim = out_dim
 
+        self.encoder = nn.Sequential(*encoder)
+
+        final_layers = nn.Sequential(
+            nn.Linear(diffusion_dim * 2, num_units[0]),
+            nn.ReLU(),
+            nn.LayerNorm(num_units[0]),            
+            nn.Linear(num_units[0], num_units[0]),
+            nn.ReLU(),
+            nn.LayerNorm(num_units[0]),
+            nn.Linear(num_units[0], final_dim)
+        )
+        
         # Final layers
-        actor_layers += [nn.Linear(in_dim, diffusion_dim), nn.ReLU(), nn.Linear(diffusion_dim, final_dim)]
-        self.actor_layers = nn.Sequential(*actor_layers)
+        self.final_layers = final_layers
+
         self.depth = len(num_units)
 
-    def forward(self, inputs, dropout_rate=0.0):
-        return self.actor_layers(inputs)
+    def forward(self, obs, next_obs):
+        # Concatenate obs and next_obs along the feature dimension
+        combined_input = torch.cat([obs, next_obs], dim=0)
+        
+        # Pass the combined input through encoder
+        encoded_combined = self.encoder(combined_input)
+
+        # Concatenate the separately encoded obs and next_obs and pass through final layers
+        return self.final_layers(einops.rearrange(encoded_combined, '(t n)  f -> n (t f)', t=2))
+
+    
+    def encode(self, inputs):
+        return self.encoder(inputs)
+
diff --git a/src/lcd/scripts/diffuser.py b/src/lcd/scripts/diffuser.py
index 0885adf..349c78d 100644
--- a/src/lcd/scripts/diffuser.py
+++ b/src/lcd/scripts/diffuser.py
@@ -9,7 +9,7 @@ from lcd.apps import rollout
 from lcd.datasets.sequence import Batch
 from lcd.utils.arrays import batch_to_device
 from lcd.utils.training import cycle
-
+from lcd.apps.train_gcbc import load_dataset
 script_dir = os.path.dirname(os.path.realpath(__file__))
 # -----------------------------------------------------------------------------#
 # ----------------------------------- setup -----------------------------------#
@@ -17,7 +17,7 @@ script_dir = os.path.dirname(os.path.realpath(__file__))
 
 
 class Parser(utils.Parser):
-    config: str = "lcd.config.calvin"
+    config: str = "lcd.config.clevr"
 
 
 args = Parser().parse_args("diffusion")
@@ -26,6 +26,9 @@ args.dim_mults = tuple(int(i) for i in args.dim_mults)
 # -----------------------------------------------------------------------------#
 # ---------------------------------- dataset ----------------------------------#
 # -----------------------------------------------------------------------------#
+print("loading dataset...")
+train, val = load_dataset(True, exp_path=None)
+print("done loading!")
 
 dataset_config = utils.Config(
     args.loader,
@@ -36,14 +39,15 @@ dataset_config = utils.Config(
     use_padding=args.use_padding,
     max_path_length=args.max_path_length,
     frame_offset=args.frame_offset,
-    lang_embeds=DATA_PATH / "t5-v1_1-xxl_embeddings.pt",
-    task_to_ann=DATA_PATH / "annotations.json",
-    buf=DATA_PATH / f"hulc-trajectories/{args.seed}_all_trajectories.pt",
+    encoder_path="/home/ubuntu/talar/lcd-iclr24-clevr/submodules/data/clevr/11-20_06:41:04.604072/model_30.pt",
+    lang_embeds=DATA_PATH / "clevr_direct_embeddings.pt",
+    # buf=DATA_PATH / f"ball_buf.pt",
     observation_dim=args.observation_dim,
     action_dim=args.action_dim,
 )
 
-dataset = dataset_config()
+dataset = dataset_config(buf=train)
+val_dataset = dataset_config(buf=val)
 
 observation_dim = dataset.observation_dim
 action_dim = dataset.action_dim
@@ -107,7 +111,7 @@ model = model_config()
 
 diffusion = diffusion_config(model)
 
-trainer = trainer_config(diffusion, dataset)
+trainer = trainer_config(diffusion, dataset, val_dataset)
 
 
 # -----------------------------------------------------------------------------#
@@ -132,16 +136,11 @@ print("✓")
 
 n_epochs = int(args.n_train_steps // args.n_steps_per_epoch)
 
-if args.wandb:
-    wandb.init(
-        project="vanilla-diffuser",
-        entity="lang-diffusion",
-        name=f"hulc-{args.wandb_name}",
-        config=vars(args),
-    )
 
 
 def eval_model(num_evals, epoch=0):
+    print('skipping eval')
+    return
     rollout.main(seed=args.seed, num_sequences=num_evals)
     dm_args = args.as_dict()
     dm_args["epoch"] = epoch
@@ -154,6 +153,14 @@ eval_model(
 )
 print("✓")
 
+if args.wandb:
+    wandb.init(
+        project="vanilla-diffuser",
+        entity="lang-diffusion",
+        name=f"hulc-{args.wandb_name}",
+        config=vars(args),
+    )
+
 
 for i in range(n_epochs):
     print(f"Epoch {i} / {n_epochs} | {args.savepath}")
diff --git a/src/lcd/scripts/generation/embeddings.py b/src/lcd/scripts/generation/embeddings.py
index f28743b..1e74a44 100644
--- a/src/lcd/scripts/generation/embeddings.py
+++ b/src/lcd/scripts/generation/embeddings.py
@@ -99,10 +99,755 @@ def t5_encode_tokenized_text(
     return encoded_text
 
 
+# from lcd.apps.train_gcbc import load_dataset
+# k = load_dataset(clevr=True, upscale=False, exp_path=None)
+# sys.path.append(
+#         "/home/ubuntu/talar/talar-openreview/talar"
+# )
+# from ball_collect_data import features2goal
+# z = features2goal(k[0]['obs_goal'])
+# unique_z = set(z)
+
+# d = {}
+# for j, v in zip(k[0]['obs_goal'], anns):
+#     d[str(j.int().tolist())] = v
+
+
+unique_z = {'Can you help me push the blue ball behind the cyan ball',
+ 'Can you help me push the blue ball behind the green ball',
+ 'Can you help me push the blue ball behind the purple ball',
+ 'Can you help me push the blue ball behind the red ball',
+ 'Can you help me push the blue ball in front of the cyan ball',
+ 'Can you help me push the blue ball in front of the green ball',
+ 'Can you help me push the blue ball in front of the purple ball',
+ 'Can you help me push the blue ball in front of the red ball',
+ 'Can you help me push the blue ball to the left of the cyan ball',
+ 'Can you help me push the blue ball to the left of the green ball',
+ 'Can you help me push the blue ball to the left of the purple ball',
+ 'Can you help me push the blue ball to the left of the red ball',
+ 'Can you help me push the blue ball to the right of the cyan ball',
+ 'Can you help me push the blue ball to the right of the green ball',
+ 'Can you help me push the blue ball to the right of the purple ball',
+ 'Can you help me push the blue ball to the right of the red ball',
+ 'Can you help me push the cyan ball behind the blue ball',
+ 'Can you help me push the cyan ball behind the green ball',
+ 'Can you help me push the cyan ball behind the purple ball',
+ 'Can you help me push the cyan ball behind the red ball',
+ 'Can you help me push the cyan ball in front of the blue ball',
+ 'Can you help me push the cyan ball in front of the green ball',
+ 'Can you help me push the cyan ball in front of the purple ball',
+ 'Can you help me push the cyan ball in front of the red ball',
+ 'Can you help me push the cyan ball to the left of the blue ball',
+ 'Can you help me push the cyan ball to the left of the green ball',
+ 'Can you help me push the cyan ball to the left of the purple ball',
+ 'Can you help me push the cyan ball to the left of the red ball',
+ 'Can you help me push the cyan ball to the right of the blue ball',
+ 'Can you help me push the cyan ball to the right of the green ball',
+ 'Can you help me push the cyan ball to the right of the purple ball',
+ 'Can you help me push the cyan ball to the right of the red ball',
+ 'Can you help me push the green ball behind the blue ball',
+ 'Can you help me push the green ball behind the cyan ball',
+ 'Can you help me push the green ball behind the purple ball',
+ 'Can you help me push the green ball behind the red ball',
+ 'Can you help me push the green ball in front of the blue ball',
+ 'Can you help me push the green ball in front of the cyan ball',
+ 'Can you help me push the green ball in front of the purple ball',
+ 'Can you help me push the green ball in front of the red ball',
+ 'Can you help me push the green ball to the left of the blue ball',
+ 'Can you help me push the green ball to the left of the cyan ball',
+ 'Can you help me push the green ball to the left of the purple ball',
+ 'Can you help me push the green ball to the left of the red ball',
+ 'Can you help me push the green ball to the right of the blue ball',
+ 'Can you help me push the green ball to the right of the cyan ball',
+ 'Can you help me push the green ball to the right of the purple ball',
+ 'Can you help me push the green ball to the right of the red ball',
+ 'Can you help me push the purple ball behind the blue ball',
+ 'Can you help me push the purple ball behind the cyan ball',
+ 'Can you help me push the purple ball behind the green ball',
+ 'Can you help me push the purple ball behind the red ball',
+ 'Can you help me push the purple ball in front of the blue ball',
+ 'Can you help me push the purple ball in front of the cyan ball',
+ 'Can you help me push the purple ball in front of the green ball',
+ 'Can you help me push the purple ball in front of the red ball',
+ 'Can you help me push the purple ball to the left of the blue ball',
+ 'Can you help me push the purple ball to the left of the cyan ball',
+ 'Can you help me push the purple ball to the left of the green ball',
+ 'Can you help me push the purple ball to the left of the red ball',
+ 'Can you help me push the purple ball to the right of the blue ball',
+ 'Can you help me push the purple ball to the right of the cyan ball',
+ 'Can you help me push the purple ball to the right of the green ball',
+ 'Can you help me push the purple ball to the right of the red ball',
+ 'Can you help me push the red ball behind the blue ball',
+ 'Can you help me push the red ball behind the cyan ball',
+ 'Can you help me push the red ball behind the green ball',
+ 'Can you help me push the red ball behind the purple ball',
+ 'Can you help me push the red ball in front of the blue ball',
+ 'Can you help me push the red ball in front of the cyan ball',
+ 'Can you help me push the red ball in front of the green ball',
+ 'Can you help me push the red ball in front of the purple ball',
+ 'Can you help me push the red ball to the left of the blue ball',
+ 'Can you help me push the red ball to the left of the cyan ball',
+ 'Can you help me push the red ball to the left of the green ball',
+ 'Can you help me push the red ball to the left of the purple ball',
+ 'Can you help me push the red ball to the right of the blue ball',
+ 'Can you help me push the red ball to the right of the cyan ball',
+ 'Can you help me push the red ball to the right of the green ball',
+ 'Can you help me push the red ball to the right of the purple ball',
+ 'Can you push the blue ball behind the cyan ball',
+ 'Can you push the blue ball behind the green ball',
+ 'Can you push the blue ball behind the purple ball',
+ 'Can you push the blue ball behind the red ball',
+ 'Can you push the blue ball in front of the cyan ball',
+ 'Can you push the blue ball in front of the green ball',
+ 'Can you push the blue ball in front of the purple ball',
+ 'Can you push the blue ball in front of the red ball',
+ 'Can you push the blue ball to the left of the cyan ball',
+ 'Can you push the blue ball to the left of the green ball',
+ 'Can you push the blue ball to the left of the purple ball',
+ 'Can you push the blue ball to the left of the red ball',
+ 'Can you push the blue ball to the right of the cyan ball',
+ 'Can you push the blue ball to the right of the green ball',
+ 'Can you push the blue ball to the right of the purple ball',
+ 'Can you push the blue ball to the right of the red ball',
+ 'Can you push the cyan ball behind the blue ball',
+ 'Can you push the cyan ball behind the green ball',
+ 'Can you push the cyan ball behind the purple ball',
+ 'Can you push the cyan ball behind the red ball',
+ 'Can you push the cyan ball in front of the blue ball',
+ 'Can you push the cyan ball in front of the green ball',
+ 'Can you push the cyan ball in front of the purple ball',
+ 'Can you push the cyan ball in front of the red ball',
+ 'Can you push the cyan ball to the left of the blue ball',
+ 'Can you push the cyan ball to the left of the green ball',
+ 'Can you push the cyan ball to the left of the purple ball',
+ 'Can you push the cyan ball to the left of the red ball',
+ 'Can you push the cyan ball to the right of the blue ball',
+ 'Can you push the cyan ball to the right of the green ball',
+ 'Can you push the cyan ball to the right of the purple ball',
+ 'Can you push the cyan ball to the right of the red ball',
+ 'Can you push the green ball behind the blue ball',
+ 'Can you push the green ball behind the cyan ball',
+ 'Can you push the green ball behind the purple ball',
+ 'Can you push the green ball behind the red ball',
+ 'Can you push the green ball in front of the blue ball',
+ 'Can you push the green ball in front of the cyan ball',
+ 'Can you push the green ball in front of the purple ball',
+ 'Can you push the green ball in front of the red ball',
+ 'Can you push the green ball to the left of the blue ball',
+ 'Can you push the green ball to the left of the cyan ball',
+ 'Can you push the green ball to the left of the purple ball',
+ 'Can you push the green ball to the left of the red ball',
+ 'Can you push the green ball to the right of the blue ball',
+ 'Can you push the green ball to the right of the cyan ball',
+ 'Can you push the green ball to the right of the purple ball',
+ 'Can you push the green ball to the right of the red ball',
+ 'Can you push the purple ball behind the blue ball',
+ 'Can you push the purple ball behind the cyan ball',
+ 'Can you push the purple ball behind the green ball',
+ 'Can you push the purple ball behind the red ball',
+ 'Can you push the purple ball in front of the blue ball',
+ 'Can you push the purple ball in front of the cyan ball',
+ 'Can you push the purple ball in front of the green ball',
+ 'Can you push the purple ball in front of the red ball',
+ 'Can you push the purple ball to the left of the blue ball',
+ 'Can you push the purple ball to the left of the cyan ball',
+ 'Can you push the purple ball to the left of the green ball',
+ 'Can you push the purple ball to the left of the red ball',
+ 'Can you push the purple ball to the right of the blue ball',
+ 'Can you push the purple ball to the right of the cyan ball',
+ 'Can you push the purple ball to the right of the green ball',
+ 'Can you push the purple ball to the right of the red ball',
+ 'Can you push the red ball behind the blue ball',
+ 'Can you push the red ball behind the cyan ball',
+ 'Can you push the red ball behind the green ball',
+ 'Can you push the red ball behind the purple ball',
+ 'Can you push the red ball in front of the blue ball',
+ 'Can you push the red ball in front of the cyan ball',
+ 'Can you push the red ball in front of the green ball',
+ 'Can you push the red ball in front of the purple ball',
+ 'Can you push the red ball to the left of the blue ball',
+ 'Can you push the red ball to the left of the cyan ball',
+ 'Can you push the red ball to the left of the green ball',
+ 'Can you push the red ball to the left of the purple ball',
+ 'Can you push the red ball to the right of the blue ball',
+ 'Can you push the red ball to the right of the cyan ball',
+ 'Can you push the red ball to the right of the green ball',
+ 'Can you push the red ball to the right of the purple ball',
+ 'Is the blue ball behind the cyan ball',
+ 'Is the blue ball behind the green ball',
+ 'Is the blue ball behind the purple ball',
+ 'Is the blue ball behind the red ball',
+ 'Is the blue ball in front of the cyan ball',
+ 'Is the blue ball in front of the green ball',
+ 'Is the blue ball in front of the purple ball',
+ 'Is the blue ball in front of the red ball',
+ 'Is the blue ball to the left of the cyan ball',
+ 'Is the blue ball to the left of the green ball',
+ 'Is the blue ball to the left of the purple ball',
+ 'Is the blue ball to the left of the red ball',
+ 'Is the blue ball to the right of the cyan ball',
+ 'Is the blue ball to the right of the green ball',
+ 'Is the blue ball to the right of the purple ball',
+ 'Is the blue ball to the right of the red ball',
+ 'Is the cyan ball behind the blue ball',
+ 'Is the cyan ball behind the green ball',
+ 'Is the cyan ball behind the purple ball',
+ 'Is the cyan ball behind the red ball',
+ 'Is the cyan ball in front of the blue ball',
+ 'Is the cyan ball in front of the green ball',
+ 'Is the cyan ball in front of the purple ball',
+ 'Is the cyan ball in front of the red ball',
+ 'Is the cyan ball to the left of the blue ball',
+ 'Is the cyan ball to the left of the green ball',
+ 'Is the cyan ball to the left of the purple ball',
+ 'Is the cyan ball to the left of the red ball',
+ 'Is the cyan ball to the right of the blue ball',
+ 'Is the cyan ball to the right of the green ball',
+ 'Is the cyan ball to the right of the purple ball',
+ 'Is the cyan ball to the right of the red ball',
+ 'Is the green ball behind the blue ball',
+ 'Is the green ball behind the cyan ball',
+ 'Is the green ball behind the purple ball',
+ 'Is the green ball behind the red ball',
+ 'Is the green ball in front of the blue ball',
+ 'Is the green ball in front of the cyan ball',
+ 'Is the green ball in front of the purple ball',
+ 'Is the green ball in front of the red ball',
+ 'Is the green ball to the left of the blue ball',
+ 'Is the green ball to the left of the cyan ball',
+ 'Is the green ball to the left of the purple ball',
+ 'Is the green ball to the left of the red ball',
+ 'Is the green ball to the right of the blue ball',
+ 'Is the green ball to the right of the cyan ball',
+ 'Is the green ball to the right of the purple ball',
+ 'Is the green ball to the right of the red ball',
+ 'Is the purple ball behind the blue ball',
+ 'Is the purple ball behind the cyan ball',
+ 'Is the purple ball behind the green ball',
+ 'Is the purple ball behind the red ball',
+ 'Is the purple ball in front of the blue ball',
+ 'Is the purple ball in front of the cyan ball',
+ 'Is the purple ball in front of the green ball',
+ 'Is the purple ball in front of the red ball',
+ 'Is the purple ball to the left of the blue ball',
+ 'Is the purple ball to the left of the cyan ball',
+ 'Is the purple ball to the left of the green ball',
+ 'Is the purple ball to the left of the red ball',
+ 'Is the purple ball to the right of the blue ball',
+ 'Is the purple ball to the right of the cyan ball',
+ 'Is the purple ball to the right of the green ball',
+ 'Is the purple ball to the right of the red ball',
+ 'Is the red ball behind the blue ball',
+ 'Is the red ball behind the cyan ball',
+ 'Is the red ball behind the green ball',
+ 'Is the red ball behind the purple ball',
+ 'Is the red ball in front of the blue ball',
+ 'Is the red ball in front of the cyan ball',
+ 'Is the red ball in front of the green ball',
+ 'Is the red ball in front of the purple ball',
+ 'Is the red ball to the left of the blue ball',
+ 'Is the red ball to the left of the cyan ball',
+ 'Is the red ball to the left of the green ball',
+ 'Is the red ball to the left of the purple ball',
+ 'Is the red ball to the right of the blue ball',
+ 'Is the red ball to the right of the cyan ball',
+ 'Is the red ball to the right of the green ball',
+ 'Is the red ball to the right of the purple ball',
+ 'Is there any blue ball behind the cyan ball',
+ 'Is there any blue ball behind the green ball',
+ 'Is there any blue ball behind the purple ball',
+ 'Is there any blue ball behind the red ball',
+ 'Is there any blue ball in front of the cyan ball',
+ 'Is there any blue ball in front of the green ball',
+ 'Is there any blue ball in front of the purple ball',
+ 'Is there any blue ball in front of the red ball',
+ 'Is there any blue ball to the left of the cyan ball',
+ 'Is there any blue ball to the left of the green ball',
+ 'Is there any blue ball to the left of the purple ball',
+ 'Is there any blue ball to the left of the red ball',
+ 'Is there any blue ball to the right of the cyan ball',
+ 'Is there any blue ball to the right of the green ball',
+ 'Is there any blue ball to the right of the purple ball',
+ 'Is there any blue ball to the right of the red ball',
+ 'Is there any cyan ball behind the blue ball',
+ 'Is there any cyan ball behind the green ball',
+ 'Is there any cyan ball behind the purple ball',
+ 'Is there any cyan ball behind the red ball',
+ 'Is there any cyan ball in front of the blue ball',
+ 'Is there any cyan ball in front of the green ball',
+ 'Is there any cyan ball in front of the purple ball',
+ 'Is there any cyan ball in front of the red ball',
+ 'Is there any cyan ball to the left of the blue ball',
+ 'Is there any cyan ball to the left of the green ball',
+ 'Is there any cyan ball to the left of the purple ball',
+ 'Is there any cyan ball to the left of the red ball',
+ 'Is there any cyan ball to the right of the blue ball',
+ 'Is there any cyan ball to the right of the green ball',
+ 'Is there any cyan ball to the right of the purple ball',
+ 'Is there any cyan ball to the right of the red ball',
+ 'Is there any green ball behind the blue ball',
+ 'Is there any green ball behind the cyan ball',
+ 'Is there any green ball behind the purple ball',
+ 'Is there any green ball behind the red ball',
+ 'Is there any green ball in front of the blue ball',
+ 'Is there any green ball in front of the cyan ball',
+ 'Is there any green ball in front of the purple ball',
+ 'Is there any green ball in front of the red ball',
+ 'Is there any green ball to the left of the blue ball',
+ 'Is there any green ball to the left of the cyan ball',
+ 'Is there any green ball to the left of the purple ball',
+ 'Is there any green ball to the left of the red ball',
+ 'Is there any green ball to the right of the blue ball',
+ 'Is there any green ball to the right of the cyan ball',
+ 'Is there any green ball to the right of the purple ball',
+ 'Is there any green ball to the right of the red ball',
+ 'Is there any purple ball behind the blue ball',
+ 'Is there any purple ball behind the cyan ball',
+ 'Is there any purple ball behind the green ball',
+ 'Is there any purple ball behind the red ball',
+ 'Is there any purple ball in front of the blue ball',
+ 'Is there any purple ball in front of the cyan ball',
+ 'Is there any purple ball in front of the green ball',
+ 'Is there any purple ball in front of the red ball',
+ 'Is there any purple ball to the left of the blue ball',
+ 'Is there any purple ball to the left of the cyan ball',
+ 'Is there any purple ball to the left of the green ball',
+ 'Is there any purple ball to the left of the red ball',
+ 'Is there any purple ball to the right of the blue ball',
+ 'Is there any purple ball to the right of the cyan ball',
+ 'Is there any purple ball to the right of the green ball',
+ 'Is there any purple ball to the right of the red ball',
+ 'Is there any red ball behind the blue ball',
+ 'Is there any red ball behind the cyan ball',
+ 'Is there any red ball behind the green ball',
+ 'Is there any red ball behind the purple ball',
+ 'Is there any red ball in front of the blue ball',
+ 'Is there any red ball in front of the cyan ball',
+ 'Is there any red ball in front of the green ball',
+ 'Is there any red ball in front of the purple ball',
+ 'Is there any red ball to the left of the blue ball',
+ 'Is there any red ball to the left of the cyan ball',
+ 'Is there any red ball to the left of the green ball',
+ 'Is there any red ball to the left of the purple ball',
+ 'Is there any red ball to the right of the blue ball',
+ 'Is there any red ball to the right of the cyan ball',
+ 'Is there any red ball to the right of the green ball',
+ 'Is there any red ball to the right of the purple ball',
+ 'Push the blue ball behind the cyan ball',
+ 'Push the blue ball behind the green ball',
+ 'Push the blue ball behind the purple ball',
+ 'Push the blue ball behind the red ball',
+ 'Push the blue ball in front of the cyan ball',
+ 'Push the blue ball in front of the green ball',
+ 'Push the blue ball in front of the purple ball',
+ 'Push the blue ball in front of the red ball',
+ 'Push the blue ball to the left of the cyan ball',
+ 'Push the blue ball to the left of the green ball',
+ 'Push the blue ball to the left of the purple ball',
+ 'Push the blue ball to the left of the red ball',
+ 'Push the blue ball to the right of the cyan ball',
+ 'Push the blue ball to the right of the green ball',
+ 'Push the blue ball to the right of the purple ball',
+ 'Push the blue ball to the right of the red ball',
+ 'Push the cyan ball behind the blue ball',
+ 'Push the cyan ball behind the green ball',
+ 'Push the cyan ball behind the purple ball',
+ 'Push the cyan ball behind the red ball',
+ 'Push the cyan ball in front of the blue ball',
+ 'Push the cyan ball in front of the green ball',
+ 'Push the cyan ball in front of the purple ball',
+ 'Push the cyan ball in front of the red ball',
+ 'Push the cyan ball to the left of the blue ball',
+ 'Push the cyan ball to the left of the green ball',
+ 'Push the cyan ball to the left of the purple ball',
+ 'Push the cyan ball to the left of the red ball',
+ 'Push the cyan ball to the right of the blue ball',
+ 'Push the cyan ball to the right of the green ball',
+ 'Push the cyan ball to the right of the purple ball',
+ 'Push the cyan ball to the right of the red ball',
+ 'Push the green ball behind the blue ball',
+ 'Push the green ball behind the cyan ball',
+ 'Push the green ball behind the purple ball',
+ 'Push the green ball behind the red ball',
+ 'Push the green ball in front of the blue ball',
+ 'Push the green ball in front of the cyan ball',
+ 'Push the green ball in front of the purple ball',
+ 'Push the green ball in front of the red ball',
+ 'Push the green ball to the left of the blue ball',
+ 'Push the green ball to the left of the cyan ball',
+ 'Push the green ball to the left of the purple ball',
+ 'Push the green ball to the left of the red ball',
+ 'Push the green ball to the right of the blue ball',
+ 'Push the green ball to the right of the cyan ball',
+ 'Push the green ball to the right of the purple ball',
+ 'Push the green ball to the right of the red ball',
+ 'Push the purple ball behind the blue ball',
+ 'Push the purple ball behind the cyan ball',
+ 'Push the purple ball behind the green ball',
+ 'Push the purple ball behind the red ball',
+ 'Push the purple ball in front of the blue ball',
+ 'Push the purple ball in front of the cyan ball',
+ 'Push the purple ball in front of the green ball',
+ 'Push the purple ball in front of the red ball',
+ 'Push the purple ball to the left of the blue ball',
+ 'Push the purple ball to the left of the cyan ball',
+ 'Push the purple ball to the left of the green ball',
+ 'Push the purple ball to the left of the red ball',
+ 'Push the purple ball to the right of the blue ball',
+ 'Push the purple ball to the right of the cyan ball',
+ 'Push the purple ball to the right of the green ball',
+ 'Push the purple ball to the right of the red ball',
+ 'Push the red ball behind the blue ball',
+ 'Push the red ball behind the cyan ball',
+ 'Push the red ball behind the green ball',
+ 'Push the red ball behind the purple ball',
+ 'Push the red ball in front of the blue ball',
+ 'Push the red ball in front of the cyan ball',
+ 'Push the red ball in front of the green ball',
+ 'Push the red ball in front of the purple ball',
+ 'Push the red ball to the left of the blue ball',
+ 'Push the red ball to the left of the cyan ball',
+ 'Push the red ball to the left of the green ball',
+ 'Push the red ball to the left of the purple ball',
+ 'Push the red ball to the right of the blue ball',
+ 'Push the red ball to the right of the cyan ball',
+ 'Push the red ball to the right of the green ball',
+ 'Push the red ball to the right of the purple ball',
+ 'The blue ball is being pushed behind the cyan ball',
+ 'The blue ball is being pushed behind the green ball',
+ 'The blue ball is being pushed behind the purple ball',
+ 'The blue ball is being pushed behind the red ball',
+ 'The blue ball is being pushed in front of the cyan ball',
+ 'The blue ball is being pushed in front of the green ball',
+ 'The blue ball is being pushed in front of the purple ball',
+ 'The blue ball is being pushed in front of the red ball',
+ 'The blue ball is being pushed to the left of the cyan ball',
+ 'The blue ball is being pushed to the left of the green ball',
+ 'The blue ball is being pushed to the left of the purple ball',
+ 'The blue ball is being pushed to the left of the red ball',
+ 'The blue ball is being pushed to the right of the cyan ball',
+ 'The blue ball is being pushed to the right of the green ball',
+ 'The blue ball is being pushed to the right of the purple ball',
+ 'The blue ball is being pushed to the right of the red ball',
+ 'The blue ball is pushed behind the cyan ball',
+ 'The blue ball is pushed behind the green ball',
+ 'The blue ball is pushed behind the purple ball',
+ 'The blue ball is pushed behind the red ball',
+ 'The blue ball is pushed in front of the cyan ball',
+ 'The blue ball is pushed in front of the green ball',
+ 'The blue ball is pushed in front of the purple ball',
+ 'The blue ball is pushed in front of the red ball',
+ 'The blue ball is pushed to the left of the cyan ball',
+ 'The blue ball is pushed to the left of the green ball',
+ 'The blue ball is pushed to the left of the purple ball',
+ 'The blue ball is pushed to the left of the red ball',
+ 'The blue ball is pushed to the right of the cyan ball',
+ 'The blue ball is pushed to the right of the green ball',
+ 'The blue ball is pushed to the right of the purple ball',
+ 'The blue ball is pushed to the right of the red ball',
+ 'The blue ball moves behind the cyan ball',
+ 'The blue ball moves behind the green ball',
+ 'The blue ball moves behind the purple ball',
+ 'The blue ball moves behind the red ball',
+ 'The blue ball moves in front of the cyan ball',
+ 'The blue ball moves in front of the green ball',
+ 'The blue ball moves in front of the purple ball',
+ 'The blue ball moves in front of the red ball',
+ 'The blue ball moves to the left of the cyan ball',
+ 'The blue ball moves to the left of the green ball',
+ 'The blue ball moves to the left of the purple ball',
+ 'The blue ball moves to the left of the red ball',
+ 'The blue ball moves to the right of the cyan ball',
+ 'The blue ball moves to the right of the green ball',
+ 'The blue ball moves to the right of the purple ball',
+ 'The blue ball moves to the right of the red ball',
+ 'The blue ball was moved behind the cyan ball',
+ 'The blue ball was moved behind the green ball',
+ 'The blue ball was moved behind the purple ball',
+ 'The blue ball was moved behind the red ball',
+ 'The blue ball was moved in front of the cyan ball',
+ 'The blue ball was moved in front of the green ball',
+ 'The blue ball was moved in front of the purple ball',
+ 'The blue ball was moved in front of the red ball',
+ 'The blue ball was moved to the left of the cyan ball',
+ 'The blue ball was moved to the left of the green ball',
+ 'The blue ball was moved to the left of the purple ball',
+ 'The blue ball was moved to the left of the red ball',
+ 'The blue ball was moved to the right of the cyan ball',
+ 'The blue ball was moved to the right of the green ball',
+ 'The blue ball was moved to the right of the purple ball',
+ 'The blue ball was moved to the right of the red ball',
+ 'The cyan ball is being pushed behind the blue ball',
+ 'The cyan ball is being pushed behind the green ball',
+ 'The cyan ball is being pushed behind the purple ball',
+ 'The cyan ball is being pushed behind the red ball',
+ 'The cyan ball is being pushed in front of the blue ball',
+ 'The cyan ball is being pushed in front of the green ball',
+ 'The cyan ball is being pushed in front of the purple ball',
+ 'The cyan ball is being pushed in front of the red ball',
+ 'The cyan ball is being pushed to the left of the blue ball',
+ 'The cyan ball is being pushed to the left of the green ball',
+ 'The cyan ball is being pushed to the left of the purple ball',
+ 'The cyan ball is being pushed to the left of the red ball',
+ 'The cyan ball is being pushed to the right of the blue ball',
+ 'The cyan ball is being pushed to the right of the green ball',
+ 'The cyan ball is being pushed to the right of the purple ball',
+ 'The cyan ball is being pushed to the right of the red ball',
+ 'The cyan ball is pushed behind the blue ball',
+ 'The cyan ball is pushed behind the green ball',
+ 'The cyan ball is pushed behind the purple ball',
+ 'The cyan ball is pushed behind the red ball',
+ 'The cyan ball is pushed in front of the blue ball',
+ 'The cyan ball is pushed in front of the green ball',
+ 'The cyan ball is pushed in front of the purple ball',
+ 'The cyan ball is pushed in front of the red ball',
+ 'The cyan ball is pushed to the left of the blue ball',
+ 'The cyan ball is pushed to the left of the green ball',
+ 'The cyan ball is pushed to the left of the purple ball',
+ 'The cyan ball is pushed to the left of the red ball',
+ 'The cyan ball is pushed to the right of the blue ball',
+ 'The cyan ball is pushed to the right of the green ball',
+ 'The cyan ball is pushed to the right of the purple ball',
+ 'The cyan ball is pushed to the right of the red ball',
+ 'The cyan ball moves behind the blue ball',
+ 'The cyan ball moves behind the green ball',
+ 'The cyan ball moves behind the purple ball',
+ 'The cyan ball moves behind the red ball',
+ 'The cyan ball moves in front of the blue ball',
+ 'The cyan ball moves in front of the green ball',
+ 'The cyan ball moves in front of the purple ball',
+ 'The cyan ball moves in front of the red ball',
+ 'The cyan ball moves to the left of the blue ball',
+ 'The cyan ball moves to the left of the green ball',
+ 'The cyan ball moves to the left of the purple ball',
+ 'The cyan ball moves to the left of the red ball',
+ 'The cyan ball moves to the right of the blue ball',
+ 'The cyan ball moves to the right of the green ball',
+ 'The cyan ball moves to the right of the purple ball',
+ 'The cyan ball moves to the right of the red ball',
+ 'The cyan ball was moved behind the blue ball',
+ 'The cyan ball was moved behind the green ball',
+ 'The cyan ball was moved behind the purple ball',
+ 'The cyan ball was moved behind the red ball',
+ 'The cyan ball was moved in front of the blue ball',
+ 'The cyan ball was moved in front of the green ball',
+ 'The cyan ball was moved in front of the purple ball',
+ 'The cyan ball was moved in front of the red ball',
+ 'The cyan ball was moved to the left of the blue ball',
+ 'The cyan ball was moved to the left of the green ball',
+ 'The cyan ball was moved to the left of the purple ball',
+ 'The cyan ball was moved to the left of the red ball',
+ 'The cyan ball was moved to the right of the blue ball',
+ 'The cyan ball was moved to the right of the green ball',
+ 'The cyan ball was moved to the right of the purple ball',
+ 'The cyan ball was moved to the right of the red ball',
+ 'The green ball is being pushed behind the blue ball',
+ 'The green ball is being pushed behind the cyan ball',
+ 'The green ball is being pushed behind the purple ball',
+ 'The green ball is being pushed behind the red ball',
+ 'The green ball is being pushed in front of the blue ball',
+ 'The green ball is being pushed in front of the cyan ball',
+ 'The green ball is being pushed in front of the purple ball',
+ 'The green ball is being pushed in front of the red ball',
+ 'The green ball is being pushed to the left of the blue ball',
+ 'The green ball is being pushed to the left of the cyan ball',
+ 'The green ball is being pushed to the left of the purple ball',
+ 'The green ball is being pushed to the left of the red ball',
+ 'The green ball is being pushed to the right of the blue ball',
+ 'The green ball is being pushed to the right of the cyan ball',
+ 'The green ball is being pushed to the right of the purple ball',
+ 'The green ball is being pushed to the right of the red ball',
+ 'The green ball is pushed behind the blue ball',
+ 'The green ball is pushed behind the cyan ball',
+ 'The green ball is pushed behind the purple ball',
+ 'The green ball is pushed behind the red ball',
+ 'The green ball is pushed in front of the blue ball',
+ 'The green ball is pushed in front of the cyan ball',
+ 'The green ball is pushed in front of the purple ball',
+ 'The green ball is pushed in front of the red ball',
+ 'The green ball is pushed to the left of the blue ball',
+ 'The green ball is pushed to the left of the cyan ball',
+ 'The green ball is pushed to the left of the purple ball',
+ 'The green ball is pushed to the left of the red ball',
+ 'The green ball is pushed to the right of the blue ball',
+ 'The green ball is pushed to the right of the cyan ball',
+ 'The green ball is pushed to the right of the purple ball',
+ 'The green ball is pushed to the right of the red ball',
+ 'The green ball moves behind the blue ball',
+ 'The green ball moves behind the cyan ball',
+ 'The green ball moves behind the purple ball',
+ 'The green ball moves behind the red ball',
+ 'The green ball moves in front of the blue ball',
+ 'The green ball moves in front of the cyan ball',
+ 'The green ball moves in front of the purple ball',
+ 'The green ball moves in front of the red ball',
+ 'The green ball moves to the left of the blue ball',
+ 'The green ball moves to the left of the cyan ball',
+ 'The green ball moves to the left of the purple ball',
+ 'The green ball moves to the left of the red ball',
+ 'The green ball moves to the right of the blue ball',
+ 'The green ball moves to the right of the cyan ball',
+ 'The green ball moves to the right of the purple ball',
+ 'The green ball moves to the right of the red ball',
+ 'The green ball was moved behind the blue ball',
+ 'The green ball was moved behind the cyan ball',
+ 'The green ball was moved behind the purple ball',
+ 'The green ball was moved behind the red ball',
+ 'The green ball was moved in front of the blue ball',
+ 'The green ball was moved in front of the cyan ball',
+ 'The green ball was moved in front of the purple ball',
+ 'The green ball was moved in front of the red ball',
+ 'The green ball was moved to the left of the blue ball',
+ 'The green ball was moved to the left of the cyan ball',
+ 'The green ball was moved to the left of the purple ball',
+ 'The green ball was moved to the left of the red ball',
+ 'The green ball was moved to the right of the blue ball',
+ 'The green ball was moved to the right of the cyan ball',
+ 'The green ball was moved to the right of the purple ball',
+ 'The green ball was moved to the right of the red ball',
+ 'The purple ball is being pushed behind the blue ball',
+ 'The purple ball is being pushed behind the cyan ball',
+ 'The purple ball is being pushed behind the green ball',
+ 'The purple ball is being pushed behind the red ball',
+ 'The purple ball is being pushed in front of the blue ball',
+ 'The purple ball is being pushed in front of the cyan ball',
+ 'The purple ball is being pushed in front of the green ball',
+ 'The purple ball is being pushed in front of the red ball',
+ 'The purple ball is being pushed to the left of the blue ball',
+ 'The purple ball is being pushed to the left of the cyan ball',
+ 'The purple ball is being pushed to the left of the green ball',
+ 'The purple ball is being pushed to the left of the red ball',
+ 'The purple ball is being pushed to the right of the blue ball',
+ 'The purple ball is being pushed to the right of the cyan ball',
+ 'The purple ball is being pushed to the right of the green ball',
+ 'The purple ball is being pushed to the right of the red ball',
+ 'The purple ball is pushed behind the blue ball',
+ 'The purple ball is pushed behind the cyan ball',
+ 'The purple ball is pushed behind the green ball',
+ 'The purple ball is pushed behind the red ball',
+ 'The purple ball is pushed in front of the blue ball',
+ 'The purple ball is pushed in front of the cyan ball',
+ 'The purple ball is pushed in front of the green ball',
+ 'The purple ball is pushed in front of the red ball',
+ 'The purple ball is pushed to the left of the blue ball',
+ 'The purple ball is pushed to the left of the cyan ball',
+ 'The purple ball is pushed to the left of the green ball',
+ 'The purple ball is pushed to the left of the red ball',
+ 'The purple ball is pushed to the right of the blue ball',
+ 'The purple ball is pushed to the right of the cyan ball',
+ 'The purple ball is pushed to the right of the green ball',
+ 'The purple ball is pushed to the right of the red ball',
+ 'The purple ball moves behind the blue ball',
+ 'The purple ball moves behind the cyan ball',
+ 'The purple ball moves behind the green ball',
+ 'The purple ball moves behind the red ball',
+ 'The purple ball moves in front of the blue ball',
+ 'The purple ball moves in front of the cyan ball',
+ 'The purple ball moves in front of the green ball',
+ 'The purple ball moves in front of the red ball',
+ 'The purple ball moves to the left of the blue ball',
+ 'The purple ball moves to the left of the cyan ball',
+ 'The purple ball moves to the left of the green ball',
+ 'The purple ball moves to the left of the red ball',
+ 'The purple ball moves to the right of the blue ball',
+ 'The purple ball moves to the right of the cyan ball',
+ 'The purple ball moves to the right of the green ball',
+ 'The purple ball moves to the right of the red ball',
+ 'The purple ball was moved behind the blue ball',
+ 'The purple ball was moved behind the cyan ball',
+ 'The purple ball was moved behind the green ball',
+ 'The purple ball was moved behind the red ball',
+ 'The purple ball was moved in front of the blue ball',
+ 'The purple ball was moved in front of the cyan ball',
+ 'The purple ball was moved in front of the green ball',
+ 'The purple ball was moved in front of the red ball',
+ 'The purple ball was moved to the left of the blue ball',
+ 'The purple ball was moved to the left of the cyan ball',
+ 'The purple ball was moved to the left of the green ball',
+ 'The purple ball was moved to the left of the red ball',
+ 'The purple ball was moved to the right of the blue ball',
+ 'The purple ball was moved to the right of the cyan ball',
+ 'The purple ball was moved to the right of the green ball',
+ 'The purple ball was moved to the right of the red ball',
+ 'The red ball is being pushed behind the blue ball',
+ 'The red ball is being pushed behind the cyan ball',
+ 'The red ball is being pushed behind the green ball',
+ 'The red ball is being pushed behind the purple ball',
+ 'The red ball is being pushed in front of the blue ball',
+ 'The red ball is being pushed in front of the cyan ball',
+ 'The red ball is being pushed in front of the green ball',
+ 'The red ball is being pushed in front of the purple ball',
+ 'The red ball is being pushed to the left of the blue ball',
+ 'The red ball is being pushed to the left of the cyan ball',
+ 'The red ball is being pushed to the left of the green ball',
+ 'The red ball is being pushed to the left of the purple ball',
+ 'The red ball is being pushed to the right of the blue ball',
+ 'The red ball is being pushed to the right of the cyan ball',
+ 'The red ball is being pushed to the right of the green ball',
+ 'The red ball is being pushed to the right of the purple ball',
+ 'The red ball is pushed behind the blue ball',
+ 'The red ball is pushed behind the cyan ball',
+ 'The red ball is pushed behind the green ball',
+ 'The red ball is pushed behind the purple ball',
+ 'The red ball is pushed in front of the blue ball',
+ 'The red ball is pushed in front of the cyan ball',
+ 'The red ball is pushed in front of the green ball',
+ 'The red ball is pushed in front of the purple ball',
+ 'The red ball is pushed to the left of the blue ball',
+ 'The red ball is pushed to the left of the cyan ball',
+ 'The red ball is pushed to the left of the green ball',
+ 'The red ball is pushed to the left of the purple ball',
+ 'The red ball is pushed to the right of the blue ball',
+ 'The red ball is pushed to the right of the cyan ball',
+ 'The red ball is pushed to the right of the green ball',
+ 'The red ball is pushed to the right of the purple ball',
+ 'The red ball moves behind the blue ball',
+ 'The red ball moves behind the cyan ball',
+ 'The red ball moves behind the green ball',
+ 'The red ball moves behind the purple ball',
+ 'The red ball moves in front of the blue ball',
+ 'The red ball moves in front of the cyan ball',
+ 'The red ball moves in front of the green ball',
+ 'The red ball moves in front of the purple ball',
+ 'The red ball moves to the left of the blue ball',
+ 'The red ball moves to the left of the cyan ball',
+ 'The red ball moves to the left of the green ball',
+ 'The red ball moves to the left of the purple ball',
+ 'The red ball moves to the right of the blue ball',
+ 'The red ball moves to the right of the cyan ball',
+ 'The red ball moves to the right of the green ball',
+ 'The red ball moves to the right of the purple ball',
+ 'The red ball was moved behind the blue ball',
+ 'The red ball was moved behind the cyan ball',
+ 'The red ball was moved behind the green ball',
+ 'The red ball was moved behind the purple ball',
+ 'The red ball was moved in front of the blue ball',
+ 'The red ball was moved in front of the cyan ball',
+ 'The red ball was moved in front of the green ball',
+ 'The red ball was moved in front of the purple ball',
+ 'The red ball was moved to the left of the blue ball',
+ 'The red ball was moved to the left of the cyan ball',
+ 'The red ball was moved to the left of the green ball',
+ 'The red ball was moved to the left of the purple ball',
+ 'The red ball was moved to the right of the blue ball',
+ 'The red ball was moved to the right of the cyan ball',
+ 'The red ball was moved to the right of the green ball',
+ 'The red ball was moved to the right of the purple ball'}
+
 NAME = "t5-v1_1-xxl"
-anns = sum(json.load(open("/data2/eddie/calvin/annotations.json")).values(), [])
+anns = list(unique_z)
 embeds = {}
+
+    
 embeddings = t5_encode_text(anns, name=f"google/{NAME}")
 for a, e in zip(anns, embeddings):
     embeds[a] = e.cpu()
-torch.save(embeds, f"{NAME}_embeddings.pt")
+
+
+torch.save(embeds, f"clevr_{NAME}_embeddings.pt")
+
+# final = {}
+# for k in d:
+#     final[k] = embed[d[k]]
+
+# torch.save(final, f"clevr_{NAME}_direct_embeddings.pt")
diff --git a/src/lcd/utils/training.py b/src/lcd/utils/training.py
index c2e17a1..966ba33 100644
--- a/src/lcd/utils/training.py
+++ b/src/lcd/utils/training.py
@@ -51,6 +51,7 @@ class Trainer:
         self,
         diffusion_model,
         dataset,
+        val_dataset,
         ema_decay=0.995,
         train_batch_size=32,
         train_lr=2e-5,
@@ -58,6 +59,7 @@ class Trainer:
         step_start_ema=2000,
         update_ema_every=10,
         log_freq=100,
+        validation_freq=100,
         sample_freq=1000,
         save_freq=1000,
         label_freq=100000,
@@ -71,7 +73,7 @@ class Trainer:
         self.ema = EMA(ema_decay)
         self.ema_model = copy.deepcopy(self.model)
         self.update_ema_every = update_ema_every
-
+        self.validation_freq = validation_freq
         self.step_start_ema = step_start_ema
         self.log_freq = log_freq
         self.sample_freq = sample_freq
@@ -92,6 +94,17 @@ class Trainer:
                 pin_memory=True,
             )
         )
+
+        self.val_dataset = val_dataset
+        self.val_dataloader = cycle(
+            torch.utils.data.DataLoader(
+                self.dataset,
+                batch_size=train_batch_size,
+                num_workers=1,
+                shuffle=True,
+                pin_memory=True,
+            )
+        )        
         self.dataloader_vis = cycle(
             torch.utils.data.DataLoader(
                 self.dataset, batch_size=1, num_workers=0, shuffle=True, pin_memory=True
@@ -138,6 +151,15 @@ class Trainer:
             self.optimizer.step()
             self.optimizer.zero_grad()
 
+            if self.step % self.validation_freq == 0:
+                batch = next(self.val_dataloader)
+                batch = batch_to_device(batch)
+                if isinstance(batch, Batch):
+                    loss, infos = self.model.loss(*batch)
+                else:
+                    loss, infos = self.model.loss(*batch[0], **batch[1])
+                wlog({"val/loss": loss, **infos})
+            
             if self.step % self.update_ema_every == 0:
                 self.step_ema()
 
diff --git a/submodules/data b/submodules/data
index 7776fef..89f6b5b 160000
--- a/submodules/data
+++ b/submodules/data
@@ -1 +1 @@
-Subproject commit 7776fef1cbdede520b049f1a8c3a2c632971966c
+Subproject commit 89f6b5b54efd6b560881e090602ec57f820ca935-dirty
diff --git a/submodules/talar-openreview-fork b/submodules/talar-openreview-fork
index d36bbf7..83416d7 160000
--- a/submodules/talar-openreview-fork
+++ b/submodules/talar-openreview-fork
@@ -1 +1 @@
-Subproject commit d36bbf7be863298a3b3d0d27e5ffc75963ff0cfc
+Subproject commit 83416d76fa9a782dcd0a00a0e673b73a3a224fb4-dirty