add turn-bench-submission/run.sh
Browse files123456789101112131415161718192021222324252627282930313233343536#!/bin/bash
set -e
export HF_HOME="/mnt/matylda4/udupa/hugging-face"export HF_HUB_OFFLINE=1export TRANSFORMERS_OFFLINE=1export HF_DATASETS_OFFLINE=1export WANDB_MODE=offline
GPU=$(/mnt/matylda4/udupa/exps/endpointing/smart-endpointing/sge_utils/free-gpus.sh 1 2>/dev/null) || trueif [[ "$GPU" =~ ^[0-9,]+$ ]]; then export CUDA_VISIBLE_DEVICES=$GPU echo "CUDA_VISIBLE_DEVICES=$CUDA_VISIBLE_DEVICES"else echo "No free GPU found — running on CPU."fi
SUBMISSION=/mnt/matylda4/udupa/exps/endpointing/sesame_eval/tt-benchmark/baselines/mimi_endpointer/turn-bench-submissionHARNESS=/mnt/matylda4/udupa/exps/endpointing/sesame_eval/turn-bench-templatePYTHON=/mnt/matylda4/udupa/miniconda3/bin/python3
# install lightweight harness deps into conda once (no uv, avoids lockfile conflicts)if ! "$PYTHON" -c "import soxr, rich, typer, moshi, matplotlib" 2>/dev/null; then echo "Installing deps into conda env..." "$PYTHON" -m pip install rich==15.0.0 typer==0.25.1 soxr==1.1.0 soundfile==0.13.1 matplotlib==3.10.6 --quiet "$PYTHON" -m pip install moshi==0.2.11 --no-deps --quietfi
# run from submission dir so Python's CWD finds our predict.py, not the harness template stubcd "$SUBMISSION"PYTHONPATH="$HARNESS" "$PYTHON" -m eval.harness "$@"
if [[ "${MIMI_DEBUG:-0}" == "1" ]]; then "$PYTHON" "$SUBMISSION/plot_debug.py"fiturn-bench-submission/run.shAdded+36