File size: 2,529 Bytes
f50dc54
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env python3
"""
TTRLVR + AZR ์‹œ์Šคํ…œ ๋น ๋ฅธ ํ…Œ์ŠคํŠธ

timeout ๋ฌธ์ œ๋ฅผ ํ”ผํ•˜๊ธฐ ์œ„ํ•œ ์ตœ์†Œํ•œ์˜ ํ…Œ์ŠคํŠธ
"""

import os
import sys

# ํ™˜๊ฒฝ ์„ค์ •
os.environ['CUDA_VISIBLE_DEVICES'] = '4'
sys.path.append('/home/ubuntu/RLVR/TestTime-RLVR-v2')

def main():
    print("๐Ÿš€ TTRLVR + AZR Quick Test")
    print("=" * 50)
    
    try:
        # 1. Import ํ…Œ์ŠคํŠธ
        print("1๏ธโƒฃ Testing imports...")
        from absolute_zero_reasoner.testtime.config import TestTimeConfig, BenchmarkConfig
        from absolute_zero_reasoner.testtime.logger import TestTimeLogger
        from utils.iterative_trainer import IterativeTrainer
        print("โœ… All imports successful")
        
        # 2. ๊ธฐ๋ณธ ๊ฐ์ฒด ์ƒ์„ฑ
        print("\n2๏ธโƒฃ Creating basic objects...")
        config = TestTimeConfig()
        config.model_name = "Qwen/Qwen2.5-7B"
        config.debug = True
        
        benchmark_config = BenchmarkConfig(
            name='mbpp',
            data_path='/test/path',  # ๋”๋ฏธ ๊ฒฝ๋กœ
            problem_prefix='Mbpp_',
            start_index=1,
            max_problems=1
        )
        
        logger = TestTimeLogger()
        print("โœ… Basic objects created")
        
        # 3. IterativeTrainer ์ƒ์„ฑ
        print("\n3๏ธโƒฃ Creating IterativeTrainer...")
        trainer = IterativeTrainer(config, logger)
        print("โœ… IterativeTrainer created successfully")
        
        # 4. ์„ค์ • ํ™•์ธ
        print(f"\n4๏ธโƒฃ Configuration check:")
        print(f"   - Model: {trainer.current_model_path}")
        print(f"   - Checkpoint dir: {trainer.checkpoint_dir}")
        print(f"   - Config debug: {config.debug}")
        
        # 5. ํŒŒ์ผ ์กด์žฌ ํ™•์ธ
        print(f"\n5๏ธโƒฃ File existence check:")
        required_files = [
            '/home/ubuntu/RLVR/TestTime-RLVR-v2/test/configs/ttrlvr_azr_7b_single_gpu.sh',
            '/data/RLVR/checkpoints'
        ]
        
        for file_path in required_files:
            exists = os.path.exists(file_path)
            status = "โœ…" if exists else "โŒ"
            print(f"   {status} {file_path}")
        
        print(f"\n๐ŸŽ‰ Quick test completed successfully!")
        print(f"System appears ready for full integration test.")
        
        return 0
        
    except Exception as e:
        print(f"\nโŒ Quick test failed: {e}")
        import traceback
        traceback.print_exc()
        return 1

if __name__ == '__main__':
    exit_code = main()
    sys.exit(exit_code)