#!/usr/bin/env bash
# Run on the pod: bash run.sh [data.jsonl]   (default: example.jsonl)
set -euo pipefail
cd "$(dirname "$0")"
export HF_HOME=/workspace/hf
PY=/workspace/venv/bin/python

bash setup.sh
$PY prepare_data.py "${1:-example.jsonl}"
$PY train_lora.py --name smoke --max-steps 3 --longest-first --epochs 1
nohup $PY train_lora.py --name run-1 > run-1.out 2>&1 &
echo "training in the background: tail -f runs/run-1/log.jsonl"
