run_eval.sh: test split only + Jobs-proxy path (missing train dir killed the env server)
Browse files- run_eval.sh +22 -2
run_eval.sh
CHANGED
|
@@ -23,6 +23,8 @@ echo "/opt/OpenEnv/envs" > "$SITE/openenv_examples.pth"
|
|
| 23 |
echo "=== [setup] pinned test tasks ==="
|
| 24 |
python3 prepare_tasks.py --output /app/prepared --splits test
|
| 25 |
|
|
|
|
|
|
|
| 26 |
echo "=== [start] vLLM (base + adapter as LoRA 'trained') ==="
|
| 27 |
LORA_ARGS=()
|
| 28 |
if [ -n "${ADAPTER_REPO:-}" ]; then
|
|
@@ -39,8 +41,26 @@ vllm serve "${BASE_MODEL:-LiquidAI/LFM2.5-2.6B}" \
|
|
| 39 |
"${LORA_ARGS[@]}" &
|
| 40 |
VLLM_PID=$!
|
| 41 |
|
| 42 |
-
echo "=== [
|
| 43 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 44 |
ENV_PID=$!
|
| 45 |
|
| 46 |
python3 - <<'EOF'
|
|
|
|
| 23 |
echo "=== [setup] pinned test tasks ==="
|
| 24 |
python3 prepare_tasks.py --output /app/prepared --splits test
|
| 25 |
|
| 26 |
+
# (seam patch happens below, before the env server starts)
|
| 27 |
+
|
| 28 |
echo "=== [start] vLLM (base + adapter as LoRA 'trained') ==="
|
| 29 |
LORA_ARGS=()
|
| 30 |
if [ -n "${ADAPTER_REPO:-}" ]; then
|
|
|
|
| 41 |
"${LORA_ARGS[@]}" &
|
| 42 |
VLLM_PID=$!
|
| 43 |
|
| 44 |
+
echo "=== [patch] opencode seam: session id as x-api-key (Jobs proxy strips Authorization) ==="
|
| 45 |
+
python3 - <<'EOF'
|
| 46 |
+
import openenv.harbor.seams as seams
|
| 47 |
+
|
| 48 |
+
path = seams.__file__
|
| 49 |
+
src = open(path).read()
|
| 50 |
+
old = '"apiKey": session,\n "timeout": 600_000,'
|
| 51 |
+
new = ('"apiKey": session,\n'
|
| 52 |
+
' "headers": {"x-api-key": session},\n'
|
| 53 |
+
' "timeout": 600_000,')
|
| 54 |
+
assert src.count(old) == 1, f"opencode seam not found in {path}"
|
| 55 |
+
open(path, "w").write(src.replace(old, new))
|
| 56 |
+
print("patched", path)
|
| 57 |
+
EOF
|
| 58 |
+
|
| 59 |
+
echo "=== [start] env server (test split only; tunnel-free via Jobs proxy) ==="
|
| 60 |
+
export SPACE_HOST="${JOB_ID}--8000.hf.jobs"
|
| 61 |
+
PREPARED=/app/prepared \
|
| 62 |
+
OPENENV_DATASETS=/app/prepared/datasets/test \
|
| 63 |
+
bash serve_env.sh &
|
| 64 |
ENV_PID=$!
|
| 65 |
|
| 66 |
python3 - <<'EOF'
|