-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_imports.py
More file actions
executable file
·50 lines (42 loc) · 1.48 KB
/
test_imports.py
File metadata and controls
executable file
·50 lines (42 loc) · 1.48 KB
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
#!/usr/bin/env python3
"""
Quick test to verify all imports work correctly
"""
import sys
import os
# Add repo root to path
repo_root = os.path.dirname(os.path.abspath(__file__))
sys.path.insert(0, repo_root)
print("Testing imports...")
try:
from core.neural_fields.perceiver import FourierFeatures
print("✓ core.neural_fields.perceiver imported")
except ImportError as e:
print(f"✗ Failed to import core.neural_fields.perceiver: {e}")
sys.exit(1)
try:
from core.sparse.cifar10_sparse import SparseCIFAR10Dataset
print("✓ core.sparse.cifar10_sparse imported")
except ImportError as e:
print(f"✗ Failed to import core.sparse.cifar10_sparse: {e}")
sys.exit(1)
try:
from core.sparse.metrics import MetricsTracker
print("✓ core.sparse.metrics imported")
except ImportError as e:
print(f"✗ Failed to import core.sparse.metrics: {e}")
sys.exit(1)
print("\n✓ All core module imports successful!")
print("\nNow testing training scripts...")
# Test V1 training script can be imported
sys.path.insert(0, os.path.join(repo_root, 'v1', 'training'))
try:
from train_mamba_standalone import SSMBlockFast, MambaBlock
print("✓ V1 train_mamba_standalone components imported")
except ImportError as e:
print(f"✗ Failed to import V1 components: {e}")
sys.exit(1)
print("\n✅ All imports working correctly!")
print("\nYou can now run:")
print(" cd v1/training && ./run_mamba_training.sh")
print(" cd v2/training && ./run_mamba_v2_training.sh")