Remove optuna default values (#235)
* Remove some of the optuna default values * Add more explanatory comments in mnist_optuna.yaml
This commit is contained in:
1 parent
d25db15ad5
commit
fb7c206889
1 file changed
+14
-14
@@ -1,7 +1,7 @@
|
|||||||
# @package _global_
|
# @package _global_
|
||||||
|
|
||||||
# example hyperparameter optimization of some experiment with Optuna:
|
# example hyperparameter optimization of some experiment with Optuna:
|
||||||
# python train.py -m hparams_search=mnist_optuna experiment=example_simple hydra.sweeper.n_trials=30
|
# python train.py -m hparams_search=mnist_optuna experiment=example
|
||||||
|
|
||||||
defaults:
|
defaults:
|
||||||
- override /hydra/sweeper: optuna
|
- override /hydra/sweeper: optuna
|
||||||
@@ -10,35 +10,35 @@ defaults:
|
|||||||
# make sure this is the correct name of some metric logged in lightning module!
|
# make sure this is the correct name of some metric logged in lightning module!
|
||||||
optimized_metric: "val/acc_best"
|
optimized_metric: "val/acc_best"
|
||||||
|
|
||||||
hydra:
|
|
||||||
# here we define Optuna hyperparameter search
|
# here we define Optuna hyperparameter search
|
||||||
# it optimizes for value returned from function with @hydra.main decorator
|
# it optimizes for value returned from function with @hydra.main decorator
|
||||||
# learn more here: https://hydra.cc/docs/next/plugins/optuna_sweeper
|
# docs: https://hydra.cc/docs/next/plugins/optuna_sweeper
|
||||||
|
hydra:
|
||||||
sweeper:
|
sweeper:
|
||||||
_target_: hydra_plugins.hydra_optuna_sweeper.optuna_sweeper.OptunaSweeper
|
_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
|
storage: null
|
||||||
|
|
||||||
|
# name of the study to persist optimization results
|
||||||
study_name: null
|
study_name: null
|
||||||
|
|
||||||
|
# number of parallel workers
|
||||||
n_jobs: 1
|
n_jobs: 1
|
||||||
|
|
||||||
# 'minimize' or 'maximize' the objective
|
# 'minimize' or 'maximize' the objective
|
||||||
direction: maximize
|
direction: maximize
|
||||||
|
|
||||||
# number of experiments that will be executed
|
# total number of runs that will be executed
|
||||||
n_trials: 20
|
n_trials: 25
|
||||||
|
|
||||||
# choose Optuna hyperparameter sampler
|
# choose Optuna hyperparameter sampler
|
||||||
# learn more here: https://optuna.readthedocs.io/en/stable/reference/samplers.html
|
# docs: https://optuna.readthedocs.io/en/stable/reference/samplers.html
|
||||||
sampler:
|
sampler:
|
||||||
_target_: optuna.samplers.TPESampler
|
_target_: optuna.samplers.TPESampler
|
||||||
seed: 12345
|
seed: 12345
|
||||||
consider_prior: true
|
n_startup_trials: 10 # number of random sampling runs before optimization starts
|
||||||
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
|
# define range of hyperparameters
|
||||||
search_space:
|
search_space:
|
||||||
|
|||||||
Reference in new issue
Block a user