File size: 1,067 Bytes
463f868
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
import os
import sys
import time

# Disable Numba JIT before importing anything that might use it
os.environ["NUMBA_DISABLE_JIT"] = "1"
print("DEBUG: Setting NUMBA_DISABLE_JIT = 1")

sys.path.insert(0, os.getcwd())


def test_import(name):
    print(f"DEBUG: Importing {name}...")
    start = time.time()
    try:
        __import__(name)
        print(f"DEBUG: {name} imported in {time.time() - start:.2f}s")
    except Exception as e:
        print(f"DEBUG: {name} failed: {e}")


test_import("numpy")
test_import("numba")
test_import("engine.game.numba_utils")
test_import("engine.game.game_state")

print("DEBUG: Calling initialize_game(use_real_data=True)...")
from engine.game.game_state import initialize_game

start_time = time.time()
try:
    state = initialize_game(use_real_data=True)
    duration = time.time() - start_time
    print(f"DEBUG: initialize_game finished in {duration:.2f} seconds.")
except Exception as e:
    print(f"DEBUG: initialize_game failed: {e}")

print("DEBUG: All diagnostic steps finished.")