Skip to content

Commit d4372ac

Browse files
committed
Provide a collection of experiment setups working with the tmux pipeline to reproduce the paper results.
Fixs #4
1 parent 92934f5 commit d4372ac

File tree

6 files changed

+585
-0
lines changed

6 files changed

+585
-0
lines changed

exps/cifar100c.py

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
class NewConf(object):
2+
# create the list of hyper-parameters to be replaced.
3+
to_be_replaced = dict(
4+
# general for world.
5+
seed=[2022, 2023, 2024],
6+
main_file=[
7+
"run_exp.py",
8+
],
9+
job_name=[
10+
"cifar100c_episodic_oracle_model_selection",
11+
# "cifar100c_online_last_iterate",
12+
],
13+
base_data_name=[
14+
"cifar100",
15+
],
16+
data_names=[
17+
"cifar100_c_deterministic-gaussian_noise-5",
18+
"cifar100_c_deterministic-shot_noise-5",
19+
"cifar100_c_deterministic-impulse_noise-5",
20+
"cifar100_c_deterministic-defocus_blur-5",
21+
"cifar100_c_deterministic-glass_blur-5",
22+
"cifar100_c_deterministic-motion_blur-5",
23+
"cifar100_c_deterministic-zoom_blur-5",
24+
"cifar100_c_deterministic-snow-5",
25+
"cifar100_c_deterministic-frost-5",
26+
"cifar100_c_deterministic-fog-5",
27+
"cifar100_c_deterministic-brightness-5",
28+
"cifar100_c_deterministic-contrast-5",
29+
"cifar100_c_deterministic-elastic_transform-5",
30+
"cifar100_c_deterministic-pixelate-5",
31+
"cifar100_c_deterministic-jpeg_compression-5",
32+
],
33+
model_name=[
34+
"resnet26",
35+
],
36+
model_adaptation_method=[
37+
# "no_adaptation",
38+
"tent",
39+
# "bn_adapt",
40+
# "t3a",
41+
# "memo",
42+
# "shot",
43+
# "ttt",
44+
# "note",
45+
# "sar",
46+
# "conjugate_pl",
47+
# "cotta",
48+
# "eata",
49+
],
50+
model_selection_method=[
51+
"oracle_model_selection",
52+
# "last_iterate",
53+
],
54+
offline_pre_adapt=[
55+
"false",
56+
],
57+
data_wise=["batch_wise"],
58+
batch_size=[64],
59+
episodic=[
60+
# "false",
61+
"true",
62+
],
63+
inter_domain=["HomogeneousNoMixture"],
64+
non_iid_ness=[0.1],
65+
non_iid_pattern=["class_wise_over_domain"],
66+
python_path=["/opt/conda/bin/python"],
67+
data_path=["/run/determined/workdir/data/"],
68+
ckpt_path=[
69+
"./data/pretrained_ckpts/classification/resnet26_with_head/cifar100/rn26_bn.pth",
70+
],
71+
# oracle_model_selection
72+
lr_grid=[
73+
[1e-3],
74+
[5e-4],
75+
[1e-4],
76+
],
77+
n_train_steps=[50],
78+
# last_iterate
79+
# lr=[
80+
# 5e-3,
81+
# 1e-3,
82+
# 5e-4,
83+
# ],
84+
# n_train_steps=[
85+
# 1,
86+
# 2,
87+
# 3,
88+
# ],
89+
intra_domain_shuffle=["true"],
90+
record_preadapted_perf=["true"],
91+
device=[
92+
"cuda:0",
93+
],
94+
gradient_checkpoint=["false"],
95+
)

exps/cifar10_1.py

