File size: 1,253 Bytes
bc200fc
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
"""Test paired dataset loading on remote machine."""
import json
from pathlib import Path

DATA_DIR = Path('/home/amd/yueyuan/Finance/fin-mm/data/paired_dataset')

print("=" * 50)
print("Testing Paired Dataset")
print("=" * 50)

# Load manifest
manifest_path = DATA_DIR / 'manifest_pred20.json'
with open(manifest_path, 'r', encoding='utf-8') as f:
    manifest = json.load(f)

print(f"\nManifest loaded: {manifest_path}")
print(f"Train samples: {len(manifest['splits']['train'])}")
print(f"Val samples: {len(manifest['splits']['val'])}")
print(f"Test samples: {len(manifest['splits']['test'])}")

# Check first sample
sample = manifest['splits']['train'][0]
print(f"\nFirst train sample: {sample['sample_id']}")
print(f"  Input: {sample['input_start']} -> {sample['input_end']} ({sample['input_days']} days)")
print(f"  Target: {sample['target_start']} -> {sample['target_end']} ({sample['target_days']} days)")

# Verify files exist
csv_path = DATA_DIR / sample['csv_path']
png_path = DATA_DIR / sample['png_path']
print(f"  CSV exists: {csv_path.exists()} ({csv_path})")
print(f"  PNG exists: {png_path.exists()} ({png_path})")

print("\n" + "=" * 50)
print("[SUCCESS] Dataset ready for training!")
print("=" * 50)