#!/usr/bin/env bash # Render configs/rl.toml, check credentials and the judge, then start training. # Usage: JUDGE_BASE_URL=http://HOST:PORT/v1 scripts/launch.sh [extra `rl` args, e.g. --dry-run] # `rl` starts inference, the trainer, the orchestrator and one env-worker-pool per source. set -euo pipefail ROOT="$(cd "$(dirname "$0")/.." && pwd)" [[ -f "$ROOT/.env" ]] && set -a && source "$ROOT/.env" && set +a : "${JUDGE_BASE_URL:?set JUDGE_BASE_URL to the judge /v1 endpoint}" # The guard's subtask mixing seeds its shuffles with hash(subtask). export PYTHONHASHSEED=0 cd "$ROOT" mkdir -p outputs sed "s|\${JUDGE_BASE_URL}|$JUDGE_BASE_URL|g" configs/rl.toml > outputs/rl.toml run() { uv run --project prime-rl --no-sync "$@"; } run python scripts/verify_access.py run python scripts/check_endpoint.py "$JUDGE_BASE_URL" exec uv run --project prime-rl --no-sync rl @ outputs/rl.toml "$@"