| #!/usr/bin/env bash |
| |
| |
|
|
| set -euo pipefail |
| cd "$(dirname "$0")/.." |
|
|
| echo "=== Quick MMDF Test Script ===" |
| echo "This script will automatically handle disk quota issues" |
| echo "" |
|
|
| |
| 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 "" |
|
|
| |
| 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 |
|
|
| |
| 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 |
|
|
| |
| 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" |