gnn_wm2 / Ctrl-World-Graph /scripts /launch_perceiver_graph_ablation.sh
EndeavourDD's picture
Upload folder using huggingface_hub (part 17)
f15a766 verified
Raw
History Blame Contribute Delete
1.25 kB
#!/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