| # 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" \ | |
| "$@" |