File size: 1,363 Bytes
ce1934a | 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 | #!/bin/bash
set -e
export HF_HOME="/mnt/matylda4/udupa/hugging-face"
export HF_HUB_OFFLINE=1
export TRANSFORMERS_OFFLINE=1
export HF_DATASETS_OFFLINE=1
export WANDB_MODE=offline
GPU=$(/mnt/matylda4/udupa/exps/endpointing/smart-endpointing/sge_utils/free-gpus.sh 1 2>/dev/null) || true
if [[ "$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-submission
HARNESS=/mnt/matylda4/udupa/exps/endpointing/sesame_eval/turn-bench-template
PYTHON=/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 --quiet
fi
# run from submission dir so Python's CWD finds our predict.py, not the harness template stub
cd "$SUBMISSION"
PYTHONPATH="$HARNESS" "$PYTHON" -m eval.harness "$@"
if [[ "${MIMI_DEBUG:-0}" == "1" ]]; then
"$PYTHON" "$SUBMISSION/plot_debug.py"
fi
|