Skip to content

Commit 462af23

Browse files
committed
rebuttals
1 parent 6b604dd commit 462af23

32 files changed

+1247
-83
lines changed

bin/clip/main_small.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,8 +2,8 @@
22

33

44
# Ensures that all data is downloaded
5-
# echo "Ensures that all data is downloaded."
6-
# `dirname $0`/../clip/download_data.sh "$@"
5+
echo "Ensures that all data is downloaded."
6+
`dirname $0`/../clip/download_data.sh "$@"
77

88
wait
99

bin/mnist/augmnist_aug.sh

Lines changed: 91 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,91 @@
1+
#!/usr/bin/env bash
2+
3+
experiment="augmnist_aug"
4+
notes="
5+
**Goal**: Understand the impact of the choice of augmentation on a simple setting,
6+
"
7+
8+
# parses special mode for running the script
9+
source `dirname $0`/../utils.sh
10+
11+
# define all the arguments modified or added to `conf`. If they are added use `+`
12+
kwargs="
13+
experiment=$experiment
14+
timeout=$time
15+
is_only_feat=False
16+
featurizer=neural_feat
17+
architecture@encoder=resnet18
18+
data@data_pred=mnist_aug
19+
checkpoint@checkpoint_feat=bestTrainLoss
20+
rate=H_hyper
21+
trainer.max_epochs=100
22+
$add_kwargs
23+
"
24+
25+
# every arguments that you are sweeping over
26+
kwargs_multi="
27+
distortion=VIC,BINCE
28+
data@data_feat=mnist_aug_less,mnist_aug_sup,mnist_aug
29+
featurizer.loss.beta=0.003,0.01,0.03,0.1,0.3,1,3
30+
seed=1
31+
"
32+
33+
# every arguments that you are sweeping over
34+
kwargs_multi="
35+
data@data_feat=mnist_aug_less,mnist_aug_sup,mnist_aug
36+
seed=1
37+
"
38+
39+
if [ "$is_plot_only" = false ] ; then
40+
for kwargs_dep in "distortion=BINCE featurizer.loss.beta=1e-7,1e-6,1e-5,1e-4,1e-3"
41+
#"distortion=VIC featurizer.loss.beta=1e-5,1e-4,1e-3,1e-2,0.1,1" "distortion=BINCE featurizer.loss.beta=1e-7,1e-6,1e-5,1e-4,1e-3,1e-2"
42+
do
43+
44+
python "$main" +hydra.job.env_set.WANDB_NOTES="\"${notes}\"" $kwargs $kwargs_multi $kwargs_dep -m &
45+
46+
sleep 3
47+
48+
done
49+
fi
50+
51+
52+
wait
53+
54+
55+
col_val_subset=""
56+
rate_cols="['test/feat/rate']"
57+
distortion_cols="['test/feat/distortion','test/feat/online_loss','test/feat/online_err','test/pred/loss','test/pred/err']"
58+
compare="datafeat"
59+
data="merged" # want to access both ther featurizer data and the predictor data
60+
python utils/aggregate.py \
61+
experiment=$experiment \
62+
$col_val_subset \
63+
+plot_all_RD_curves.folder_col="dist" \
64+
+plot_all_RD_curves.data="${data}" \
65+
+plot_all_RD_curves.rate_cols="${rate_cols}" \
66+
+plot_all_RD_curves.distortion_cols="${distortion_cols}" \
67+
+plot_all_RD_curves.hue=$compare \
68+
+plot_all_RD_curves.plot_config_kwargs.font_scale=1 \
69+
+summarize_RD_curves.data="${data}" \
70+
+summarize_RD_curves.rate_cols="${rate_cols}" \
71+
+summarize_RD_curves.distortion_cols="${distortion_cols}" \
72+
+summarize_RD_curves.mse_cols="${distortion_cols}" \
73+
agg_mode=[summarize_metrics,plot_all_RD_curves,summarize_RD_curves]
74+
75+
76+
col_val_subset=""
77+
rate_cols="['test/feat/rate']"
78+
distortion_cols="['test/pred/err']"
79+
compare="datafeat"
80+
data="merged" # want to access both ther featurizer data and the predictor data
81+
python utils/aggregate.py \
82+
experiment=$experiment \
83+
$col_val_subset \
84+
kwargs.prfx="single" \
85+
+plot_all_RD_curves.folder_col="dist" \
86+
+plot_all_RD_curves.data="${data}" \
87+
+plot_all_RD_curves.rate_cols="${rate_cols}" \
88+
+plot_all_RD_curves.distortion_cols="${distortion_cols}" \
89+
+plot_all_RD_curves.hue=$compare \
90+
+plot_all_RD_curves.plot_config_kwargs.font_scale=1 \
91+
agg_mode=[plot_all_RD_curves]

