MESH-Benchmark / code /exhibition_v3 /align_node.sh
Heiheihaha17's picture
Add files using upload-large-folder tool
347d9a3 verified
Raw History Blame Contribute Delete
642 Bytes
#!/usr/bin/env bash
set -euo pipefail
TASK_DATA=$1
TASK_CORPUS=$2
TASK_WEIGHTS=$3
TASK_OFFSET=$4
while [ ! -f "$TASK_DATA/private/sources/inventory.json" ]; do sleep 5; done
TASK_PIDS=()
for TASK_GPU in {0..7}; do
TASK_SHARD=$((TASK_OFFSET+TASK_GPU))
bash exhibition_v3/source_runtime.sh -m exhibition_v3.sources align --root "$TASK_DATA" --corpus "$TASK_CORPUS" --weights "$TASK_WEIGHTS" --shard "$TASK_SHARD" --shards 16 --gpu "$TASK_GPU" > "$TASK_DATA/operations/logs/align_$TASK_SHARD.log" 2>&1 &
TASK_PIDS+=("$!")
done
TASK_FAILED=0
for TASK_PID in "${TASK_PIDS[@]}"; do wait "$TASK_PID" || TASK_FAILED=1; done
exit "$TASK_FAILED"