File size: 1,266 Bytes
790883f | 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 | #!/bin/bash
#SBATCH --account=healthcareeng_computervision
#SBATCH --partition=backfill_singlenode
#SBATCH --nodes=1
#SBATCH --gpus-per-node=8
#SBATCH --exclusive
#SBATCH --time=24:00:00
#SBATCH --job-name=viper_eval
#SBATCH --output=logs/eval_run_%j.log
#
# Validation inference + evaluation, split out of full_run.sbatch.
#
# 74 held-out pairs x 2 variants (VIPER vs zeroed physics tokens) = 148 videos
# at 50 sampling steps / 81 frames / 480p, over 4 ranks of 2 GPUs. Set
# INFER_LIMIT to generate only the first N pairs if the queue is tight.
set -e
cd "$SLURM_SUBMIT_DIR"
source env.sh
export PYTORCH_CUDA_ALLOC_CONF=expandable_segments:True
export PYTHONUNBUFFERED=1
CKPT=${CKPT:-checkpoints/stage3/final.pt}
echo "=== validation inference (VIPER vs no-physics) from $CKPT ==="
srun --ntasks=4 scripts/run_infer.sh "$CKPT"
cat results/manifest.jsonl.* > results/manifest.jsonl
echo "=== evaluating generated videos ==="
.venv/bin/python -m viper.eval --manifest results/manifest.jsonl \
--out results/eval_viper.json
echo "=== paired conditioning ablation (reference vs zeroed physics tokens) ==="
for STAGE in 1 2 3; do
.venv/bin/python -m viper.eval_loss --ckpt checkpoints/stage$STAGE/final.pt \
--out results/eval_loss_stage$STAGE.json
done
|