File size: 3,291 Bytes
7c2871f
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash
# Disk space fix script for fairtalking-second-work
# Provides multiple solutions for disk quota exceeded error

set -euo pipefail

echo "=== Disk Space Fix Script ==="
echo "Current disk usage on /apdcephfs_gy4/share_303628665: 100%"
echo "Available space on /apdcephfs_gy8/share_303628665: 7.7T"
echo ""

# Solution 1: Create symbolic link to gy8 (recommended)
echo "Solution 1: Create symbolic link to available space"
echo "---------------------------------------------------"
if [ ! -d "/apdcephfs_gy8/share_303628665/joywu/research/fairtalking-second-work" ]; then
    echo "Creating directory on gy8..."
    mkdir -p /apdcephfs_gy8/share_303628665/joywu/research/fairtalking-second-work
fi

# Check if symbolic link already exists
if [ ! -L "/apdcephfs_gy4/share_303628665/joywu/research/fairtalking-second-work/outputs" ]; then
    echo "Creating symbolic link for outputs directory..."
    # Move existing outputs to gy8 if they exist
    if [ -d "/apdcephfs_gy4/share_303628665/joywu/research/fairtalking-second-work/outputs" ]; then
        mv /apdcephfs_gy4/share_303628665/joywu/research/fairtalking-second-work/outputs /apdcephfs_gy8/share_303628665/joywu/research/fairtalking-second-work/
    fi
    # Create symbolic link
    ln -sf /apdcephfs_gy8/share_303628665/joywu/research/fairtalking-second-work/outputs /apdcephfs_gy4/share_303628665/joywu/research/fairtalking-second-work/outputs
    echo "✓ Outputs directory linked to gy8"
else
    echo "✓ Outputs symbolic link already exists"
fi

# Solution 2: Clean up temporary files
echo ""
echo "Solution 2: Clean up temporary files"
echo "-----------------------------------"

# Clean Hydra outputs (takes a lot of space)
if [ -d "outputs" ]; then
    echo "Cleaning old Hydra outputs..."
    find outputs -name "*.yaml" -type f -delete 2>/dev/null || true
    find outputs -name "hydra" -type d -exec rm -rf {} + 2>/dev/null || true
    echo "✓ Temporary files cleaned"
fi

# Clean Python cache
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: Alternative test location
echo ""
echo "Solution 3: Run test in alternative location"
echo "-------------------------------------------"
echo "You can also run the test directly from gy8:"
echo "cd /apdcephfs_gy8/share_303628665/joywu/research/fairtalking-second-work"
echo "bash scripts/test_cta_mmdf.sh"

# Solution 4: Quick test with minimal output
echo ""
echo "Solution 4: Quick test with minimal Hydra output"
echo "-----------------------------------------------"
echo "Run test with environment variable to disable Hydra config saving:"
echo "HYDRA_FULL_ERROR=1 python3 src/train.py \\"
echo "    method=cta \\"
echo "    data=fairtalking_mmdf \\"
echo "    trainer=ddp \\"
echo "    backbone=timesformer \\"
echo "    +test_only=true \\"
echo "    +test_ckpt=outputs/cta/checkpoints/last.ckpt \\"
echo "    hydra.output_subdir=null \\"
echo "    hydra/job_logging=disabled"

echo ""
echo "=== Summary ==="
echo "✓ Symbolic link created for outputs directory"
echo "✓ Temporary files cleaned"
echo "✓ Multiple solutions provided"
echo ""
echo "Now you can run: bash scripts/test_cta_mmdf.sh"