#!/bin/bash # After a reboot: continue phase 2. v18s resumes from its resume.pt (items_s reused), v18L items are built if missing, # the watcher switches v18L to 1 epoch, then both are evaluated (suites A, B, C, webgym held-out). cd /home/ckl/projects/S/laya if [ -f finetune/out/laya-browser-v18s/model.safetensors ] && grep -q "== train laya-browser-v18L" finetune/out/phase2.log 2>/dev/null; then # v18s is finished and v18L had started: continue v18L (1 epoch) and the evaluation directly nohup env STAGE=L SKIP_BUILD=1 INFRA_DIR=/tmp/laya-infra bash finetune/run_phase2b.sh >> finetune/out/phase2b.log 2>&1 & else nohup bash finetune/switch_L_to_1epoch.sh > finetune/out/switch.log 2>&1 & nohup env SKIP_BUILD=1 INFRA_DIR=/tmp/laya-infra bash finetune/run_phase2.sh >> finetune/out/phase2.log 2>&1 & fi echo "phase 2 running in the background; follow with: tail -f finetune/out/phase2.log finetune/out/phase2b.log"