File size: 1,622 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
44
45
46
47
48
49
#!/usr/bin/env bash
set -euo pipefail

ROOT="/workspace/Ctrl-World-Graph"
cd "${ROOT}"

mkdir -p logs eval_query_val

VAL_SAMPLES="${VAL_SAMPLES:-4333}"

launch_one() {
  local gpu="$1"
  local tag="$2"
  local ckpt="$3"
  local out_dir="eval_query_val/${tag}"
  local log_path="logs/eval_val_${tag}_gpu${gpu}.log"
  local pid_path="logs/eval_val_${tag}_gpu${gpu}.pid"
  local aggregate_path="${out_dir}/checkpoint-100000/val_psnr_0000_$((VAL_SAMPLES - 1)).json"

  if [[ -f "${aggregate_path}" ]]; then
    echo "skip ${tag}: ${aggregate_path} already exists"
    return 0
  fi

  CUDA_VISIBLE_DEVICES="${gpu}" setsid nohup python -u scripts/eval_graph_video.py \
    --ckpt-path "${ckpt}" \
    --sample-index 0 \
    --num-samples "${VAL_SAMPLES}" \
    --save-videos-limit 0 \
    --out-dir "${out_dir}" \
    > "${log_path}" 2>&1 &

  echo "$!" > "${pid_path}"
  echo "launched ${tag} on gpu ${gpu}: pid=$(cat "${pid_path}") log=${log_path}"
}

launch_one 0 gps_query \
  model_ckpt/ctrl_world_graph_5hz_histcorr/checkpoint-100000.pt
launch_one 1 gine_query \
  model_ckpt/ctrl_world_graph_5hz_histcorr_gine_query/checkpoint-100000.pt
launch_one 2 gatv2_query \
  model_ckpt/ctrl_world_graph_5hz_histcorr_gatv2_query/checkpoint-100000.pt
launch_one 3 transformer_query \
  model_ckpt/ctrl_world_graph_5hz_histcorr_transformer_query/checkpoint-100000.pt
launch_one 4 edge_transformer_query \
  model_ckpt/ctrl_world_graph_5hz_histcorr_edge_transformer_query/checkpoint-100000.pt
launch_one 5 hybrid_gine_transformer_query \
  model_ckpt/ctrl_world_graph_5hz_histcorr_hybrid_gine_transformer_query/checkpoint-100000.pt