| # 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." | |