Download code/scripts/gpu_bench.sh from reneeice/sparse-adversarial-research-archive: direct link, hf CLI and curl.
- Browser
- Download file 1.11 kB
-
https://huggingface.co/datasets/reneeice/sparse-adversarial-research-archive/resolve/main/code/scripts/gpu_bench.sh
- Command line
-
hf download hf://datasets/reneeice/sparse-adversarial-research-archive/code/scripts/gpu_bench.sh
-
curl -L -o gpu_bench.sh https://huggingface.co/datasets/reneeice/sparse-adversarial-research-archive/resolve/main/code/scripts/gpu_bench.sh
1.11 kB
| # Full GPU benchmark suite for the Perturb attack portfolio. | |
| # Run AFTER scripts/gpu_setup.sh. Produces bench_results/*.json summaries. | |
| set -euo pipefail | |
| cd "$(dirname "${BASH_SOURCE[0]}")/.." | |
| mkdir -p bench_results | |
| echo "== 1) Live-task duel vs mainnet field (3 rounds, prod cadence) ==" | |
| python scripts/shadow_duel.py --rounds 3 --wait-seconds 420 \ | |
| --attack.time-budget-seconds 30 --attack.apgd.iterations 50 \ | |
| 2>&1 | tee bench_results/duel_$(date +%s).log | |
| echo "== 2) Offline ImageNet-100 sample (30 images, prod cadence) ==" | |
| python scripts/local_eval.py --imagenet100 --n 30 --out-dir bench_results/imgs \ | |
| --attack.time-budget-seconds 30 --attack.apgd.iterations 50 \ | |
| 2>&1 | tee bench_results/offline_$(date +%s).log | |
| echo "== 3) Sensitivity sweep: budget 15/30/45s on 10 images ==" | |
| for B in 15 30 45; do | |
| python scripts/local_eval.py --imagenet100 --n 10 --start 100 \ | |
| --attack.time-budget-seconds $B --attack.apgd.iterations 50 \ | |
| 2>&1 | tee bench_results/budget${B}_$(date +%s).log | |
| done | |
| echo "Done. Compare 'score mean' against rank1_today printed in each log." | |