Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

make benchm yaml work #481

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
113 changes: 49 additions & 64 deletions examples/benchmark/benchmark_blood_resnet.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,34 @@ startseed: 0
endseed: 5 # currently included


Shared params:
gamma_y:
min: 1e4
max: 2e5
step: 100
distribution: loguniform

zx_dim:
min: 0
max: 96
step: 32
distribution: uniform

zy_dim:
min: 32
max: 96
step: 32
distribution: uniform

zd_dim:
reference: zy_dim

# penalty weight for matching loss (Lambda in paper)
gamma_reg:
min: 0.01
max: 10
distribution: loguniform


domainlab_args:
# Domainlab arguments passed to each task.
Expand All @@ -36,66 +64,39 @@ diva: # name
# set nname_dom = nname when changing nname
npath_dom: examples/nets/resnet50domainbed.py

hyperparameters:
gamma_y:
min: 1e4
max: 2e5
step: 100
distribution: loguniform
shared:
- gamma_y
- zx_dim
- zy_dim
- zd_dim

hyperparameters:
gamma_d:
min: 1e4
max: 1e6
step: 10_000
distribution: loguniform

zx_dim:
min: 0
max: 96
step: 32
distribution: uniform

zy_dim:
min: 32
max: 96
step: 32
distribution: uniform

zd_dim:
reference: zy_dim

hduva: # name
aname: hduva

npath_topic_distrib_img2topic: examples/nets/resnet50domainbed.py
npath_encoder_sandwich_layer_img2h4zd: examples/nets/resnet50domainbed.py

hyperparameters:
# Same config as diva.
gamma_y:
min: 1e4
max: 2e5
step: 100
distribution: loguniform
shared:
- gamma_y
- zx_dim
- zy_dim
- zd_dim

zx_dim:
min: 0
max: 96
step: 32
distribution: uniform

zy_dim:
min: 32
max: 96
step: 32
distribution: uniform

zd_dim:
reference: zy_dim

matchdg: # name
aname: matchdg

shared:
- gamma_reg

hyperparameters:
# Total number of epochs for contrastive loss
epochs_ctr:
Expand All @@ -117,15 +118,12 @@ matchdg: # name
step: 1
distribution: uniform

# penalty weight for matching loss (Lambda in paper)
gamma_reg:
min: 0.01
max: 10
distribution: loguniform

jigen: # name
aname: jigen
grid_len: 3
shared:
- gamma_reg

hyperparameters:
# number of permutations
Expand All @@ -143,27 +141,22 @@ jigen: # name
max: 0.5
distribution: uniform

gamma_reg:
min: 0.01
max: 10
distribution: loguniform


dann: # name
aname: dann
shared:
- gamma_reg

hyperparameters:
gamma_reg:
min: 0.01
max: 10
distribution: loguniform

deepall: # name
aname: deepall


dial: # name
aname: deepall_dial
shared:
- gamma_reg

hyperparameters:
dial_steps_perturb:
Expand All @@ -182,18 +175,10 @@ dial: # name
max: 0.01
distribution: loguniform

gamma_reg:
min: 0.01
max: 10
distribution: loguniform

mldg: # name
aname: deepallmldg
shared: gamma_reg

hyperparameters:
gamma_reg:
min: 0.01
max: 10
distribution: loguniform


107 changes: 47 additions & 60 deletions examples/benchmark/benchmark_mnist.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -31,70 +31,71 @@ domainlab_args:
san_check: True


Shared params:
gamma_y:
min: 1e4
max: 2e5
step: 100
distribution: loguniform

zx_dim:
min: 0
max: 96
step: 32
distribution: uniform

zy_dim:
min: 32
max: 96
step: 32
distribution: uniform

zd_dim:
reference: zy_dim

# penalty weight for matching loss (Lambda in paper)
gamma_reg:
min: 0.01
max: 10
distribution: loguniform



Task1: # name
aname: diva
# set nname_dom = nname when changing nname
nname_dom: conv_bn_pool_2
shared:
- gamma_y
- zx_dim
- zy_dim
- zd_dim

hyperparameters:
gamma_y:
min: 1e4
max: 2e5
step: 100
distribution: loguniform

gamma_d:
min: 1e4
max: 1e6
step: 10_000
distribution: loguniform

zx_dim:
min: 0
max: 96
step: 32
distribution: uniform

zy_dim:
min: 32
max: 96
step: 32
distribution: uniform

zd_dim:
reference: zy_dim

Task2: # name
aname: hduva

nname_topic_distrib_img2topic: conv_bn_pool_2
nname_encoder_sandwich_layer_img2h4zd: conv_bn_pool_2

hyperparameters:
# Same config as diva.
gamma_y:
min: 1e4
max: 2e5
step: 100
distribution: loguniform

zx_dim:
min: 0
max: 96
step: 32
distribution: uniform

zy_dim:
min: 32
max: 96
step: 32
distribution: uniform
shared:
- gamma_y
- zx_dim
- zy_dim
- zd_dim

zd_dim:
reference: zy_dim

Task3: # name
aname: matchdg
shared:
- gamma_reg

hyperparameters:
# Total number of epochs for contrastive loss
Expand All @@ -117,15 +118,11 @@ Task3: # name
step: 1
distribution: uniform

# penalty weight for matching loss (Lambda in paper)
gamma_reg:
min: 0.01
max: 10
distribution: loguniform

Task4: # name
aname: jigen
grid_len: 3
shared: gamma_reg

hyperparameters:
# number of permutations
Expand All @@ -143,27 +140,20 @@ Task4: # name
max: 0.5
distribution: uniform

gamma_reg:
min: 0.01
max: 10
distribution: loguniform


Task5: # name
aname: dann
shared:
- gamma_reg

hyperparameters:
gamma_reg:
min: 0.01
max: 10
distribution: loguniform

Task6: # name
aname: deepall


Task7: # name
aname: deepall_dial
shared: gamma_reg

hyperparameters:
dial_steps_perturb:
Expand All @@ -182,7 +172,4 @@ Task7: # name
max: 0.01
distribution: loguniform

gamma_reg:
min: 0.01
max: 10
distribution: loguniform

Loading