diff --git a/__pycache__/test_init.cpython-310-pytest-8.3.4.pyc b/__pycache__/test_init.cpython-310-pytest-8.3.4.pyc index a98e303..04e1082 100644 Binary files a/__pycache__/test_init.cpython-310-pytest-8.3.4.pyc and b/__pycache__/test_init.cpython-310-pytest-8.3.4.pyc differ diff --git a/core/__pycache__/config.cpython-310.pyc b/core/__pycache__/config.cpython-310.pyc index 5b1a7ec..5277d2d 100644 Binary files a/core/__pycache__/config.cpython-310.pyc and b/core/__pycache__/config.cpython-310.pyc differ diff --git a/models/__pycache__/__init__.cpython-310.pyc b/models/__pycache__/__init__.cpython-310.pyc index d5d6593..142464e 100644 Binary files a/models/__pycache__/__init__.cpython-310.pyc and b/models/__pycache__/__init__.cpython-310.pyc differ diff --git a/models/__pycache__/abstract_reasoning.cpython-310.pyc b/models/__pycache__/abstract_reasoning.cpython-310.pyc index acead48..6c10123 100644 Binary files a/models/__pycache__/abstract_reasoning.cpython-310.pyc and b/models/__pycache__/abstract_reasoning.cpython-310.pyc differ diff --git a/models/__pycache__/attention.cpython-310.pyc b/models/__pycache__/attention.cpython-310.pyc index 541085a..fd4a4d6 100644 Binary files a/models/__pycache__/attention.cpython-310.pyc and b/models/__pycache__/attention.cpython-310.pyc differ diff --git a/models/__pycache__/base_model.cpython-310.pyc b/models/__pycache__/base_model.cpython-310.pyc index 6c9705c..2e6de73 100644 Binary files a/models/__pycache__/base_model.cpython-310.pyc and b/models/__pycache__/base_model.cpython-310.pyc differ diff --git a/models/__pycache__/consciousness.cpython-310.pyc b/models/__pycache__/consciousness.cpython-310.pyc index 0cec44a..31e9e80 100644 Binary files a/models/__pycache__/consciousness.cpython-310.pyc and b/models/__pycache__/consciousness.cpython-310.pyc differ diff --git a/models/__pycache__/consciousness_model.cpython-310.pyc b/models/__pycache__/consciousness_model.cpython-310.pyc index 672cb4c..fd9cc40 100644 Binary files a/models/__pycache__/consciousness_model.cpython-310.pyc and b/models/__pycache__/consciousness_model.cpython-310.pyc differ diff --git a/models/__pycache__/consciousness_state.cpython-310.pyc b/models/__pycache__/consciousness_state.cpython-310.pyc index 55ac955..48f071d 100644 Binary files a/models/__pycache__/consciousness_state.cpython-310.pyc and b/models/__pycache__/consciousness_state.cpython-310.pyc differ diff --git a/models/__pycache__/dynamic_attention.cpython-310.pyc b/models/__pycache__/dynamic_attention.cpython-310.pyc index 10f1c2f..856c50a 100644 Binary files a/models/__pycache__/dynamic_attention.cpython-310.pyc and b/models/__pycache__/dynamic_attention.cpython-310.pyc differ diff --git a/models/__pycache__/error_handling.cpython-310.pyc b/models/__pycache__/error_handling.cpython-310.pyc index 39795a7..f0b7391 100644 Binary files a/models/__pycache__/error_handling.cpython-310.pyc and b/models/__pycache__/error_handling.cpython-310.pyc differ diff --git a/models/__pycache__/ethical_safety.cpython-310.pyc b/models/__pycache__/ethical_safety.cpython-310.pyc index 6c73a5f..f0a4275 100644 Binary files a/models/__pycache__/ethical_safety.cpython-310.pyc and b/models/__pycache__/ethical_safety.cpython-310.pyc differ diff --git a/models/__pycache__/global_workspace.cpython-310.pyc b/models/__pycache__/global_workspace.cpython-310.pyc index 6134f93..eced144 100644 Binary files a/models/__pycache__/global_workspace.cpython-310.pyc and b/models/__pycache__/global_workspace.cpython-310.pyc differ diff --git a/models/__pycache__/information_integration.cpython-310.pyc b/models/__pycache__/information_integration.cpython-310.pyc index 4b70942..847ba5b 100644 Binary files a/models/__pycache__/information_integration.cpython-310.pyc and b/models/__pycache__/information_integration.cpython-310.pyc differ diff --git a/models/__pycache__/intentionality.cpython-310.pyc b/models/__pycache__/intentionality.cpython-310.pyc index 5eee1e1..6572d73 100644 Binary files a/models/__pycache__/intentionality.cpython-310.pyc and b/models/__pycache__/intentionality.cpython-310.pyc differ diff --git a/models/__pycache__/long_term_memory.cpython-310.pyc b/models/__pycache__/long_term_memory.cpython-310.pyc index 7abf7be..4eb1d9e 100644 Binary files a/models/__pycache__/long_term_memory.cpython-310.pyc and b/models/__pycache__/long_term_memory.cpython-310.pyc differ diff --git a/models/__pycache__/memory.cpython-310.pyc b/models/__pycache__/memory.cpython-310.pyc index 18b2d02..c8fe836 100644 Binary files a/models/__pycache__/memory.cpython-310.pyc and b/models/__pycache__/memory.cpython-310.pyc differ diff --git a/models/__pycache__/reasoning.cpython-310.pyc b/models/__pycache__/reasoning.cpython-310.pyc index aaf604f..b37b47b 100644 Binary files a/models/__pycache__/reasoning.cpython-310.pyc and b/models/__pycache__/reasoning.cpython-310.pyc differ diff --git a/models/__pycache__/self_awareness.cpython-310.pyc b/models/__pycache__/self_awareness.cpython-310.pyc index fd8e795..3165039 100644 Binary files a/models/__pycache__/self_awareness.cpython-310.pyc and b/models/__pycache__/self_awareness.cpython-310.pyc differ diff --git a/models/__pycache__/simulated_emotions.cpython-310.pyc b/models/__pycache__/simulated_emotions.cpython-310.pyc index 397ffde..a0abe10 100644 Binary files a/models/__pycache__/simulated_emotions.cpython-310.pyc and b/models/__pycache__/simulated_emotions.cpython-310.pyc differ diff --git a/models/__pycache__/working_memory.cpython-310.pyc b/models/__pycache__/working_memory.cpython-310.pyc index c46f311..6f689e8 100644 Binary files a/models/__pycache__/working_memory.cpython-310.pyc and b/models/__pycache__/working_memory.cpython-310.pyc differ diff --git a/models/global_workspace.py b/models/global_workspace.py index c4d52f4..1c42715 100644 --- a/models/global_workspace.py +++ b/models/global_workspace.py @@ -75,7 +75,11 @@ def forward(self, modalities: Union[Dict[str, torch.Tensor], None] = None, senso # Pad remaining slots with zeros if needed while len(integrated_features) < self.num_modalities: - zero_features = torch.zeros_like(integrated_features[0]) + zero_features = torch.zeros_like( + integrated_features[0], + dtype=integrated_features[0].dtype, + device=integrated_features[0].device + ) integrated_features.append(zero_features) # Stack and reshape for attention @@ -121,6 +125,7 @@ def forward(self, modalities: Union[Dict[str, torch.Tensor], None] = None, senso self.num_modalities - attention_weights.size(1), seq_len, attention_weights.size(3), + dtype=attention_weights.dtype, device=attention_weights.device ) attention_weights = torch.cat([attention_weights, padding], dim=1) @@ -132,6 +137,7 @@ def forward(self, modalities: Union[Dict[str, torch.Tensor], None] = None, senso attention_weights.size(1), 3 - attention_weights.size(2), attention_weights.size(3), + dtype=attention_weights.dtype, device=attention_weights.device ) attention_weights = torch.cat([attention_weights, padding], dim=2) diff --git a/tests/__pycache__/conftest.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/conftest.cpython-310-pytest-8.3.4.pyc index 63417a8..50d767b 100644 Binary files a/tests/__pycache__/conftest.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/conftest.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_consciousness.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_consciousness.cpython-310-pytest-8.3.4.pyc index 1294fc2..7ad02b0 100644 Binary files a/tests/__pycache__/test_consciousness.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_consciousness.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_consciousness_integration.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_consciousness_integration.cpython-310-pytest-8.3.4.pyc index 61e4427..62f9bb6 100644 Binary files a/tests/__pycache__/test_consciousness_integration.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_consciousness_integration.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_dynamic_attention.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_dynamic_attention.cpython-310-pytest-8.3.4.pyc index a9d7da5..f2293ab 100644 Binary files a/tests/__pycache__/test_dynamic_attention.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_dynamic_attention.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_environment.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_environment.cpython-310-pytest-8.3.4.pyc index 50c3dc7..a8d24c1 100644 Binary files a/tests/__pycache__/test_environment.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_environment.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_error_correction.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_error_correction.cpython-310-pytest-8.3.4.pyc index 6acd42b..09aff81 100644 Binary files a/tests/__pycache__/test_error_correction.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_error_correction.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_error_handling.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_error_handling.cpython-310-pytest-8.3.4.pyc index 9ccd665..f177244 100644 Binary files a/tests/__pycache__/test_error_handling.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_error_handling.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_ethical_safety.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_ethical_safety.cpython-310-pytest-8.3.4.pyc index bf9301b..9a3504b 100644 Binary files a/tests/__pycache__/test_ethical_safety.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_ethical_safety.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_intentionality.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_intentionality.cpython-310-pytest-8.3.4.pyc index b2c2e83..1cfc63c 100644 Binary files a/tests/__pycache__/test_intentionality.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_intentionality.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_lint.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_lint.cpython-310-pytest-8.3.4.pyc index c0de964..c3dd33b 100644 Binary files a/tests/__pycache__/test_lint.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_lint.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_long_term_memory.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_long_term_memory.cpython-310-pytest-8.3.4.pyc index f7e1a49..24fe08e 100644 Binary files a/tests/__pycache__/test_long_term_memory.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_long_term_memory.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_reasoning.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_reasoning.cpython-310-pytest-8.3.4.pyc index c2e8386..80bcde2 100644 Binary files a/tests/__pycache__/test_reasoning.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_reasoning.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/__pycache__/test_self_awareness.cpython-310-pytest-8.3.4.pyc b/tests/__pycache__/test_self_awareness.cpython-310-pytest-8.3.4.pyc index 5e44f9d..d84e57d 100644 Binary files a/tests/__pycache__/test_self_awareness.cpython-310-pytest-8.3.4.pyc and b/tests/__pycache__/test_self_awareness.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/benchmarks/__pycache__/test_arc_reasoning.cpython-310-pytest-8.3.4.pyc b/tests/benchmarks/__pycache__/test_arc_reasoning.cpython-310-pytest-8.3.4.pyc index eaabb81..c19d83b 100644 Binary files a/tests/benchmarks/__pycache__/test_arc_reasoning.cpython-310-pytest-8.3.4.pyc and b/tests/benchmarks/__pycache__/test_arc_reasoning.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/benchmarks/__pycache__/test_bigbench_reasoning.cpython-310-pytest-8.3.4.pyc b/tests/benchmarks/__pycache__/test_bigbench_reasoning.cpython-310-pytest-8.3.4.pyc index 2c8995b..e033568 100644 Binary files a/tests/benchmarks/__pycache__/test_bigbench_reasoning.cpython-310-pytest-8.3.4.pyc and b/tests/benchmarks/__pycache__/test_bigbench_reasoning.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/conftest.py b/tests/conftest.py index 04fd402..d5de0f5 100644 --- a/tests/conftest.py +++ b/tests/conftest.py @@ -44,3 +44,13 @@ def jit_compile(): def decorator(func): return torch.jit.script(func) return decorator + +@pytest.fixture(autouse=True) +def setup_torch_defaults(): + # Use recommended alternatives to set_default_tensor_type + torch.set_default_dtype(torch.float32) + # Only set default device if CUDA is available + if torch.cuda.is_available(): + torch.set_default_device('cuda') + else: + torch.set_default_device('cpu') diff --git a/tests/unit/__pycache__/__init__.cpython-310.pyc b/tests/unit/__pycache__/__init__.cpython-310.pyc index 38b564a..e4479cf 100644 Binary files a/tests/unit/__pycache__/__init__.cpython-310.pyc and b/tests/unit/__pycache__/__init__.cpython-310.pyc differ diff --git a/tests/unit/__pycache__/test_base.cpython-310-pytest-8.3.4.pyc b/tests/unit/__pycache__/test_base.cpython-310-pytest-8.3.4.pyc index df60d1f..faa1530 100644 Binary files a/tests/unit/__pycache__/test_base.cpython-310-pytest-8.3.4.pyc and b/tests/unit/__pycache__/test_base.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/__pycache__/test_cognition_progress.cpython-310-pytest-8.3.4.pyc b/tests/unit/__pycache__/test_cognition_progress.cpython-310-pytest-8.3.4.pyc index 1a1c8c6..07af9d9 100644 Binary files a/tests/unit/__pycache__/test_cognition_progress.cpython-310-pytest-8.3.4.pyc and b/tests/unit/__pycache__/test_cognition_progress.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/__pycache__/test_consciousness.cpython-310-pytest-8.3.4.pyc b/tests/unit/__pycache__/test_consciousness.cpython-310-pytest-8.3.4.pyc index 7f58cf8..db76b31 100644 Binary files a/tests/unit/__pycache__/test_consciousness.cpython-310-pytest-8.3.4.pyc and b/tests/unit/__pycache__/test_consciousness.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/__pycache__/test_global_workspace.cpython-310-pytest-8.3.4.pyc b/tests/unit/__pycache__/test_global_workspace.cpython-310-pytest-8.3.4.pyc index e975f2f..5e9b0c2 100644 Binary files a/tests/unit/__pycache__/test_global_workspace.cpython-310-pytest-8.3.4.pyc and b/tests/unit/__pycache__/test_global_workspace.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/__pycache__/test_simulated_emotions.cpython-310-pytest-8.3.4.pyc b/tests/unit/__pycache__/test_simulated_emotions.cpython-310-pytest-8.3.4.pyc index 494ebc6..3532ad6 100644 Binary files a/tests/unit/__pycache__/test_simulated_emotions.cpython-310-pytest-8.3.4.pyc and b/tests/unit/__pycache__/test_simulated_emotions.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/attention/__pycache__/test_attention.cpython-310-pytest-8.3.4.pyc b/tests/unit/attention/__pycache__/test_attention.cpython-310-pytest-8.3.4.pyc index 8505d13..ca9daa5 100644 Binary files a/tests/unit/attention/__pycache__/test_attention.cpython-310-pytest-8.3.4.pyc and b/tests/unit/attention/__pycache__/test_attention.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/attention/__pycache__/test_attention_mechanisms.cpython-310-pytest-8.3.4.pyc b/tests/unit/attention/__pycache__/test_attention_mechanisms.cpython-310-pytest-8.3.4.pyc index a220ebf..dc4cfa6 100644 Binary files a/tests/unit/attention/__pycache__/test_attention_mechanisms.cpython-310-pytest-8.3.4.pyc and b/tests/unit/attention/__pycache__/test_attention_mechanisms.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/integration/__pycache__/test_cognitive_integration.cpython-310-pytest-8.3.4.pyc b/tests/unit/integration/__pycache__/test_cognitive_integration.cpython-310-pytest-8.3.4.pyc index 03279e6..9fcd538 100644 Binary files a/tests/unit/integration/__pycache__/test_cognitive_integration.cpython-310-pytest-8.3.4.pyc and b/tests/unit/integration/__pycache__/test_cognitive_integration.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/integration/__pycache__/test_state_management.cpython-310-pytest-8.3.4.pyc b/tests/unit/integration/__pycache__/test_state_management.cpython-310-pytest-8.3.4.pyc index a995879..c938a83 100644 Binary files a/tests/unit/integration/__pycache__/test_state_management.cpython-310-pytest-8.3.4.pyc and b/tests/unit/integration/__pycache__/test_state_management.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/memory/__pycache__/test_integration.cpython-310-pytest-8.3.4.pyc b/tests/unit/memory/__pycache__/test_integration.cpython-310-pytest-8.3.4.pyc index 500c8fa..fbecb39 100644 Binary files a/tests/unit/memory/__pycache__/test_integration.cpython-310-pytest-8.3.4.pyc and b/tests/unit/memory/__pycache__/test_integration.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/memory/__pycache__/test_memory.cpython-310-pytest-8.3.4.pyc b/tests/unit/memory/__pycache__/test_memory.cpython-310-pytest-8.3.4.pyc index 74d595a..e903b91 100644 Binary files a/tests/unit/memory/__pycache__/test_memory.cpython-310-pytest-8.3.4.pyc and b/tests/unit/memory/__pycache__/test_memory.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/memory/__pycache__/test_memory_components.cpython-310-pytest-8.3.4.pyc b/tests/unit/memory/__pycache__/test_memory_components.cpython-310-pytest-8.3.4.pyc index 5574d22..384b6ee 100644 Binary files a/tests/unit/memory/__pycache__/test_memory_components.cpython-310-pytest-8.3.4.pyc and b/tests/unit/memory/__pycache__/test_memory_components.cpython-310-pytest-8.3.4.pyc differ diff --git a/tests/unit/state/__pycache__/test_consciousness_state_management.cpython-310-pytest-8.3.4.pyc b/tests/unit/state/__pycache__/test_consciousness_state_management.cpython-310-pytest-8.3.4.pyc index dd74179..999f13d 100644 Binary files a/tests/unit/state/__pycache__/test_consciousness_state_management.cpython-310-pytest-8.3.4.pyc and b/tests/unit/state/__pycache__/test_consciousness_state_management.cpython-310-pytest-8.3.4.pyc differ