File size: 1,277 Bytes
6351b36
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
#!/usr/bin/env bash
# VIPBench end-to-end reproduction.
#
# Default: skip extraction (use the embeddings shipped in data/embeddings/) and
# execute the analysis notebook end-to-end. ~10 minutes on a single laptop.
#
# To re-extract embeddings from raw audio (~24 CPU-hours plus ~1 GPU-hour for
# Whisper), pass `--extract` as the first argument.
#
# Usage:
#   bash reproduce.sh              # analysis only, uses shipped embeddings
#   bash reproduce.sh --extract    # re-extract everything from audio first
#   VIPBENCH_ROOT=/path/to/release bash reproduce.sh   # explicit root override
set -euo pipefail

cd "$(dirname "$0")"
export VIPBENCH_ROOT="${VIPBENCH_ROOT:-$(pwd)/..}"
echo "VIPBENCH_ROOT=${VIPBENCH_ROOT}"

if [[ "${1:-}" == "--extract" ]]; then
  echo "[1/2] Re-extracting embeddings (this will take many hours)..."
  bash run_all_extractions.sh
else
  echo "[1/2] Skipping extraction. Using embeddings in data/embeddings/."
  echo "      Pass --extract to re-extract from audio."
fi

echo "[2/2] Executing analysis notebook..."
jupyter nbconvert --to notebook --execute benchmark_analysis.ipynb \
  --output benchmark_analysis_executed.ipynb \
  --ExecutePreprocessor.timeout=1800

echo "Done. See code/benchmark_analysis_executed.ipynb for the rendered output."