Dev (#125)
* add conference badges * change TestDataset to ImgDataset * update conda env * bump package versions * update README * move optuna config to subfolder
This commit is contained in:
1 parent
296c5bf5ed
commit
e27c11c342
8 files changed
+95
-87
No files matched your search
+5
-2
@@ -8,9 +8,12 @@ defaults:
|
||||
- callbacks: default_callbacks.yaml # set this to null if you don't want to use callbacks
|
||||
- logger: null # set logger here or use command line (e.g. `python run.py logger=wandb`)
|
||||
|
||||
- experiment: null
|
||||
- hparams_search: null
|
||||
|
||||
# enable color logging
|
||||
# - override hydra/hydra_logging: colorlog
|
||||
# - override hydra/job_logging: colorlog
|
||||
- override hydra/hydra_logging: colorlog
|
||||
- override hydra/job_logging: colorlog
|
||||
|
||||
|
||||
# path to original working directory
|
||||
|
||||
@@ -1,56 +0,0 @@
|
||||
# @package _global_
|
||||
|
||||
# example hyperparameter optimization of some experiment with optuna:
|
||||
# python run.py -m --config-name config_optuna.yaml +experiment=exp_example_simple logger=wandb
|
||||
|
||||
defaults:
|
||||
# load everything from main config file
|
||||
- config.yaml
|
||||
|
||||
# override sweeper to Optuna!
|
||||
- override hydra/sweeper: optuna
|
||||
|
||||
|
||||
# choose metric which will be optimized by optuna
|
||||
optimized_metric: "val/acc_best"
|
||||
|
||||
|
||||
hydra:
|
||||
# here we define Optuna hyperparameter search
|
||||
# it optimizes for value returned from function with @hydra.main decorator
|
||||
# learn more here: https://hydra.cc/docs/next/plugins/optuna_sweeper
|
||||
sweeper:
|
||||
optuna_config:
|
||||
study_name: null
|
||||
storage: null
|
||||
n_jobs: 1
|
||||
seed: 12345
|
||||
|
||||
# 'minimize' or 'maximize' the objective
|
||||
direction: maximize
|
||||
|
||||
# number of experiments that will be executed
|
||||
n_trials: 20
|
||||
|
||||
# choose optuna hyperparameter sampler ('tpe', 'random', 'cmaes' or 'nsgaii', 'motpe')
|
||||
# learn more here: https://optuna.readthedocs.io/en/stable/reference/samplers.html
|
||||
sampler: tpe
|
||||
|
||||
# define range of hyperparameters
|
||||
search_space:
|
||||
datamodule.batch_size:
|
||||
type: categorical
|
||||
choices: [32, 64, 128]
|
||||
model.lr:
|
||||
type: float
|
||||
low: 0.0001
|
||||
high: 0.2
|
||||
model.lin1_size:
|
||||
type: categorical
|
||||
choices: [32, 64, 128, 256, 512]
|
||||
model.lin2_size:
|
||||
type: categorical
|
||||
choices: [32, 64, 128, 256, 512]
|
||||
model.lin3_size:
|
||||
type: categorical
|
||||
choices: [32, 64, 128, 256, 512]
|
||||
@@ -0,0 +1,63 @@
|
||||
# @package _global_
|
||||
|
||||
# example hyperparameter optimization of some experiment with Optuna:
|
||||
# python run.py -m hparams_search=mnist_optuna experiment=exp_example_simple
|
||||
# python run.py -m hparams_search=mnist_optuna experiment=exp_example_simple hydra.sweeper.n_trials=30
|
||||
# python run.py -m hparams_search=mnist_optuna experiment=exp_example_simple logger=wandb
|
||||
|
||||
defaults:
|
||||
- override /hydra/sweeper: optuna
|
||||
|
||||
|
||||
# choose metric which will be optimized by Optuna
|
||||
optimized_metric: "val/acc_best"
|
||||
|
||||
|
||||
hydra:
|
||||
# here we define Optuna hyperparameter search
|
||||
# it optimizes for value returned from function with @hydra.main decorator
|
||||
# learn more here: https://hydra.cc/docs/next/plugins/optuna_sweeper
|
||||
sweeper:
|
||||
_target_: hydra_plugins.hydra_optuna_sweeper.optuna_sweeper.OptunaSweeper
|
||||
storage: null
|
||||
study_name: null
|
||||
n_jobs: 1
|
||||
|
||||
# 'minimize' or 'maximize' the objective
|
||||
direction: maximize
|
||||
|
||||
# number of experiments that will be executed
|
||||
n_trials: 20
|
||||
|
||||
# choose Optuna hyperparameter sampler
|
||||
# learn more here: https://optuna.readthedocs.io/en/stable/reference/samplers.html
|
||||
sampler:
|
||||
_target_: optuna.samplers.TPESampler
|
||||
seed: 12345
|
||||
consider_prior: true
|
||||
prior_weight: 1.0
|
||||
consider_magic_clip: true
|
||||
consider_endpoints: false
|
||||
n_startup_trials: 10
|
||||
n_ei_candidates: 24
|
||||
multivariate: false
|
||||
warn_independent_sampling: true
|
||||
|
||||
# define range of hyperparameters
|
||||
search_space:
|
||||
datamodule.batch_size:
|
||||
type: categorical
|
||||
choices: [32, 64, 128]
|
||||
model.lr:
|
||||
type: float
|
||||
low: 0.0001
|
||||
high: 0.2
|
||||
model.lin1_size:
|
||||
type: categorical
|
||||
choices: [32, 64, 128, 256, 512]
|
||||
model.lin2_size:
|
||||
type: categorical
|
||||
choices: [32, 64, 128, 256, 512]
|
||||
model.lin3_size:
|
||||
type: categorical
|
||||
choices: [32, 64, 128, 256, 512]
|
||||
Reference in new issue
Block a user