dasLOL's picture
classify phaseE.sh
65298c2 verified
Raw History Blame Contribute Delete
769 Bytes
#!/bin/bash
# phaseE.sh <model>... : build ONNX, profile, stage, back up
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/phaseE.log
say() { echo "[$(date -u +%H:%M:%S)] $*" | tee -a $LOG; }
for M in "$@"; do
bash ./build_final.sh $M 32 > build_$M.log 2>&1 || say "build $M FAILED"
cp manifest_template.json onnx_$M/final/manifest.json
./venv/bin/python calib.py onnx_$M/final 60 > calib_$M.log 2>&1; say "$M calib: $(grep -v '^probe' calib_$M.log | tr -d '\n' | head -c 220)"
./venv/bin/python up_art.py onnx_$M/final onnx_$M > up_$M.log 2>&1 && say "staged onnx_$M"
./venv/bin/python backup_now.py $M > backup_$M.log 2>&1 && say "$M backed up"
done
say "PHASE_E_DONE"