#!/bin/bash # phase D: coverage sweep for classify (generalisation rises with coverage, so lower than the first-order pick) cd $HOME/mt92 export TOKENIZERS_PARALLELISM=false OMP_NUM_THREADS=8 set -a; . ./.env; set +a export CAL=ex/cl_train0.jsonl LOG=$HOME/mt92/phaseD.log say() { echo "[$(date -u +%H:%M:%S)] $*" | tee -a $LOG; } acc() { ./venv/bin/python evalcl.py $1 ex/$2.jsonl 2>&1 | grep -oE "ACCURACY [0-9.]+" | awk '{print $2}'; } tr() { [ -d $1 ] || OUT=$1 BASE=$2 EPOCHS=$3 LR=8e-5 TRAIN=$4 ./venv/bin/python sft.py > train_$1.log 2>&1 V=$(acc $1 cl_validation_all); T=$(acc $1 cl_test_all); say "$1 ($2, $3 ep, $4): val $V test $T comb $(python3 -c "print(round(0.667*$T+0.333*$V,4))")"; } tr cld2_40 p2c 16 ex/cl_full40.jsonl tr cld2_50 p2c 16 ex/cl_full50.jsonl tr clb8_30 p8c 8 ex/cl_full30.jsonl tr clb8_45 p8c 8 ex/cl_full45.jsonl tr clc16_30 p16c 4 ex/cl_full30.jsonl tr clc16_45 p16c 4 ex/cl_full45.jsonl tr cla4_30 p4c 10 ex/cl_full30.jsonl say "PHASE_D_DONE" ./venv/bin/python - <