blob: b91386fc20b8016e022f625cbe6a91c460170601 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
|
#!/usr/bin/env bash
# Validation-only screen for amortized calibration query budgets.
# Usage: query_budget_validation_sweep.sh <gpu> "<mode:k:every> ..." [seeds]
# Example: query_budget_validation_sweep.sh 5 "sdil:16:4 sdil:1:4" 0
set -eu
cd "$(dirname "$0")/.."
GPU="${1:?GPU index required}"
SPECS="${2:?space-separated mode:k:every specs required}"
SEEDS="${3:-0}"
PYTHON="${PYTHON:-/home/yurenh2/miniconda3/envs/ep_pascal/bin/python3}"
for seed in $SEEDS; do
for spec in $SPECS; do
IFS=: read -r mode ndirs every <<EOF
$spec
EOF
if [ "$mode" = dfa ]; then
tag="query_dev_v1_cifar10_d20_dfa_s${seed}"
else
tag="query_dev_v1_cifar10_d20_k${ndirs}_e${every}_s${seed}"
fi
out="results/${tag}.json"
if [ -s "$out" ]; then
echo "[$tag] exists; skipping"
continue
fi
CUDA_VISIBLE_DEVICES="$GPU" "$PYTHON" experiments/run.py \
--mode "$mode" --dataset cifar10 --device cuda \
--depth 20 --width 64 --residual 1 --act tanh \
--epochs 5 --batch_size 128 --eta 0.05 --momentum 0.9 \
--eta_A 0.02 --pert_sigma 0.01 --pert_ndirs "$ndirs" \
--pert_every "$every" --pert_mode simultaneous \
--traffic_mode none --nuis_rho 0 --use_residual 0 \
--learn_A 1 --learn_P 0 --p_warmup_steps 0 \
--val_examples 5000 --split_seed 2027 --eval_split validation \
--diagnostics none --eval_every 0 --seed "$seed" \
--log_every 100000 --tag "$tag"
done
done
|