bin/mnist/augmnist_aug_old.sh

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
#!/usr/bin/env bash
2+
3+
experiment="augmnist_aug"
4+
notes="
5+
**Goal**: Understand the impact of the choice of augmentation on a simple setting,
6+
"
7+
8+
# parses special mode for running the script
9+
source `dirname $0`/../utils.sh
10+
11+
# define all the arguments modified or added to `conf`. If they are added use `+`
12+
kwargs="
13+
experiment=$experiment
14+
timeout=$time
15+
is_only_feat=False
16+
featurizer=neural_feat
17+
architecture@encoder=resnet18
18+
data@data_pred=mnist_aug
19+
checkpoint@checkpoint_feat=bestTrainLoss
20+
rate=H_hyper
21+
trainer.max_epochs=100
22+
$add_kwargs
23+
"
24+
25+
# every arguments that you are sweeping over
26+
kwargs_multi="
27+
distortion=VIC,BINCE
28+
data@data_feat=mnist_aug_less,mnist_aug_sup,mnist_aug
29+
featurizer.loss.beta=0.003,0.01,0.03,0.1,0.3,1,3
30+
seed=1
31+
"
32+
33+
if [ "$is_plot_only" = false ] ; then
34+
for kwargs_dep in ""
35+
36+
do
37+
38+
#python "$main" +hydra.job.env_set.WANDB_NOTES="\"${notes}\"" $kwargs $kwargs_multi $kwargs_dep -m &
39+
40+
sleep 3
41+
42+
done
43+
fi
44+
45+
46+
wait
47+
48+
49+
50+
51+
col_val_subset=""
52+
rate_cols="['test/feat/rate']"
53+
distortion_cols="['test/feat/distortion','test/feat/online_loss','test/feat/online_err','test/pred/loss','test/pred/err']"
54+
compare="datafeat"
55+
data="merged" # want to access both ther featurizer data and the predictor data
56+
python utils/aggregate.py \
57+
experiment=$experiment \
58+
$col_val_subset \
59+
+plot_all_RD_curves.folder_col="dist" \
60+
+plot_all_RD_curves.data="${data}" \
61+
+plot_all_RD_curves.rate_cols="${rate_cols}" \
62+
+plot_all_RD_curves.distortion_cols="${distortion_cols}" \
63+
+plot_all_RD_curves.hue=$compare \
64+
+plot_all_RD_curves.plot_config_kwargs.font_scale=1 \
65+
+summarize_RD_curves.data="${data}" \
66+
+summarize_RD_curves.rate_cols="${rate_cols}" \
67+
+summarize_RD_curves.distortion_cols="${distortion_cols}" \
68+
+summarize_RD_curves.mse_cols="${distortion_cols}" \
69+
agg_mode=[summarize_metrics,plot_all_RD_curves,summarize_RD_curves]
70+
71+
72+
col_val_subset=""
73+
rate_cols="['test/feat/rate']"
74+
distortion_cols="['test/pred/err']"
75+
compare="datafeat"
76+
data="merged" # want to access both ther featurizer data and the predictor data
77+
python utils/aggregate.py \
78+
experiment=$experiment \
79+
$col_val_subset \
80+
kwargs.prfx="single" \
81+
+plot_all_RD_curves.folder_col="dist" \
82+
+plot_all_RD_curves.data="${data}" \
83+
+plot_all_RD_curves.rate_cols="${rate_cols}" \
84+
+plot_all_RD_curves.distortion_cols="${distortion_cols}" \
85+
+plot_all_RD_curves.hue=$compare \
86+
+plot_all_RD_curves.plot_config_kwargs.font_scale=1 \
87+
agg_mode=[plot_all_RD_curves]
88+
89+

