grok-record / harness /scripts /launch_eval.sh
simonycl's picture
Upload folder using huggingface_hub
9b2f1cf verified
Raw
History Blame Contribute Delete
1.47 kB
#!/usr/bin/env bash
# launch_eval.sh <tb2|swe> <model-id> [num-tasks]
set -euo pipefail
export PATH="/var/lib/agentptb-cache/tb1/prime-rl/.venv/bin:$PATH"
WS="${AGENTPTB_WORKSPACE:-/mnt/pvc/users/simon/agentptb/runs/grok/workspace}"
# venv verifiers has no broker runtime; the tree that does is deps/verifiers.
# pi_noloop is our anti-repeat-bash harness (block 3rd identical command).
export PYTHONPATH="$WS/envs/pi_noloop:/var/lib/agentptb-cache/tb1/prime-rl/deps/verifiers${PYTHONPATH:+:$PYTHONPATH}"
export TMPDIR=/var/lib/agentptb-cache/tb1/tmp
export PRIME_API_KEY="$(cat "$AGENTPTB_PRIME_KEY_FILE")"
SUITE="${1:?tb2 or swe}"
DEFAULT_MODEL="$WS/outputs/soup-85-s80/weights"
MODEL="$(readlink -f "${2:-$DEFAULT_MODEL}")"
N="${3:-40}"
OFFSET="${AGENTPTB_PORT_OFFSET:-500}"
# inference --server.port P starts a rust router on P and vLLM on P+100.
# The router accepts TCP then hangs on /v1; the working OpenAI API is P+100.
PORT=$((8000 + OFFSET + 100))
case "$SUITE" in
tb2) TS=terminal-bench-2-v1; CFG="$WS/configs/eval-tb2.toml"; OUT="$WS/outputs/eval-tb2" ;;
swe) TS=swebench-verified-v1; CFG="$WS/configs/eval-swe.toml"; OUT="$WS/outputs/eval-swe" ;;
*) echo "suite must be tb2 or swe"; exit 1 ;;
esac
mkdir -p "$OUT" "$WS/logs"
cd /var/lib/agentptb-cache/tb1/prime-rl
exec eval "$TS" @ "$CFG" \
--model "$MODEL" \
--client.base-url "http://127.0.0.1:${PORT}/v1" \
-n "$N" -s --no-push --no-rich -o "$OUT" \
--env.agent.runtime.block-network false