-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest_setup.py
More file actions
64 lines (54 loc) · 1.66 KB
/
Copy pathtest_setup.py
File metadata and controls
64 lines (54 loc) · 1.66 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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
#!/usr/bin/env python3
"""
Quick Test Script for QUENCH++
Verifies environment setup and dependencies.
"""
import sys
import importlib
def check_import(module_name, package_name=None):
"""Check if a module can be imported."""
try:
importlib.import_module(module_name)
print(f"✓ {package_name or module_name}")
return True
except ImportError:
print(f"✗ {package_name or module_name} - NOT INSTALLED")
return False
def main():
print("="*60)
print("QUENCH++ Environment Test")
print("="*60)
required = [
('numpy', 'numpy'),
('pandas', 'pandas'),
('scipy', 'scipy'),
('matplotlib', 'matplotlib'),
('seaborn', 'seaborn'),
('torch', 'pytorch'),
('transformers', 'transformers'),
('yaml', 'pyyaml'),
('tqdm', 'tqdm'),
]
optional = [
('openai', 'openai'),
('jupyter', 'jupyter'),
]
print("\nRequired Dependencies:")
required_ok = all(check_import(m, p) for m, p in required)
print("\nOptional Dependencies:")
for m, p in optional:
check_import(m, p)
print("\n" + "="*60)
if required_ok:
print("✅ Environment setup complete!")
print("\nNext steps:")
print("1. Configure API keys in config/config.yaml")
print("2. Place QUENCH dataset in data/original/quench.json")
print("3. Start with notebooks/eng-hin.ipynb")
else:
print("❌ Missing required dependencies")
print("\nRun: pip install -r requirements.txt")
print("="*60)
return 0 if required_ok else 1
if __name__ == "__main__":
sys.exit(main())