bin/mnist/augmnist_aug_warm.sh

Lines changed: 84 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,84 @@
1+
#!/usr/bin/env bash
2+
3+
experiment="augmnist_aug_warm"
4+
notes="
5+
**Goal**: Understand the impact of the choice of augmentation on a simple setting,
6+
"
7+
8+
# parses special mode for running the script
9+
source `dirname $0`/../utils.sh
10+
11+
# define all the arguments modified or added to `conf`. If they are added use `+`
12+
kwargs="
13+
experiment=$experiment
14+
timeout=$time
15+
is_only_feat=False
16+
featurizer=neural_feat
17+
architecture@encoder=resnet18
18+
data@data_pred=mnist_aug
19+
checkpoint@checkpoint_feat=bestTrainLoss
20+
rate=H_hyper
21+
trainer.max_epochs=100
22+
rate.kwargs.warmup_k_epoch=5
23+
$add_kwargs
24+
"
25+
26+
27+
# every arguments that you are sweeping over
28+
kwargs_multi="
29+
data@data_feat=mnist_aug
30+
seed=1
31+
"
32+
33+
if [ "$is_plot_only" = false ] ; then
34+
for kwargs_dep in "distortion=VIC featurizer.loss.beta=1e-5,1e-4,1e-3,1e-2,0.1,1" "distortion=BINCE featurizer.loss.beta=1e-7,1e-6,1e-5,1e-4,1e-3,1e-2"
35+
do
36+
37+
python "$main" +hydra.job.env_set.WANDB_NOTES="\"${notes}\"" $kwargs $kwargs_multi $kwargs_dep -m &
38+
39+
sleep 3
40+
41+
done
42+
fi
43+
44+
45+
wait
46+
47+
48+
col_val_subset=""
49+
rate_cols="['test/feat/rate']"
50+
distortion_cols="['test/feat/distortion','test/feat/online_loss','test/feat/online_err','test/pred/loss','test/pred/err']"
51+
compare="datafeat"
52+
data="merged" # want to access both ther featurizer data and the predictor data
53+
python utils/aggregate.py \
54+
experiment=$experiment \
55+
$col_val_subset \
56+
+plot_all_RD_curves.folder_col="dist" \
57+
+plot_all_RD_curves.data="${data}" \
58+
+plot_all_RD_curves.rate_cols="${rate_cols}" \
59+
+plot_all_RD_curves.distortion_cols="${distortion_cols}" \
60+
+plot_all_RD_curves.hue=$compare \
61+
+plot_all_RD_curves.plot_config_kwargs.font_scale=1 \
62+
+summarize_RD_curves.data="${data}" \
63+
+summarize_RD_curves.rate_cols="${rate_cols}" \
64+
+summarize_RD_curves.distortion_cols="${distortion_cols}" \
65+
+summarize_RD_curves.mse_cols="${distortion_cols}" \
66+
agg_mode=[summarize_metrics,plot_all_RD_curves,summarize_RD_curves]
67+
68+
69+
col_val_subset=""
70+
rate_cols="['test/feat/rate']"
71+
distortion_cols="['test/pred/err']"
72+
compare="datafeat"
73+
data="merged" # want to access both ther featurizer data and the predictor data
74+
python utils/aggregate.py \
75+
experiment=$experiment \
76+
$col_val_subset \
77+
kwargs.prfx="single" \
78+
+plot_all_RD_curves.folder_col="dist" \
79+
+plot_all_RD_curves.data="${data}" \
80+
+plot_all_RD_curves.rate_cols="${rate_cols}" \
81+
+plot_all_RD_curves.distortion_cols="${distortion_cols}" \
82+
+plot_all_RD_curves.hue=$compare \
83+
+plot_all_RD_curves.plot_config_kwargs.font_scale=1 \
84+
agg_mode=[plot_all_RD_curves]

