generated from ashleve/lightning-hydra-template
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathwidedeep_ft_transformer.yaml
53 lines (44 loc) · 1.67 KB
/
widedeep_ft_transformer.yaml
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
41
42
43
44
45
46
47
48
49
50
51
52
53
# @package _global_
defaults:
- override /hydra/sweeper: optuna
# here we define Optuna hyperparameter search
# it optimizes for value returned from function with @hydra.main decorator
# docs: https://hydra.cc/docs/plugins/optuna_sweeper/
hydra:
sweeper:
_target_: hydra_plugins.hydra_optuna_sweeper.optuna_sweeper.OptunaSweeper
# storage URL to persist optimization results
# for example, you can use SQLite if you set 'sqlite:///example.db'
storage: null
# name of the study to persist optimization results
study_name: null
# number of parallel workers
n_jobs: 1
# 'minimize' or 'maximize' the objective
direction: minimize
# total number of runs that will be executed
n_trials: 1000
# choose Optuna hyperparameter sampler
# docs: https://optuna.readthedocs.io/en/stable/reference/samplers/index.html
sampler:
_target_: optuna.samplers.TPESampler
seed: ${seed}
consider_prior: true
prior_weight: 1.0
consider_magic_clip: true
consider_endpoints: false
n_startup_trials: 50
n_ei_candidates: 10
multivariate: false
warn_independent_sampling: true
# define range of hyperparameters
params:
model.optimizer_lr: tag(log, interval(0.00001, 1))
model.optimizer_weight_decay: tag(log, interval(0.0000001, 0.001))
model.embed_dim: choice(32, 64, 128)
model.n_heads: choice(2, 4, 8, 16, 32)
model.n_blocks: choice(1, 2, 4, 8)
model.attn_dropout: interval(0.0, 0.3)
model.ff_dropout: interval(0.0, 0.3)
model.mlp_hidden_dims: choice([200, 100, 50, 1], [400,200,100,1], [200, 200, 200, 1])
model.mlp_dropout: interval(0.0, 0.3)