Download code/scripts/sync_vm.sh from thegovind/weight-space-programming: direct link, hf CLI and curl.
- Browser
- Download file 775 Bytes
-
https://huggingface.co/spaces/thegovind/weight-space-programming/resolve/main/code/scripts/sync_vm.sh
- Command line
-
hf download hf://spaces/thegovind/weight-space-programming/code/scripts/sync_vm.sh
-
curl -L -o sync_vm.sh https://huggingface.co/spaces/thegovind/weight-space-programming/resolve/main/code/scripts/sync_vm.sh
775 Bytes
| # Copy the lab code, and the few files of the paper's repo it needs, to GPU machines. | |
| # bash scripts/sync_vm.sh trainer sampler | |
| set -euo pipefail | |
| cd "$(dirname "$0")/.." | |
| X=external/lm_understand-logs/exp8_math | |
| for h in "$@"; do | |
| ssh "$h" "mkdir -p /nvme/wsp-lab/code/$X/runs" </dev/null | |
| dirs=(); for d in wsp scripts configs plans labs; do [ -d "$d" ] && dirs+=("$d"); done | |
| # Lab 8 writes configs/capstone.json on the GPU machine; --delete must not remove it before you copy it back. | |
| rsync -az --delete --exclude __pycache__ --filter 'P configs/capstone.json' "${dirs[@]}" "$h:/nvme/wsp-lab/code/" | |
| rsync -az "$X/code" "$X/practice" "$h:/nvme/wsp-lab/code/$X/" | |
| rsync -az "$X/runs/p50c" "$h:/nvme/wsp-lab/code/$X/runs/" | |
| echo "synced $h" | |
| done | |