-
Notifications
You must be signed in to change notification settings - Fork 0
/
test.txt
1996 lines (1766 loc) · 94.3 KB
/
test.txt
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
============================= test session starts ==============================
platform linux -- Python 3.12.1, pytest-7.4.3, pluggy-1.5.0 -- /usr/local/python/3.12.1/bin/python3
cachedir: .pytest_cache
benchmark: 4.0.0 (defaults: timer=time.perf_counter disable_gc=False min_rounds=5 min_time=0.000005 max_time=1.0 calibration_precision=10 warmup=False warmup_iterations=100000)
rootdir: /workspaces/cognition-l1-experiment
configfile: pytest.ini
testpaths: tests
plugins: anyio-4.7.0, cov-4.1.0, timeout-2.1.0, benchmark-4.0.0, xdist-3.3.1
collecting ... collected 55 items
tests/test_consciousness.py::TestConsciousnessModel::test_model_initialization PASSED [ 1%]
tests/test_consciousness.py::TestConsciousnessModel::test_model_forward_pass FAILED [ 3%]
tests/test_consciousness.py::TestConsciousnessModel::test_model_config PASSED [ 5%]
tests/test_consciousness.py::TestConsciousnessModel::test_model_state_initialization FAILED [ 7%]
tests/test_consciousness.py::TestConsciousnessModel::test_model_state_update FAILED [ 9%]
tests/test_consciousness.py::TestConsciousnessModel::test_model_attention_weights FAILED [ 10%]
tests/test_environment.py::EnvironmentTests::test_core_imports PASSED [ 12%]
tests/test_environment.py::EnvironmentTests::test_framework_versions PASSED [ 14%]
tests/test_environment.py::EnvironmentTests::test_hardware_detection PASSED [ 16%]
tests/test_environment.py::EnvironmentTests::test_memory_allocation PASSED [ 18%]
tests/test_environment.py::EnvironmentTests::test_python_version PASSED [ 20%]
tests/benchmarks/test_arc_reasoning.py::TestARCReasoning::test_pattern_recognition FAILED [ 21%]
tests/benchmarks/test_arc_reasoning.py::TestARCReasoning::test_abstraction_capability FAILED [ 23%]
tests/benchmarks/test_arc_reasoning.py::TestARCReasoning::test_conscious_adaptation FAILED [ 25%]
tests/benchmarks/test_arc_reasoning.py::TestARCReasoning::test_working_memory FAILED [ 27%]
tests/benchmarks/test_arc_reasoning.py::TestARCReasoning::test_cognitive_process_integration FAILED [ 29%]
tests/benchmarks/test_arc_reasoning.py::TestARCReasoning::test_consciousness_state_manager FAILED [ 30%]
tests/benchmarks/test_arc_reasoning.py::TestARCReasoning::test_information_integration FAILED [ 32%]
tests/benchmarks/test_bigbench_reasoning.py::TestBigBenchReasoning::test_reasoning_capabilities FAILED [ 34%]
tests/benchmarks/test_bigbench_reasoning.py::TestBigBenchReasoning::test_meta_learning FAILED [ 36%]
tests/benchmarks/test_bigbench_reasoning.py::TestBigBenchReasoning::test_consciousness_emergence FAILED [ 38%]
tests/unit/attention/test_attention.py::TestConsciousnessAttention::test_scaled_dot_product_attention PASSED [ 40%]
tests/unit/attention/test_attention.py::TestConsciousnessAttention::test_attention_dropout PASSED [ 41%]
tests/unit/attention/test_attention.py::TestConsciousnessAttention::test_attention_output_shape PASSED [ 43%]
tests/unit/attention/test_attention.py::TestGlobalWorkspace::test_global_workspace_broadcasting PASSED [ 45%]
tests/unit/attention/test_attention_mechanisms.py::TestAttentionMechanisms::test_scaled_dot_product PASSED [ 47%]
tests/unit/attention/test_attention_mechanisms.py::TestAttentionMechanisms::test_attention_mask PASSED [ 49%]
tests/unit/attention/test_attention_mechanisms.py::TestAttentionMechanisms::test_consciousness_broadcasting PASSED [ 50%]
tests/unit/attention/test_attention_mechanisms.py::TestAttentionMechanisms::test_global_workspace_integration PASSED [ 52%]
tests/unit/integration/test_cognitive_integration.py::TestCognitiveProcessIntegration::test_cross_modal_attention FAILED [ 54%]
tests/unit/integration/test_cognitive_integration.py::TestCognitiveProcessIntegration::test_modality_specific_processing FAILED [ 56%]
tests/unit/integration/test_cognitive_integration.py::TestCognitiveProcessIntegration::test_integration_stability PASSED [ 58%]
tests/unit/integration/test_cognitive_integration.py::TestCognitiveProcessIntegration::test_cognitive_integration FAILED [ 60%]
tests/unit/integration/test_state_management.py::TestConsciousnessStateManager::test_state_updates PASSED [ 61%]
tests/unit/integration/test_state_management.py::TestConsciousnessStateManager::test_rl_optimization PASSED [ 63%]
tests/unit/integration/test_state_management.py::TestConsciousnessStateManager::test_adaptive_gating FAILED [ 65%]
tests/unit/integration/test_state_management.py::TestConsciousnessStateManager::test_state_consistency PASSED [ 67%]
tests/unit/memory/test_integration.py::TestInformationIntegration::test_phi_metric_computation PASSED [ 69%]
tests/unit/memory/test_integration.py::TestInformationIntegration::test_information_flow FAILED [ 70%]
tests/unit/memory/test_integration.py::TestInformationIntegration::test_entropy_calculations PASSED [ 72%]
tests/unit/memory/test_integration.py::TestInformationIntegration::test_memory_integration PASSED [ 74%]
tests/unit/memory/test_memory.py::TestGRUCell::test_gru_state_updates PASSED [ 76%]
tests/unit/memory/test_memory.py::TestGRUCell::test_gru_reset_gate PASSED [ 78%]
tests/unit/memory/test_memory.py::TestWorkingMemory::test_sequence_processing FAILED [ 80%]
tests/unit/memory/test_memory.py::TestWorkingMemory::test_memory_retention FAILED [ 81%]
tests/unit/memory/test_memory_components.py::TestMemoryComponents::test_gru_state_updates PASSED [ 83%]
tests/unit/memory/test_memory_components.py::TestMemoryComponents::test_memory_sequence_processing FAILED [ 85%]
tests/unit/memory/test_memory_components.py::TestMemoryComponents::test_context_aware_gating FAILED [ 87%]
tests/unit/memory/test_memory_components.py::TestMemoryComponents::test_information_integration FAILED [ 89%]
tests/unit/memory/test_memory_components.py::TestMemoryComponents::test_memory_retention FAILED [ 90%]
tests/unit/state/test_consciousness_state_management.py::TestStateManagement::test_state_updates PASSED [ 92%]
tests/unit/state/test_consciousness_state_management.py::TestStateManagement::test_rl_optimization PASSED [ 94%]
tests/unit/state/test_consciousness_state_management.py::TestStateManagement::test_energy_efficiency PASSED [ 96%]
tests/unit/state/test_consciousness_state_management.py::TestStateManagement::test_state_value_estimation PASSED [ 98%]
tests/unit/state/test_consciousness_state_management.py::TestStateManagement::test_adaptive_gating PASSED [100%]
=================================== FAILURES ===================================
________________ TestConsciousnessModel.test_model_forward_pass ________________
self = <tests.test_consciousness.TestConsciousnessModel object at 0x7c765283e720>
model = ConsciousnessModel(
# attributes
hidden_dim = 64
num_heads = 4
num_layers = 4
num_states = 4
dropout_rate = 0.1
)
sample_input = {'attention': Array([[[-0.02862089, 1.5240539 , -1.0556508 , ..., -0.27188757,
-0.88195777, 0.11891642],
... [-0.5756394 , -0.20118208, -0.08988765, ..., 0.23238769,
1.5470275 , -1.2839596 ]]], dtype=float32)}
key = Array([ 0, 42], dtype=uint32), deterministic = True
def test_model_forward_pass(self, model, sample_input, key, deterministic):
"""Test forward pass through consciousness model."""
# Initialize model
input_shape = (model.hidden_dim,)
> variables = model.init(key, sample_input, deterministic=deterministic)
tests/test_consciousness.py:49:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([3819375347, 1502290012], dtype=uint32), rng = (64,)
input_shape = 64
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
____________ TestConsciousnessModel.test_model_state_initialization ____________
self = <tests.test_consciousness.TestConsciousnessModel object at 0x7c765283eab0>
model = ConsciousnessModel(
# attributes
hidden_dim = 64
num_heads = 4
num_layers = 4
num_states = 4
dropout_rate = 0.1
)
sample_input = {'attention': Array([[[-0.02862089, 1.5240539 , -1.0556508 , ..., -0.27188757,
-0.88195777, 0.11891642],
... [-0.5756394 , -0.20118208, -0.08988765, ..., 0.23238769,
1.5470275 , -1.2839596 ]]], dtype=float32)}
key = Array([ 0, 42], dtype=uint32), deterministic = True
def test_model_state_initialization(self, model, sample_input, key, deterministic):
"""Test initialization of the model state."""
input_shape = (model.hidden_dim,)
> variables = model.init(key, sample_input, deterministic=deterministic)
tests/test_consciousness.py:89:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([3819375347, 1502290012], dtype=uint32), rng = (64,)
input_shape = 64
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
________________ TestConsciousnessModel.test_model_state_update ________________
self = <tests.test_consciousness.TestConsciousnessModel object at 0x7c765283ecc0>
model = ConsciousnessModel(
# attributes
hidden_dim = 64
num_heads = 4
num_layers = 4
num_states = 4
dropout_rate = 0.1
)
sample_input = {'attention': Array([[[-0.02862089, 1.5240539 , -1.0556508 , ..., -0.27188757,
-0.88195777, 0.11891642],
... [-0.5756394 , -0.20118208, -0.08988765, ..., 0.23238769,
1.5470275 , -1.2839596 ]]], dtype=float32)}
key = Array([ 0, 42], dtype=uint32), deterministic = True
def test_model_state_update(self, model, sample_input, key, deterministic):
"""Test updating the model state."""
input_shape = (model.hidden_dim,)
> variables = model.init(key, sample_input, deterministic=deterministic)
tests/test_consciousness.py:96:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([3819375347, 1502290012], dtype=uint32), rng = (64,)
input_shape = 64
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
_____________ TestConsciousnessModel.test_model_attention_weights ______________
self = <tests.test_consciousness.TestConsciousnessModel object at 0x7c765283ef00>
model = ConsciousnessModel(
# attributes
hidden_dim = 64
num_heads = 4
num_layers = 4
num_states = 4
dropout_rate = 0.1
)
sample_input = {'attention': Array([[[-0.02862089, 1.5240539 , -1.0556508 , ..., -0.27188757,
-0.88195777, 0.11891642],
... [-0.5756394 , -0.20118208, -0.08988765, ..., 0.23238769,
1.5470275 , -1.2839596 ]]], dtype=float32)}
key = Array([ 0, 42], dtype=uint32), deterministic = True
def test_model_attention_weights(self, model, sample_input, key, deterministic):
"""Test attention weights in the model."""
input_shape = (model.hidden_dim,)
> variables = model.init(key, sample_input, deterministic=deterministic)
tests/test_consciousness.py:108:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([3819375347, 1502290012], dtype=uint32), rng = (64,)
input_shape = 64
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
__________________ TestARCReasoning.test_pattern_recognition ___________________
self = <tests.benchmarks.test_arc_reasoning.TestARCReasoning object at 0x7c765283f800>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_pattern_recognition(self, key, consciousness_model):
inputs, expected = self.load_arc_sample()
batch_size = inputs['visual'].shape[0]
# Initialize model state
model_inputs = {
'visual': inputs['visual'],
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))
}
# Ensure input_shape is a tuple
input_shape = (consciousness_model.hidden_dim,)
# Initialize model
> variables = consciousness_model.init(key, model_inputs)
tests/benchmarks/test_arc_reasoning.py:56:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([2420929151, 3698740751], dtype=uint32), rng = (512,)
input_shape = 512
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
_________________ TestARCReasoning.test_abstraction_capability _________________
self = <tests.benchmarks.test_arc_reasoning.TestARCReasoning object at 0x7c765283f0e0>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_abstraction_capability(self, key, consciousness_model):
inputs, _ = self.load_arc_sample()
batch_size = inputs['visual'].shape[0]
# Create transformed versions
variations = {
'original': inputs['visual'],
'rotated': jnp.rot90(inputs['visual'][:, :, :, 0], k=1)[:, :, None],
'scaled': inputs['visual'] * 2.0
}
try:
# Ensure input_shape is a tuple
input_shape = (consciousness_model.hidden_dim,)
> variables = consciousness_model.init(
key,
{'visual': variations['original'],
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))}
)
tests/benchmarks/test_arc_reasoning.py:102:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([2420929151, 3698740751], dtype=uint32), rng = (512,)
input_shape = 512
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
During handling of the above exception, another exception occurred:
self = <tests.benchmarks.test_arc_reasoning.TestARCReasoning object at 0x7c765283f0e0>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_abstraction_capability(self, key, consciousness_model):
inputs, _ = self.load_arc_sample()
batch_size = inputs['visual'].shape[0]
# Create transformed versions
variations = {
'original': inputs['visual'],
'rotated': jnp.rot90(inputs['visual'][:, :, :, 0], k=1)[:, :, None],
'scaled': inputs['visual'] * 2.0
}
try:
# Ensure input_shape is a tuple
input_shape = (consciousness_model.hidden_dim,)
variables = consciousness_model.init(
key,
{'visual': variations['original'],
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))}
)
states = {}
for name, visual_input in variations.items():
output, metrics = consciousness_model.apply(
variables,
{'visual': visual_input,
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))},
deterministic=True
)
states[name] = output
# Test representation similarity
def cosine_similarity(x, y):
return jnp.sum(x * y) / (jnp.linalg.norm(x) * jnp.linalg.norm(y))
orig_rot_sim = cosine_similarity(
states['original'].ravel(),
states['rotated'].ravel()
)
orig_scaled_sim = cosine_similarity(
states['original'].ravel(),
states['scaled'].ravel()
)
# Transformed versions should maintain similar representations
assert orig_rot_sim > 0.5
assert orig_scaled_sim > 0.7
except Exception as e:
> pytest.fail(f"Abstraction capability test failed: {str(e)}")
E Failed: Abstraction capability test failed: 'int' object is not subscriptable
tests/benchmarks/test_arc_reasoning.py:136: Failed
__________________ TestARCReasoning.test_conscious_adaptation __________________
self = <tests.benchmarks.test_arc_reasoning.TestARCReasoning object at 0x7c7652680980>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_conscious_adaptation(self, key, consciousness_model):
inputs, _ = self.load_arc_sample()
batch_size = inputs['visual'].shape[0]
try:
# Create simple and complex patterns
simple_input = {
'visual': inputs['visual'],
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))
}
# More complex pattern (doubled size)
complex_visual = jnp.tile(inputs['visual'], (1, 2, 2, 1))
complex_input = {
'visual': complex_visual,
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))
}
# Ensure input_shape is a tuple
input_shape = (consciousness_model.hidden_dim,)
> variables = consciousness_model.init(key, simple_input)
tests/benchmarks/test_arc_reasoning.py:158:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([2420929151, 3698740751], dtype=uint32), rng = (512,)
input_shape = 512
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
During handling of the above exception, another exception occurred:
self = <tests.benchmarks.test_arc_reasoning.TestARCReasoning object at 0x7c7652680980>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_conscious_adaptation(self, key, consciousness_model):
inputs, _ = self.load_arc_sample()
batch_size = inputs['visual'].shape[0]
try:
# Create simple and complex patterns
simple_input = {
'visual': inputs['visual'],
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))
}
# More complex pattern (doubled size)
complex_visual = jnp.tile(inputs['visual'], (1, 2, 2, 1))
complex_input = {
'visual': complex_visual,
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))
}
# Ensure input_shape is a tuple
input_shape = (consciousness_model.hidden_dim,)
variables = consciousness_model.init(key, simple_input)
# Process both patterns
_, simple_metrics = consciousness_model.apply(
variables,
simple_input,
deterministic=True
)
_, complex_metrics = consciousness_model.apply(
variables,
complex_input,
deterministic=True
)
# Validate complexity adaptation
assert complex_metrics['phi'] > simple_metrics['phi']
assert 'attention_weights' in simple_metrics
assert 'attention_weights' in complex_metrics
# Validate attention maps
assert 'attention_maps' in simple_metrics
assert 'attention_maps' in complex_metrics
for attn_map in simple_metrics['attention_maps'].values():
assert jnp.allclose(
jnp.sum(attn_map, axis=-1),
jnp.ones((batch_size, 8, 64)) # (batch, heads, seq_length)
)
for attn_map in complex_metrics['attention_maps'].values():
assert jnp.allclose(
jnp.sum(attn_map, axis=-1),
jnp.ones((batch_size, 8, 64)) # (batch, heads, seq_length)
)
except Exception as e:
> pytest.fail(f"Conscious adaptation test failed: {str(e)}")
E Failed: Conscious adaptation test failed: 'int' object is not subscriptable
tests/benchmarks/test_arc_reasoning.py:193: Failed
_____________________ TestARCReasoning.test_working_memory _____________________
self = <tests.benchmarks.test_arc_reasoning.TestARCReasoning object at 0x7c7652680d40>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_working_memory(self, key, consciousness_model):
inputs, _ = self.load_arc_sample()
batch_size = inputs['visual'].shape[0]
# Initialize model state
model_inputs = {
'visual': inputs['visual'],
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))
}
# Ensure input_shape is a tuple
input_shape = (consciousness_model.hidden_dim,)
> variables = consciousness_model.init(key, model_inputs)
tests/benchmarks/test_arc_reasoning.py:207:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([2420929151, 3698740751], dtype=uint32), rng = (512,)
input_shape = 512
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
_____________ TestARCReasoning.test_cognitive_process_integration ______________
self = <tests.benchmarks.test_arc_reasoning.TestARCReasoning object at 0x7c7652680e30>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_cognitive_process_integration(self, key, consciousness_model):
inputs, _ = self.load_arc_sample()
batch_size = inputs['visual'].shape[0]
# Initialize model state
model_inputs = {
'visual': inputs['visual'],
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))
}
# Ensure input_shape is a tuple
input_shape = (consciousness_model.hidden_dim,)
> variables = consciousness_model.init(key, model_inputs)
tests/benchmarks/test_arc_reasoning.py:237:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([2420929151, 3698740751], dtype=uint32), rng = (512,)
input_shape = 512
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
______________ TestARCReasoning.test_consciousness_state_manager _______________
self = <tests.benchmarks.test_arc_reasoning.TestARCReasoning object at 0x7c7652681b20>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_consciousness_state_manager(self, key, consciousness_model):
inputs, _ = self.load_arc_sample()
batch_size = inputs['visual'].shape[0]
# Initialize model state
model_inputs = {
'visual': inputs['visual'],
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))
}
# Ensure input_shape is a tuple
input_shape = (consciousness_model.hidden_dim,)
> variables = consciousness_model.init(key, model_inputs)
tests/benchmarks/test_arc_reasoning.py:271:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([2420929151, 3698740751], dtype=uint32), rng = (512,)
input_shape = 512
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
________________ TestARCReasoning.test_information_integration _________________
self = <tests.benchmarks.test_arc_reasoning.TestARCReasoning object at 0x7c7652680860>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_information_integration(self, key, consciousness_model):
inputs, _ = self.load_arc_sample()
batch_size = inputs['visual'].shape[0]
# Initialize model state
model_inputs = {
'visual': inputs['visual'],
'state': jnp.zeros((batch_size, consciousness_model.hidden_dim))
}
# Ensure input_shape is a tuple
input_shape = (consciousness_model.hidden_dim,)
> variables = consciousness_model.init(key, model_inputs)
tests/benchmarks/test_arc_reasoning.py:303:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([2420929151, 3698740751], dtype=uint32), rng = (512,)
input_shape = 512
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
______________ TestBigBenchReasoning.test_reasoning_capabilities _______________
self = <tests.benchmarks.test_bigbench_reasoning.TestBigBenchReasoning object at 0x7c7652680080>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_reasoning_capabilities(self, key, consciousness_model):
tasks = self.load_sample_tasks()
input_shape = (consciousness_model.hidden_dim,)
> variables = consciousness_model.init(key, {'textual': jnp.zeros((1, 1, 512))})
tests/benchmarks/test_bigbench_reasoning.py:58:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([2420929151, 3698740751], dtype=uint32), rng = (512,)
input_shape = 512
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
___________________ TestBigBenchReasoning.test_meta_learning ___________________
self = <tests.benchmarks.test_bigbench_reasoning.TestBigBenchReasoning object at 0x7c7652680230>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_meta_learning(self, key, consciousness_model):
"""Test model's ability to adapt to new reasoning patterns."""
# Create sequence of related but progressively complex tasks
sequence = [
{'textual': "1, 2, 3, _", 'expected': "4"},
{'textual': "2, 4, 6, _", 'expected': "8"},
{'textual': "3, 6, 9, _", 'expected': "12"}
]
input_shape = (consciousness_model.hidden_dim,)
> variables = consciousness_model.init(
key,
{'textual': jnp.zeros((1, 1, 512))}
)
tests/benchmarks/test_bigbench_reasoning.py:96:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([2420929151, 3698740751], dtype=uint32), rng = (512,)
input_shape = 512
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
______________ TestBigBenchReasoning.test_consciousness_emergence ______________
self = <tests.benchmarks.test_bigbench_reasoning.TestBigBenchReasoning object at 0x7c76526828a0>
key = Array([0, 0], dtype=uint32)
consciousness_model = ConsciousnessModel(
# attributes
hidden_dim = 512
num_heads = 8
num_layers = 6
num_states = 4
dropout_rate = 0.1
)
def test_consciousness_emergence(self, key, consciousness_model):
"""
Test for emergence of consciousness-like behaviors:
1. Integration of information
2. Adaptive processing
3. Self-monitoring
"""
# Complex multi-step reasoning task
task_embedding = random.normal(key, (1, 128, 512))
input_shape = (consciousness_model.hidden_dim,)
> variables = consciousness_model.init(
key,
{'textual': task_embedding}
)
tests/benchmarks/test_bigbench_reasoning.py:127:
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
models/consciousness_model.py:105: in __call__
memory_output, memory_state = self.working_memory(
models/memory.py:102: in __call__
nn.LSTMCell.initialize_carry(key, (self.hidden_dim,), self.hidden_dim),
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
self = Array([2420929151, 3698740751], dtype=uint32), rng = (512,)
input_shape = 512
@nowrap
def initialize_carry(
self, rng: PRNGKey, input_shape: tuple[int, ...]
) -> tuple[Array, Array]:
"""Initialize the RNN cell carry.
Args:
rng: random number generator passed to the init_fn.
input_shape: a tuple providing the shape of the input to the cell.
Returns:
An initialized carry for the given RNN cell.
"""
> batch_dims = input_shape[:-1]
E TypeError: 'int' object is not subscriptable
E --------------------
E For simplicity, JAX has removed its internal frames from the traceback of the following exception. Set JAX_TRACEBACK_FILTERING=off to include these.
/usr/local/python/3.12.1/lib/python3.12/site-packages/flax/linen/recurrent.py:187: TypeError
__________ TestCognitiveProcessIntegration.test_cross_modal_attention __________
self = <test_cognitive_integration.TestCognitiveProcessIntegration object at 0x7c765271f920>
key = Array([0, 0], dtype=uint32)
integration_module = CognitiveProcessIntegration(
# attributes
hidden_dim = 64
num_heads = 4
num_layers = 3
dropout_rate = 0.1
)
def test_cross_modal_attention(self, key, integration_module):
# Test dimensions
batch_size = 2
seq_length = 8
input_dim = 32
# Create multi-modal inputs
inputs = {
'visual': random.normal(key, (batch_size, seq_length, input_dim)),