File size: 736 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
#!/usr/bin/env bash
# Run final test on PSM using an existing checkpoint (no training).
# Usage:
#   bash scripts/test_psm.sh                          # uses outputs/psm/checkpoints/last.ckpt
#   bash scripts/test_psm.sh /path/to/other.ckpt     # explicit checkpoint
set -euo pipefail
cd "$(dirname "$0")/.."

# load .env if present
[ -f .env ] && set -a && . ./.env && set +a

CKPT="${1:-outputs/psm/checkpoints/last.ckpt}"
shift || true

if [ ! -f "$CKPT" ]; then
    echo "[test_psm] checkpoint not found: $CKPT"
    exit 1
fi
echo "[test_psm] using checkpoint: $CKPT"

python3 src/train.py \
    method=psm \
    data=fairtalking \
    trainer=ddp \
    backbone=timesformer \
    +test_only=true \
    +test_ckpt="$CKPT" \
    "$@"