File size: 1,193 Bytes
8174855
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env python3
"""Run a minimal training to validate everything works."""

import sys
sys.path.append('.')

from supernova.train import train

def run_minimal_training():
    """Run minimal training for validation."""
    print("๐Ÿš€ Starting minimal training run...")
    
    try:
        train(
            config_path="./configs/supernova_25m.json",
            data_config_path="./configs/data_sources.yaml",
            seq_len=256,
            batch_size=1,
            grad_accum=1,
            lr=3e-4,
            warmup_steps=2,
            max_steps=10,
            save_every=5,
            out_dir="./test_checkpoints",
            seed=42
        )
        print("โœ… Minimal training completed successfully!")
        return True
        
    except Exception as e:
        print(f"โŒ Training failed: {e}")
        import traceback
        traceback.print_exc()
        return False

if __name__ == "__main__":
    success = run_minimal_training()
    if success:
        print("๐ŸŽ‰ Training pipeline validated successfully!")
    else:
        print("๐Ÿ’ฅ Training pipeline validation FAILED!")
    exit(0 if success else 1)