laya-browser / code /finetune /run_all.sh
cklxx's picture
laya-browser v10 / v10s: laya fine-tuned as a browser-agent decision head + code + results
adf912b verified
Raw History Blame Contribute Delete
1.16 kB
#!/bin/bash
# build items -> zero-shot baselines -> fine-tune -> eval. Logs to finetune/out/run.log
cd /home/ckl/projects/S/laya && source env.sh
export LAYA_BASE=$(ls -d ~/.cache/huggingface/hub/models--convaiinnovations--laya/snapshots/*/typed-decisions | head -1)
P=.venv/bin/python
for p in $(pgrep -f "sglang.launch_server"); do kill $p; done; sleep 3
uv pip install --python $P "httpx[http2]" 2>&1 | tail -1
set -e
echo "== build items"; $P finetune/build_items.py finetune/out/pages.jsonl finetune/out/cases.jsonl finetune/out/
echo "== zero-shot baselines"
$P finetune/eval.py finetune/out/pages.jsonl finetune/out/eval_cases.jsonl "$LAYA_BASE" 2>&1 | grep -vE "TileLang|Warn|warn|Fetch"
$P finetune/eval.py finetune/out/pages.jsonl finetune/out/eval_cases.jsonl convaiinnovations/laya multilingual 2>&1 | grep -vE "TileLang|Warn|warn|Fetch"
echo "== train"; $P finetune/train.py finetune/out/train_items.pt finetune/out/laya-browser 4 2>&1 | grep -vE "Warn|warn"
echo "== eval fine-tuned"
$P finetune/eval.py finetune/out/pages.jsonl finetune/out/eval_cases.jsonl finetune/out/laya-browser 2>&1 | grep -vE "TileLang|Warn|warn|Fetch"
echo RUN_ALL_DONE