| #SBATCH --job-name=sa_pretrained_baseline | |
| #SBATCH --mail-type=FAIL,END | |
| #SBATCH --mail-user=dingqy@umich.edu | |
| #SBATCH --nodes=1 | |
| #SBATCH --ntasks-per-node=1 | |
| #SBATCH --cpus-per-task=4 | |
| #SBATCH --mem-per-cpu=11GB | |
| #SBATCH --time=1:00:00 | |
| #SBATCH --account=ahowens1 | |
| #SBATCH --partition=spgpu | |
| #SBATCH --qos=foe | |
| #SBATCH --reservation=spgpu_foe_nodes | |
| #SBATCH --gres=gpu:a40:1 | |
| #SBATCH --output=/nfs/turbo/coe-ahowens-nobackup/dingqy/sa_pretrained_baseline-%j.log | |
| # | |
| # Sanity check: is the pretrained sa_open_1_0_bg_expanded.ckpt (training step | |
| # 0) better than ANY of our 37 trained ckpts? If yes, the bg2fg fine-tune is | |
| # net negative on test_loss β a strong signal training is hurting, not helping. | |
| # | |
| # Same eval as the 4-shard sweep: deterministic per-batch t/noise, same test | |
| # split, same loss formula. Only difference: pretrained has no EMA so we use | |
| # raw weights (the eval script auto-detects this). | |
| set -eu | |
| source /nfs/turbo/coe-ahowens-nobackup/dingqy/miniforge3/etc/profile.d/conda.sh | |
| source /home/dingqy/.hf_token | |
| export HF_CACHE=/nfs/turbo/coe-ahowens-nobackup/dingqy/.cache/huggingface | |
| conda activate stable-audio | |
| OUT=/nfs/turbo/coe-ahowens-nobackup/dingqy/sa_test_loss_pretrained.json | |
| PRETRAINED=/nfs/turbo/coe-ahowens-nobackup/dingqy/friendly-stable-audio-tools/data/ckpt/sa_open_1_0_bg_expanded.ckpt | |
| python /nfs/turbo/coe-ahowens-nobackup/dingqy/eval_sa_test_loss.py \ | |
| --ckpts "$PRETRAINED" \ | |
| --out "$OUT" \ | |
| --batch-size 8 --num-workers 4 | |
| echo "" | |
| echo "=== pretrained vs best trained ===" | |
| python -c " | |
| import json | |
| pre = json.load(open('$OUT')) | |
| pre_loss = list(pre.values())[0]['test_loss'] | |
| best_trained = 0.68191 # lbkb1h5z step=1000 | |
| print(f' pretrained (sa_open_1_0_bg_expanded): {pre_loss:.5f}') | |
| print(f' best trained (lbkb1h5z step=1000): {best_trained:.5f}') | |
| delta = pre_loss - best_trained | |
| print(f' delta (pretrained - best_trained): {delta:+.5f}') | |
| if delta > 0: | |
| print(' β pretrained is WORSE β training did help (at least for the first 1k steps)') | |
| else: | |
| print(' β pretrained is BETTER β fine-tune is net negative; training is hurting') | |
| " | |