File size: 2,800 Bytes
07001d0
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash
# Test script to verify batch_test_all.sh functionality

set -euo pipefail
cd "$(dirname "$0")/.."

echo "=== Testing batch_test_all.sh configuration ==="
echo ""

# Test 1: Check if all required test scripts exist
echo "1. Checking test scripts exist:"
for method in "cta" "psm" "radr"; do
    # Check ours script
    if [ -f "scripts/test_${method}.sh" ]; then
        echo "   ✓ scripts/test_${method}.sh (ours)"
    else
        echo "   ✗ scripts/test_${method}.sh (ours) - NOT FOUND"
    fi
    
    # Check thb script
    if [ -f "scripts/test_${method}_thb.sh" ]; then
        echo "   ✓ scripts/test_${method}_thb.sh (thb)"
    else
        echo "   ✗ scripts/test_${method}_thb.sh (thb) - NOT FOUND"
    fi
done

# Check ff++ and hdtf scripts
if [ -f "scripts/test_ffpp.sh" ]; then
    echo "   ✓ scripts/test_ffpp.sh (ff++)"
else
    echo "   ✗ scripts/test_ffpp.sh (ff++) - NOT FOUND"
fi

if [ -f "scripts/test_hdtf_paired.sh" ]; then
    echo "   ✓ scripts/test_hdtf_paired.sh (hdtf)"
else
    echo "   ✗ scripts/test_hdtf_paired.sh (hdtf) - NOT FOUND"
fi

echo ""

# Test 2: Check if output directories exist
echo "2. Checking output directories:"
for method in "cta" "psm" "radr"; do
    if [ -d "outputs/$method/checkpoints" ]; then
        checkpoint_count=$(find "outputs/$method/checkpoints" -name "*.ckpt" -not -name "last.ckpt" | wc -l)
        echo "   ✓ outputs/$method/checkpoints ($checkpoint_count checkpoints)"
    else
        echo "   ✗ outputs/$method/checkpoints - NOT FOUND"
    fi
done

echo ""

# Test 3: Check if batch_test_all.sh is executable
echo "3. Checking batch_test_all.sh:"
if [ -f "scripts/batch_test_all.sh" ]; then
    echo "   ✓ scripts/batch_test_all.sh exists"
    
    # Make it executable
    chmod +x "scripts/batch_test_all.sh"
    echo "   ✓ Made scripts/batch_test_all.sh executable"
    
    # Test syntax
    if bash -n "scripts/batch_test_all.sh"; then
        echo "   ✓ Syntax check passed"
    else
        echo "   ✗ Syntax check failed"
    fi
else
    echo "   ✗ scripts/batch_test_all.sh - NOT FOUND"
fi

echo ""

# Test 4: Show what the batch script would do
echo "4. Batch script execution plan:"
echo "   Methods to test: cta, psm, radr"
echo "   Datasets to test: ours, thb, ff++, hdtf"
echo "   Checkpoints per method: top-3 + last"
echo "   Total test combinations: 3 methods × 4 datasets × 4 checkpoints = 48 tests"
echo ""

# Test 5: Show sample command for one test
echo "5. Sample test command:"
echo "   bash scripts/test_psm.sh outputs/psm/checkpoints/last.ckpt"
echo ""

echo "=== Test completed ==="
echo ""
echo "To run the full batch test:"
echo "  bash scripts/batch_test_all.sh"
echo ""
echo "This will create a CSV file with all results in the current directory."