Download deploy/submit_vbench2_generate_shards.sh from YFanwang/Backup: direct link, hf CLI and curl.
- Browser
- Download file 707 Bytes
-
https://huggingface.co/datasets/YFanwang/Backup/resolve/main/deploy/submit_vbench2_generate_shards.sh
- Command line
-
hf download hf://datasets/YFanwang/Backup/deploy/submit_vbench2_generate_shards.sh
-
curl -L -o submit_vbench2_generate_shards.sh https://huggingface.co/datasets/YFanwang/Backup/resolve/main/deploy/submit_vbench2_generate_shards.sh
707 Bytes
| set -Eeuo pipefail | |
| SCRIPT_DIR="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)" | |
| SHARD_COUNT="${SHARD_COUNT:-16}" | |
| START_INDEX="${START_INDEX:-0}" | |
| END_INDEX="${END_INDEX:-$((SHARD_COUNT - 1))}" | |
| DRY_RUN="${DRY_RUN:-false}" | |
| is_true() { | |
| case "${1:-}" in | |
| true|TRUE|1|yes|YES|y|Y) return 0 ;; | |
| *) return 1 ;; | |
| esac | |
| } | |
| for shard_index in $(seq "$START_INDEX" "$END_INDEX"); do | |
| yaml_path="${SCRIPT_DIR}/vbench2_generate_shard_${shard_index}.yaml" | |
| if [[ ! -f "$yaml_path" ]]; then | |
| echo "[ERROR] Missing YAML: $yaml_path" >&2 | |
| exit 1 | |
| fi | |
| cmd=(snap_rutils cluster run -s "$yaml_path" -y) | |
| echo "[submit] ${cmd[*]}" | |
| if ! is_true "$DRY_RUN"; then | |
| "${cmd[@]}" | |
| fi | |
| done | |