LANTERN / closedloop /scripts /run_simlingo_route.sh
YongshuoLiu's picture
Add LANTERN metadata and closed-loop benchmark
5a5e5cf verified
Raw History Blame Contribute Delete
1.16 kB
#!/usr/bin/env bash
set -euo pipefail
BUNDLE=$(cd "$(dirname "${BASH_SOURCE[0]}")/.." && pwd)
PROJECT_ROOT=${PROJECT_ROOT:-/path/to/pedestrian_dataset}
PYTHON=${PYTHON:-python3}
ROUTE=${ROUTE:-${BUNDLE}/routes/occluded_pedestrian/closed_occluded_pedestrian_0011.xml}
GPU_RANK=${GPU_RANK:-0}
PORT=${PORT:-4527}
TM_PORT=${TM_PORT:-10527}
RUN_NAME=${RUN_NAME:-$(basename "${ROUTE}" .xml)_lantern_gpu${GPU_RANK}_$(date +%Y%m%d_%H%M%S)}
RUN_DIR=${RUN_DIR:-${BUNDLE}/runs/${RUN_NAME}}
OVERLAY=${OVERLAY:-${BUNDLE}/runtime_scenario_runner}
MODEL_INPUT=${MODEL_INPUT:?Set MODEL_INPUT to a SimLingo run directory or checkpoint}
"${PYTHON}" "${BUNDLE}/prepare_runtime_overlay.py" --output "${OVERLAY}" >/dev/null
env GPU_RANK="${GPU_RANK}" PORT="${PORT}" TM_PORT="${TM_PORT}" \
ROUTES="${ROUTE}" ROUTE="${ROUTE}" RUN_NAME="${RUN_NAME}" RUN_DIR="${RUN_DIR}" \
TEAM_AGENT="${BUNDLE}/agent/closed_coopeval_video_agent.py" TEAM_CONFIG="" MODEL_INPUT="${MODEL_INPUT}" \
SCENARIO_RUNNER_ROOT="${OVERLAY}" \
LEADERBOARD_DISABLE_BACKGROUND_ACTIVITY="${LEADERBOARD_DISABLE_BACKGROUND_ACTIVITY:-0}" \
bash "${PROJECT_ROOT}/scripts/run_s8_original_simlingo_video.sh"