Skip to content

Commit

Permalink
refactor: convert sweep config to split format per model #16
Browse files Browse the repository at this point in the history
  • Loading branch information
GangBean committed May 23, 2024
1 parent c46a4a3 commit f3162a1
Show file tree
Hide file tree
Showing 3 changed files with 43 additions and 1 deletion.
24 changes: 24 additions & 0 deletions configs/cdae_sweep_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# CDAE
sweep_count: 100
method: grid # grid, random, bayes
name: cdae_grid_sweep
metric:
goal: minimize # minimize, maximize
name: valid_loss # valid_MAP@K
parameters:
# batch_size: ##########[COMMON]###############
# values: [16, 32, 64]
# lr:
# values: [1e-1, 1e-3, 1e-4, 1e-5]
# optimizer:
# values: [adam, adamw]
# weight_decay:
# values: [1e-1, 1e-3, 1e-5]
neg_times: ###########[MODEL]###############
values: [1, 5, 10]
hidden_size:
values: [32, 64, 128, 256, 512, 1024]
corruption_level:
values: [.1, .3, .4, .5, .6, .9]
hidden_activation:
values: [sigmoid, identity]
18 changes: 18 additions & 0 deletions configs/mf_sweep_config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# CDAE
sweep_count: 100
method: grid # grid, random, bayes
name: mf_grid_sweep
metric:
goal: minimize
name: valid_loss
parameters:
# batch_size: ##########[COMMON]###############
# values: [16, 32, 64]
# lr:
# values: [1e-1, 1e-3, 1e-4, 1e-5]
optimizer:
values: [adam, adamw]
# weight_decay:
# values: [1e-1, 1e-3, 1e-5]
embed_size: ###########[MODEL]###############
values: [32, 64, 128, 256, 512, 1024]
2 changes: 1 addition & 1 deletion train.py
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@ def main(cfg: OmegaConf):
})

if cfg.wandb and cfg.sweep:
sweep_cfg = OmegaConf.load('configs/sweep_config.yaml')
sweep_cfg = OmegaConf.load(f'configs/{cfg.model_name.lower()}_sweep_config.yaml')
merge_cfg = OmegaConf.create({})
merge_cfg.update(cfg)
merge_cfg.update(sweep_cfg)
Expand Down

0 comments on commit f3162a1

Please sign in to comment.