forked from ZhengYinan-AIR/Diffusion-Planner
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathsim_diffusion_planner_runner.sh
More file actions
executable file
·57 lines (49 loc) · 2.12 KB
/
sim_diffusion_planner_runner.sh
File metadata and controls
executable file
·57 lines (49 loc) · 2.12 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
export CUDA_VISIBLE_DEVICES=0,1,2,3,4,5,6,7
export HYDRA_FULL_ERROR=1
###################################
# User Configuration Section
###################################
# Set environment variables
export NUPLAN_DEVKIT_ROOT="REPLACE_WITH_NUPLAN_DEVIKIT_DIR" # nuplan-devkit absolute path (e.g., "/home/user/nuplan-devkit")
export NUPLAN_DATA_ROOT="REPLACE_WITH_DATA_DIR" # nuplan dataset absolute path (e.g. "/data")
export NUPLAN_MAPS_ROOT="REPLACE_WITH_MAPS_DIR" # nuplan maps absolute path (e.g. "/data/nuplan-v1.1/maps")
export NUPLAN_EXP_ROOT="REPLACE_WITH_EXP_DIR" # nuplan experiment absolute path (e.g. "/data/nuplan-v1.1/exp")
# Dataset split to use
# Options:
# - "test14-random"
# - "test14-hard"
# - "val14"
SPLIT="REPLACE_WITH_SPLIT" # e.g., "val14"
# Challenge type
# Options:
# - "closed_loop_nonreactive_agents"
# - "closed_loop_reactive_agents"
CHALLENGE="REPLACE_WITH_CHALLENGE" # e.g., "closed_loop_nonreactive_agents"
###################################
BRANCH_NAME=diffusion_planner_release
ARGS_FILE=./checkpoints/args.json
CKPT_FILE=./checkpoints/model.pth
if [ "$SPLIT" == "val14" ]; then
SCENARIO_BUILDER="nuplan"
else
SCENARIO_BUILDER="nuplan_challenge"
fi
echo "Processing $CKPT_FILE..."
FILENAME=$(basename "$CKPT_FILE")
FILENAME_WITHOUT_EXTENSION="${FILENAME%.*}"
PLANNER=diffusion_planner
python $NUPLAN_DEVKIT_ROOT/nuplan/planning/script/run_simulation.py \
+simulation=$CHALLENGE \
planner=$PLANNER \
planner.diffusion_planner.config.args_file=$ARGS_FILE \
planner.diffusion_planner.ckpt_path=$CKPT_FILE \
scenario_builder=$SCENARIO_BUILDER \
scenario_filter=$SPLIT \
experiment_uid=$PLANNER/$SPLIT/$BRANCH_NAME/${FILENAME_WITHOUT_EXTENSION}_$(date "+%Y-%m-%d-%H-%M-%S") \
verbose=true \
worker=ray_distributed \
worker.threads_per_node=128 \
distributed_mode='SINGLE_NODE' \
number_of_gpus_allocated_per_simulation=0.15 \
enable_simulation_progress_bar=true \
hydra.searchpath="[pkg://diffusion_planner.config.scenario_filter, pkg://diffusion_planner.config, pkg://nuplan.planning.script.config.common, pkg://nuplan.planning.script.experiments ]"