#!/bin/bash # [OFFLINE fallback] Evaluate using precomputed *_offline visual tokens. # This is NOT the default. Use scripts/eval_checkpoint.sh for online mode. # Isolated by default. Set ATLAS_ALLOW_OFFLINE=1 to run. set -e if [ "${ATLAS_ALLOW_OFFLINE}" != "1" ]; then echo "ERROR: This is an OFFLINE fallback script, not the primary online evaluation." >&2 echo "It is isolated by default to prevent accidental use in experiments." >&2 echo "If you really need it, set: ATLAS_ALLOW_OFFLINE=1" >&2 echo "For production evaluation use: bash scripts/eval_checkpoint.sh" >&2 exit 1 fi PROJECT_ROOT="$(cd "$(dirname "$0")/.." && pwd)" cd "$PROJECT_ROOT" CHECKPOINT="${1:?Usage: $0 [output_json] [max_samples]}" DATA_JSON="${2:?Usage: $0 [output_json] [max_samples]}" OUTPUT_JSON="${3:-}" MAX_SAMPLES="${4:-0}" PLANNING_TABLE3_MODE="${PLANNING_TABLE3_MODE:-atlas_base}" EXTRA_ARGS="" if [ -n "$OUTPUT_JSON" ]; then EXTRA_ARGS="$EXTRA_ARGS --output_json $OUTPUT_JSON" fi if [ "$MAX_SAMPLES" -gt 0 ] 2>/dev/null; then EXTRA_ARGS="$EXTRA_ARGS --max_samples $MAX_SAMPLES" fi python eval_atlas.py \ --checkpoint "$CHECKPOINT" \ --llm_model pretrained/vicuna-7b-v1.5 \ --data_json "$DATA_JSON" \ --data_root /home/guoyuanbo/autodl-tmp/data/nuscenes \ --visual_token_mode offline \ --planning_table3_mode "$PLANNING_TABLE3_MODE" \ --precomputed_det_tokens work_dirs/precomputed_det_tokens_offline/val \ --precomputed_map_tokens work_dirs/precomputed_map_tokens_offline/val \ --bf16 \ --batch_size 1 \ --num_workers 2 \ $EXTRA_ARGS