+81
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
class NewConf(object):
2+
# create the list of hyper-parameters to be replaced.
3+
to_be_replaced = dict(
4+
# general for world.
5+
seed=[2022, 2023, 2024],
6+
main_file=[
7+
"run_exp.py",
8+
],
9+
job_name=[
10+
"cifar10_1_episodic_oracle_model_selection",
11+
# "cifar10_1_online_last_iterate",
12+
],
13+
base_data_name=[
14+
"cifar10",
15+
],
16+
data_names=[
17+
"cifar10_1",
18+
],
19+
model_name=[
20+
"resnet26",
21+
],
22+
model_adaptation_method=[
23+
# "no_adaptation",
24+
"tent",
25+
# "bn_adapt",
26+
# "t3a",
27+
# "memo",
28+
# "shot",
29+
# "ttt",
30+
# "note",
31+
# "sar",
32+
# "conjugate_pl",
33+
# "cotta",
34+
# "eata",
35+
],
36+
model_selection_method=[
37+
"oracle_model_selection",
38+
# "last_iterate",
39+
],
40+
offline_pre_adapt=[
41+
"false",
42+
],
43+
data_wise=["batch_wise"],
44+
batch_size=[64],
45+
episodic=[
46+
# "false",
47+
"true",
48+
],
49+
inter_domain=["HomogeneousNoMixture"],
50+
non_iid_ness=[0.1],
51+
non_iid_pattern=["class_wise_over_domain"],
52+
python_path=["/opt/conda/bin/python"],
53+
data_path=["/run/determined/workdir/data/"],
54+
ckpt_path=[
55+
"./data/pretrained_ckpts/classification/resnet26_with_head/cifar10/rn26_bn.pth",
56+
],
57+
# oracle_model_selection
58+
lr_grid=[
59+
[1e-3],
60+
[5e-4],
61+
[1e-4],
62+
],
63+
n_train_steps=[50],
64+
# last_iterate
65+
# lr=[
66+
# 5e-3,
67+
# 1e-3,
68+
# 5e-4,
69+
# ],
70+
# n_train_steps=[
71+
# 1,
72+
# 2,
73+
# 3,
74+
# ],
75+
intra_domain_shuffle=["true"],
76+
record_preadapted_perf=["true"],
77+
device=[
78+
"cuda:0",
79+
],
80+
gradient_checkpoint=["false"],
81+
)

exps/cifar10c.py

+95
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
class NewConf(object):
2+
# create the list of hyper-parameters to be replaced.
3+
to_be_replaced = dict(
4+
# general for world.
5+
seed=[2022, 2023, 2024],
6+
main_file=[
7+
"run_exp.py",
8+
],
9+
job_name=[
10+
"cifar10c_episodic_oracle_model_selection",
11+
# "cifar10c_online_last_iterate",
12+
],
13+
base_data_name=[
14+
"cifar10",
15+
],
16+
data_names=[
17+
"cifar10_c_deterministic-gaussian_noise-5",
18+
"cifar10_c_deterministic-shot_noise-5",
19+
"cifar10_c_deterministic-impulse_noise-5",
20+
"cifar10_c_deterministic-defocus_blur-5",
21+
"cifar10_c_deterministic-glass_blur-5",
22+
"cifar10_c_deterministic-motion_blur-5",
23+
"cifar10_c_deterministic-zoom_blur-5",
24+
"cifar10_c_deterministic-snow-5",
25+
"cifar10_c_deterministic-frost-5",
26+
"cifar10_c_deterministic-fog-5",
27+
"cifar10_c_deterministic-brightness-5",
28+
"cifar10_c_deterministic-contrast-5",
29+
"cifar10_c_deterministic-elastic_transform-5",
30+
"cifar10_c_deterministic-pixelate-5",
31+
"cifar10_c_deterministic-jpeg_compression-5",
32+
],
33+
model_name=[
34+
"resnet26",
35+
],
36+
model_adaptation_method=[
37+
# "no_adaptation",
38+
"tent",
39+
# "bn_adapt",
40+
# "t3a",
41+
# "memo",
42+
# "shot",
43+
# "ttt",
44+
# "note",
45+
# "sar",
46+
# "conjugate_pl",
47+
# "cotta",
48+
# "eata",
49+
],
50+
model_selection_method=[
51+
"oracle_model_selection",
52+
# "last_iterate",
53+
],
54+
offline_pre_adapt=[
55+
"false",
56+
],
57+
data_wise=["batch_wise"],
58+
batch_size=[64],
59+
episodic=[
60+
# "false",
61+
"true",
62+
],
63+
inter_domain=["HomogeneousNoMixture"],
64+
non_iid_ness=[0.1],
65+
non_iid_pattern=["class_wise_over_domain"],
66+
python_path=["/home/ttab/anaconda3/envs/test_algo/bin/python"],
67+
data_path=["./datasets/"],
68+
ckpt_path=[
69+
"./data/pretrained_ckpts/classification/resnet26_with_head/cifar10/rn26_bn.pth",
70+
],
71+
# oracle_model_selection
72+
lr_grid=[
73+
[1e-3],
74+
[5e-4],
75+
[1e-4],
76+
],
77+
n_train_steps=[10],
78+
# last_iterate
79+
# lr=[
80+
# 5e-3,
81+
# 1e-3,
82+
# 5e-4,
83+
# ],
84+
# n_train_steps=[
85+
# 1,
86+
# 2,
87+
# 3,
88+
# ],
89+
intra_domain_shuffle=["true"],
90+
record_preadapted_perf=["true"],
91+
device=[
92+
"cuda:0",
93+
],
94+
gradient_checkpoint=["false"],
95+
)

