-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathverify_setup.py
More file actions
103 lines (87 loc) · 3.31 KB
/
verify_setup.py
File metadata and controls
103 lines (87 loc) · 3.31 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
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
#!/usr/bin/env python3
# verify_setup.py
# Verify that Bootstrap Basil is set up correctly.
import os
import sys
def check_directory(path, name):
if os.path.isdir(path):
print(f"✓ {name}: {path}")
return True
else:
print(f"✗ {name} missing: {path}")
return False
def check_file(path, name):
if os.path.isfile(path):
print(f"✓ {name}: {path}")
return True
else:
print(f"✗ {name} missing: {path}")
return False
def main():
from config import (
BASE_DIR, MODELS_DIR, LOG_DIR, PROMPTS_DIR, MEMORY_DIR,
SESSION_SUMMARIES_DIR, CLASSROOM_DIR,
PROMPT_TASK_AGENT, PROMPT_GRADER, PROMPT_SUBJECT_GENERATOR,
METRICS_FILE, ROTATION_STATE_FILE,
BASIL_ASSESSMENT_FILE,
)
print("="*60)
print("Bootstrap Basil Setup Verification")
print("="*60)
all_ok = True
print("\n📁 Directories:")
all_ok &= check_directory(BASE_DIR, "Base directory")
all_ok &= check_directory(MODELS_DIR, "Models directory")
all_ok &= check_directory(LOG_DIR, "Logs directory")
all_ok &= check_directory(PROMPTS_DIR, "Prompts directory")
all_ok &= check_directory(MEMORY_DIR, "Memory directory")
all_ok &= check_directory(SESSION_SUMMARIES_DIR, "Session summaries")
all_ok &= check_directory(CLASSROOM_DIR, "Classroom directory")
print("\n📄 Prompt Templates:")
all_ok &= check_file(PROMPT_TASK_AGENT, "Task agent prompt")
all_ok &= check_file(PROMPT_GRADER, "Grader prompt")
all_ok &= check_file(PROMPT_SUBJECT_GENERATOR, "Subject generator prompt")
print("\n📝 Memory Files:")
all_ok &= check_file(METRICS_FILE, "Metrics file")
all_ok &= check_file(ROTATION_STATE_FILE, "Rotation state")
all_ok &= check_file(BASIL_ASSESSMENT_FILE, "Basil assessment")
print("\n📚 Curriculum (Dynamic Generation):")
print(" ℹ Subjects are now dynamically generated per session")
print(" ℹ No static subject file required")
print("\n🧠 Basil Model:")
try:
from config import get_latest_basil_model_path
model_path = get_latest_basil_model_path()
print(f"✓ Basil model found: {model_path}")
except RuntimeError as e:
print(f"✗ No Basil model found")
print(f" Run: python create_basil_v0001.py")
all_ok = False
print("\n🔑 API Key:")
if os.getenv("OPENAI_API_KEY"):
key = os.getenv("OPENAI_API_KEY")
print(f"✓ OPENAI_API_KEY set ({key[:8]}...)")
else:
print("✗ OPENAI_API_KEY not set")
print(" Export your OpenAI API key: export OPENAI_API_KEY=sk-...")
all_ok = False
print("\n📦 Python Dependencies:")
deps = ["torch", "transformers", "openai"]
for dep in deps:
try:
__import__(dep)
print(f"✓ {dep}")
except ImportError:
print(f"✗ {dep} not installed")
all_ok = False
print("\n" + "="*60)
if all_ok:
print("✅ All checks passed! Ready to run:")
print(" python auto_session.py --turns 5")
print(" python orchestrator.py status")
else:
print("❌ Some checks failed. Fix issues above before running.")
print("="*60)
return 0 if all_ok else 1
if __name__ == "__main__":
sys.exit(main())