File size: 2,167 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
#!/usr/bin/env bash
# Quick test script for MMDF dataset with disk space optimization
# Automatically handles disk quota issues

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

echo "=== Quick MMDF Test Script ==="
echo "This script will automatically handle disk quota issues"
echo ""

# Check disk space
echo "Checking disk space..."
df -h /apdcephfs_gy4/share_303628665 | grep apdcephfs

echo ""
echo "Available solutions:"
echo "1. Use gy8 location (recommended)"
echo "2. Clean temporary files"
echo "3. Disable Hydra output"
echo ""

# Solution 1: Use gy8 location (primary solution)
echo "=== Solution 1: Using gy8 location ==="
if [ -f "scripts/test_cta_mmdf_gy8.sh" ]; then
    echo "Running test from gy8 location..."
    bash scripts/test_cta_mmdf_gy8.sh
    exit 0
else
    echo "Gy8 script not found, trying alternative solutions..."
fi

# Solution 2: Clean temporary files
echo ""
echo "=== Solution 2: Cleaning temporary files ==="
if [ -d "outputs" ]; then
    echo "Cleaning Hydra outputs..."
    find outputs -name "hydra" -type d -exec rm -rf {} + 2>/dev/null || true
    echo "✓ Hydra outputs cleaned"
fi

if [ -d "__pycache__" ]; then
    echo "Cleaning Python cache..."
    find . -name "__pycache__" -type d -exec rm -rf {} + 2>/dev/null || true
    echo "✓ Python cache cleaned"
fi

# Solution 3: Run with minimal Hydra output
echo ""
echo "=== Solution 3: Running with minimal output ==="
CKPT="${1:-outputs/cta/checkpoints/last.ckpt}"
shift || true

if [ ! -f "$CKPT" ]; then
    echo "Checkpoint not found: $CKPT"
    echo "Please provide a valid checkpoint path"
    exit 1
fi

echo "Running test with minimal Hydra output..."
HYDRA_FULL_ERROR=1 python3 src/train.py \
    method=cta \
    data=fairtalking_mmdf \
    trainer=ddp \
    backbone=timesformer \
    +test_only=true \
    +test_ckpt="$CKPT" \
    hydra.output_subdir=null \
    hydra/job_logging=disabled \
    "$@"

echo ""
echo "=== Test completed ==="
echo "If you encounter disk quota issues again, consider:"
echo "1. Running from gy8: bash scripts/test_cta_mmdf_gy8.sh"
echo "2. Using the fix script: bash scripts/fix_disk_space.sh"
echo "3. Moving large datasets to gy8"