exps/imagenet-c.py

+102
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,102 @@
1+
class NewConf(object):
2+
# create the list of hyper-parameters to be replaced.
3+
to_be_replaced = dict(
4+
# general for world.
5+
seed=[2022, 2023, 2024],
6+
main_file=[
7+
"run_exp.py",
8+
],
9+
job_name=[
10+
"imagenet_c_episodic_oracle_model_selection",
11+
# "imagenet_c_online_last_iterate",
12+
],
13+
base_data_name=[
14+
"imagenet",
15+
],
16+
data_names=[
17+
"imagenet_c_deterministic-gaussian_noise-5",
18+
"imagenet_c_deterministic-shot_noise-5",
19+
"imagenet_c_deterministic-impulse_noise-5",
20+
"imagenet_c_deterministic-defocus_blur-5",
21+
"imagenet_c_deterministic-glass_blur-5",
22+
"imagenet_c_deterministic-motion_blur-5",
23+
"imagenet_c_deterministic-zoom_blur-5",
24+
"imagenet_c_deterministic-snow-5",
25+
"imagenet_c_deterministic-frost-5",
26+
"imagenet_c_deterministic-fog-5",
27+
"imagenet_c_deterministic-brightness-5",
28+
"imagenet_c_deterministic-contrast-5",
29+
"imagenet_c_deterministic-elastic_transform-5",
30+
"imagenet_c_deterministic-pixelate-5",
31+
"imagenet_c_deterministic-jpeg_compression-5",
32+
],
33+
model_name=[
34+
"resnet50",
35+
],
36+
model_adaptation_method=[
37+
# "no_adaptation",
38+
"tent",
39+
# "bn_adapt",
40+
# "t3a",
41+
# "memo",
42+
# "shot",
43+
# "ttt",
44+
# "note",
45+
# "sar",
46+
# "conjugate_pl",
47+
# "cotta",
48+
# "eata",
49+
],
50+
model_selection_method=[
51+
"oracle_model_selection",
52+
# "last_iterate",
53+
],
54+
offline_pre_adapt=[
55+
"false",
56+
],
57+
data_wise=["batch_wise"],
58+
batch_size=[64],
59+
episodic=[
60+
# "false",
61+
"true",
62+
],
63+
inter_domain=["HomogeneousNoMixture"],
64+
non_iid_ness=[0.1],
65+
non_iid_pattern=["class_wise_over_domain"],
66+
python_path=["/opt/conda/bin/python"],
67+
data_path=["/run/determined/workdir/data/"],
68+
ckpt_path=[
69+
"./data/pretrained_ckpts/classification/resnet26_with_head/cifar10/rn26_bn.pth", # Since ttab will automatically download the pretrained model from torchvision or huggingface, what ckpt_path is here does not matter.
70+
],
71+
# oracle_model_selection
72+
lr_grid=[
73+
[1e-3],
74+
[5e-4],
75+
[1e-4],
76+
],
77+
n_train_steps=[10],
78+
# last_iterate
79+
# lr=[
80+
# 5e-3,
81+
# 1e-3,
82+
# 5e-4,
83+
# ],
84+
# n_train_steps=[
85+
# 1,
86+
# 2,
87+
# 3,
88+
# ],
89+
intra_domain_shuffle=["true"],
90+
record_preadapted_perf=["true"],
91+
device=[
92+
"cuda:0",
93+
"cuda:1",
94+
"cuda:2",
95+
"cuda:3",
96+
"cuda:4",
97+
"cuda:5",
98+
"cuda:6",
99+
"cuda:7",
100+
],
101+
gradient_checkpoint=["false"],
102+
)

0 commit comments

Comments
 (0)