-
Notifications
You must be signed in to change notification settings - Fork 3
/
Copy pathtrain_rdp.sh
executable file
·42 lines (35 loc) · 1.35 KB
/
train_rdp.sh
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
#!/bin/bash
GPU_ID=0
TASK_NAME="peel"
DATASET_PATH="/home/wendi/Desktop/record_data/peel_v3_downsample1_zarr"
LOGGING_MODE="online"
TIMESTAMP=$(date +%m%d%H%M%S)
SEARCH_PATH="./data/outputs"
# Stage 1: Train Asymmetric Tokenizer
echo "Stage 1: training Asymmetric Tokenizer..."
CUDA_VISIBLE_DEVICES=${GPU_ID} python train.py \
--config-name=train_at_workspace \
task=real_${TASK_NAME}_image_gelsight_emb_at_24fps \
task.dataset_path=${DATASET_PATH} \
task.name=real_${TASK_NAME}_image_gelsight_emb_at_24fps_${TIMESTAMP} \
at=at_peel \
logging.mode=${LOGGING_MODE}
# find the latest checkpoint
echo ""
echo "Searching for the latest AT checkpoint..."
AT_LOAD_DIR=$(find "${SEARCH_PATH}" -maxdepth 2 -path "*${TIMESTAMP}*" -type d)/checkpoints/latest.ckpt
if [ ! -f "${AT_LOAD_DIR}" ]; then
echo "Error: VAE checkpoint not found at ${AT_LOAD_DIR}"
exit 1
fi
# Stage 2: Train Latent Diffusion Policy
echo ""
echo "Stage 2: training Latent Diffusion Policy..."
CUDA_VISIBLE_DEVICES=${GPU_ID} accelerate launch train.py \
--config-name=train_latent_diffusion_unet_real_image_workspace \
task=real_${TASK_NAME}_image_gelsight_emb_ldp_24fps \
task.dataset_path=${DATASET_PATH} \
task.name=real_${TASK_NAME}_image_gelsight_emb_ldp_24fps_${TIMESTAMP} \
at=at_peel \
at_load_dir=${AT_LOAD_DIR} \
logging.mode=${LOGGING_MODE}