File size: 1,248 Bytes
f15a766 | 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 | #!/usr/bin/env bash
set -euo pipefail
ROOT="/workspace/Ctrl-World-Graph"
cd "${ROOT}"
mkdir -p logs
launch_one() {
local gpu="$1"
local backbone="$2"
local tag="ctrl_world_graph_5hz_histcorr_${backbone}_perceiver"
local output_dir="model_ckpt/${tag}"
local tb_dir="${output_dir}/tensorboard"
local log_path="logs/train_wm_graph_5hz_histcorr_${backbone}_perceiver_gpu${gpu}.log"
local pid_path="logs/train_wm_graph_5hz_histcorr_${backbone}_perceiver_gpu${gpu}.pid"
if [[ -f "${output_dir}/checkpoint-100000.pt" ]]; then
echo "skip ${backbone}: ${output_dir}/checkpoint-100000.pt already exists"
return 0
fi
CUDA_VISIBLE_DEVICES="${gpu}" setsid nohup python -u scripts/train_wm_graph.py \
--tag "${tag}" \
--output-dir "${output_dir}" \
--tensorboard-log-dir "${tb_dir}" \
--history-corruption \
--graph-backbone "${backbone}" \
--graph-resampler perceiver \
--graph-resampler-layers 2 \
> "${log_path}" 2>&1 &
echo "$!" > "${pid_path}"
echo "launched ${backbone}+perceiver on gpu ${gpu}: pid=$(cat "${pid_path}") log=${log_path}"
}
launch_one 5 gine
launch_one 6 gps
launch_one 7 gatv2
launch_one 0 transformer
launch_one 1 edge_transformer
launch_one 2 hybrid_gine_transformer
|