SmartHearingAids-data / submit_baselines.sh
carankt's picture
Verification: upload code and scripts only
c22b544 verified
Raw
History Blame Contribute Delete
1.87 kB
#!/bin/bash
#SBATCH --partition=l40s
#SBATCH --gres=gpu:1
#SBATCH --cpus-per-task=24
#SBATCH --time=2:00:00
#SBATCH --job-name=baselines_eval
#SBATCH --output=baselines_eval.%j.out
set -euo pipefail
echo "Hello from $(hostname)!"
CONDA_SH=${CONDA_SH:-/home/kthakka2/scratchmelhila1/karan/miniconda3/etc/profile.d/conda.sh}
BASELINES_ENV=${BASELINES_ENV:-/home/kthakka2/scratchmelhila1/karan/miniconda3/envs/baselines}
if [ ! -f "${CONDA_SH}" ]; then
echo "ERROR: conda init script not found at ${CONDA_SH}"
exit 1
fi
source "${CONDA_SH}"
conda activate "${BASELINES_ENV}"
echo "Job running on node: $(hostname)"
echo "SLURM_JOB_ID=$SLURM_JOB_ID"
BASE_DIR=/home/kthakka2/scratchmelhila1/karan/EMMA2_text_conditioning_contextual
# Input eval directory root (must contain "outputs/" with sample subfolders).
# You can override at submit time, e.g.:
# sbatch --export=INPUT_DIR=${BASE_DIR}/experiments_final/no_TSDL_old_mixtures/eval_outputs_test_3k_removeall submit_baselines.sh
INPUT_DIR=${INPUT_DIR:-${BASE_DIR}/experiments_final/combined_v1/eval_outputs_test_3k_removeall}
OUTPUT_ROOT=${OUTPUT_ROOT:-${BASE_DIR}/experiments_final}
echo "Using INPUT_DIR=${INPUT_DIR}"
echo "Using OUTPUT_ROOT=${OUTPUT_ROOT}"
# Run MetricGAN+ baseline
echo "=== Running MetricGAN+ baseline ==="
python ${BASE_DIR}/run_baselines.py \
--input_dir ${INPUT_DIR} \
--model metricganplus \
--output_dir ${OUTPUT_ROOT}/metricganplus_baseline/eval_outputs_test_3k_removeall \
--use_cuda
echo "=== MetricGAN+ complete ==="
# Run MossFormer2 baseline
echo "=== Running MossFormer2 baseline ==="
python ${BASE_DIR}/run_baselines.py \
--input_dir ${INPUT_DIR} \
--model mossformer2 \
--output_dir ${OUTPUT_ROOT}/mossformer2_baseline/eval_outputs_test_3k_removeall \
--use_cuda
echo "=== MossFormer2 complete ==="
echo "All baseline evaluations completed!"