jiayicheng's picture
transfer-unit: catalyst-data research snapshot (code, donor data, all run results, reports) (part 2)
1ffcefd verified
Raw History Blame Contribute Delete
593 Bytes
#!/usr/bin/env bash
# Launch a grid of runs on this worker, one config per GPU pair.
# usage: launch_grid.sh cfg1.json,cfg2.json,... (max 4 per 8-GPU worker)
set -euo pipefail
ROOT=/mnt/bn/chobits-wx/jiayicheng/project/agent_catalyst
IFS=',' read -ra CFGS <<< "$1"
PAIRS=("0,1" "2,3" "4,5" "6,7")
i=0
for cfg in "${CFGS[@]}"; do
name=$(basename "$cfg" .json)
pair=${PAIRS[$i]}
echo "launching $name on GPUs $pair"
cd "$ROOT"
setsid nohup bash transfer-unit/scripts/run_one.sh "$cfg" "$pair" \
> "runs/${name}.out" 2>&1 < /dev/null &
i=$((i+1))
done
echo "launched $i runs"