-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun_fixed_experiments.py
More file actions
executable file
·64 lines (54 loc) · 2.26 KB
/
run_fixed_experiments.py
File metadata and controls
executable file
·64 lines (54 loc) · 2.26 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 launcher for Fixed Second Round Hyperparameter Experiments
This version fixes the loss calculation issues and uses a simpler model architecture.
"""
import subprocess
import sys
import os
def main():
"""Run the fixed experiments"""
print("🚀 Starting Fixed Second Round Experiments")
print("=" * 50)
# Check if the fixed script exists
script_path = "pipeline/second_round_experiments_fixed.py"
if not os.path.exists(script_path):
print(f"❌ Fixed experiment script not found: {script_path}")
return
# Check if virtual environment is activated
if not hasattr(sys, 'real_prefix') and not (hasattr(sys, 'base_prefix') and sys.base_prefix != sys.prefix):
print("⚠️ Virtual environment not detected")
print("Please activate your virtual environment first:")
print(" source venv/bin/activate")
return
print("✅ Virtual environment detected")
print("✅ Fixed script found")
print()
print("🔧 What was fixed:")
print(" • Simplified model architecture (removed complex hidden layers)")
print(" • Fixed loss calculation issues")
print(" • Added proper logging for all epochs")
print(" • Used proven architecture from first round")
print()
# Confirm before running
response = input("🚀 Ready to start fixed experiments? (y/N): ")
if response.lower() != 'y':
print("❌ Aborted by user")
return
print("🚀 Starting experiments...")
print(" Press Ctrl+C to pause (experiments will resume from checkpoint)")
print()
try:
# Run the fixed experiment script
result = subprocess.run([sys.executable, script_path], check=True)
if result.returncode == 0:
print("🎉 Fixed experiments completed successfully!")
else:
print(f"❌ Fixed experiments failed with error code: {result.returncode}")
except KeyboardInterrupt:
print("\n⏸️ Experiments paused by user")
print(" Progress saved to checkpoint. Run again to resume.")
except subprocess.CalledProcessError as e:
print(f"❌ Fixed experiments failed with error code: {e.returncode}")
if __name__ == "__main__":
main()