| #!/bin/bash |
| |
| |
| |
| set -e |
|
|
| if [ "${ATLAS_ALLOW_OFFLINE}" != "1" ]; then |
| echo "ERROR: This is an OFFLINE fallback script, not the primary online training." >&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 training use: bash scripts/train_no_caption_baseline.sh" >&2 |
| exit 1 |
| fi |
|
|
| PROJECT_ROOT="$(cd "$(dirname "$0")/.." && pwd)" |
| cd "$PROJECT_ROOT" |
|
|
| NUM_GPUS=${NUM_GPUS:-4} |
| PLANNING_TABLE3_MODE=${PLANNING_TABLE3_MODE:-atlas_base} |
|
|
| EXTRA_ARGS="" |
| if [ -n "$RESUME_CKPT" ]; then |
| EXTRA_ARGS="--resume $RESUME_CKPT" |
| fi |
|
|
| deepspeed --num_gpus "$NUM_GPUS" train_atlas.py \ |
| --llm_model pretrained/vicuna-7b-v1.5 \ |
| --data_json data/atlas_nuscenes_train.json,data/atlas_planning_train_uniad_command.json,data/openlane_subsetB_lane_train_4pt.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/train \ |
| --precomputed_map_tokens work_dirs/precomputed_map_tokens_offline/train \ |
| --deepspeed configs/ds_zero2.json \ |
| --output_dir work_dirs/atlas_no_caption_offline \ |
| --epochs 10 \ |
| --lr 2e-5 \ |
| --weight_decay 1e-4 \ |
| --batch_size 1 \ |
| --gradient_accumulation_steps 2 \ |
| --warmup_ratio 0.03 \ |
| --max_grad_norm 1.0 \ |
| --log_steps 100 \ |
| --save_epochs 1 \ |
| --keep_last_n_ckpts 3 \ |
| --seed 42 \ |
| --num_workers 4 \ |
| $EXTRA_ARGS |
|
|