bin/mnist/augmnist_stag_step1.sh

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
#!/usr/bin/env bash
2+
3+
experiment="augmnist_stag_step1"
4+
notes="
5+
**Goal**: Understand effect of using staggered VS end to end for compression
6+
"
7+
8+
# parses special mode for running the script
9+
source `dirname $0`/../utils.sh
10+
11+
SCRIPT=`realpath $0`
12+
SCRIPTPATH=`dirname $SCRIPT`
13+
pretrained_path="$SCRIPTPATH"/../../pretrained
14+
15+
# define all the arguments modified or added to `conf`. If they are added use `+`
16+
kwargs="
17+
experiment=$experiment
18+
timeout=$time
19+
is_only_feat=True
20+
featurizer=neural_feat
21+
architecture@encoder=resnet18
22+
data@data_pred=mnist_aug
23+
checkpoint@checkpoint_feat=bestTrainLoss
24+
trainer.max_epochs=100
25+
featurizer.loss.beta=1
26+
distortion.factor_beta=1
27+
rate.factor_beta=1
28+
rate=lossless
29+
$add_kwargs
30+
"
31+
32+
# every arguments that you are sweeping over
33+
kwargs_multi="
34+
data@data_feat=mnist_aug
35+
seed=1
36+
"
37+
38+
39+
if [ "$is_plot_only" = false ] ; then
40+
for dist in "VIC" "BINCE"
41+
do
42+
43+
python "$main" +hydra.job.env_set.WANDB_NOTES="\"${notes}\"" $kwargs $kwargs_multi distortion=$dist paths.pretrained.staggered=$pretrained_path/lossless/$dist -m &
44+
45+
sleep 3
46+
47+
done
48+
fi
49+
50+
51+
52+

bin/mnist/augmnist_stag_step2.sh

Lines changed: 61 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,61 @@
1+
#!/usr/bin/env bash
2+
3+
experiment="augmnist_stag_step2"
4+
notes="
5+
**Goal**: Understand effect of using staggered VS end to end for compression
6+
"
7+
8+
# parses special mode for running the script
9+
source `dirname $0`/../utils.sh
10+
11+
SCRIPT=`realpath $0`
12+
SCRIPTPATH=`dirname $SCRIPT`
13+
pretrained_path="$SCRIPTPATH"/../../pretrained
14+
15+
# define all the arguments modified or added to `conf`. If they are added use `+`
16+
kwargs="
17+
experiment=$experiment
18+
timeout=$time
19+
is_only_feat=False
20+
featurizer=neural_feat
21+
architecture@encoder=resnet18
22+
data@data_pred=mnist_aug
23+
checkpoint@checkpoint_feat=bestTrainLoss
24+
trainer.max_epochs=50
25+
+update_trainer_pred.max_epochs=100
26+
featurizer.loss.beta=1
27+
distortion.factor_beta=1
28+
rate.factor_beta=1
29+
rate=H_hyper
30+
rate.kwargs.is_endToEnd=False
31+
finetune=freezer
32+
distortion=lossy_Z
33+
scheduler@scheduler_feat=unifmultistep1000
34+
scheduler@scheduler_coder=unifmultistep1000
35+
$add_kwargs
36+
"
37+
38+
# every arguments that you are sweeping over
39+
kwargs_multi="
40+
data@data_feat=mnist_aug
41+
seed=1
42+
featurizer.loss.beta=1e-2
43+
"
44+
#VIC
45+
# beta should now have no impact. What is important is the weight
46+
47+
48+
if [ "$is_plot_only" = false ] ; then
49+
for dist in "VIC" "BINCE"
50+
do
51+
52+
python "$main" +hydra.job.env_set.WANDB_NOTES="\"${notes}\"" $kwargs $kwargs_multi paths.pretrained.staggered=$pretrained_path/lossless/$dist -m &
53+
54+
sleep 3
55+
56+
done
57+
fi
58+
59+
60+
61+

0 commit comments

Comments
 (0)