Skip to content

Commit fb7c206

Browse files
authored
Remove optuna default values (#235)
* Remove some of the optuna default values * Add more explanatory comments in mnist_optuna.yaml
1 parent d25db15 commit fb7c206

File tree

1 file changed

+15
-15
lines changed

1 file changed

+15
-15
lines changed

configs/hparams_search/mnist_optuna.yaml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
# @package _global_
22

33
# example hyperparameter optimization of some experiment with Optuna:
4-
# python train.py -m hparams_search=mnist_optuna experiment=example_simple hydra.sweeper.n_trials=30
4+
# python train.py -m hparams_search=mnist_optuna experiment=example
55

66
defaults:
77
- override /hydra/sweeper: optuna
@@ -10,35 +10,35 @@ defaults:
1010
# make sure this is the correct name of some metric logged in lightning module!
1111
optimized_metric: "val/acc_best"
1212

13+
# here we define Optuna hyperparameter search
14+
# it optimizes for value returned from function with @hydra.main decorator
15+
# docs: https://hydra.cc/docs/next/plugins/optuna_sweeper
1316
hydra:
14-
# here we define Optuna hyperparameter search
15-
# it optimizes for value returned from function with @hydra.main decorator
16-
# learn more here: https://hydra.cc/docs/next/plugins/optuna_sweeper
1717
sweeper:
1818
_target_: hydra_plugins.hydra_optuna_sweeper.optuna_sweeper.OptunaSweeper
19+
20+
# storage URL to persist optimization results
21+
# for example, you can use SQLite if you set 'sqlite:///example.db'
1922
storage: null
23+
24+
# name of the study to persist optimization results
2025
study_name: null
26+
27+
# number of parallel workers
2128
n_jobs: 1
2229

2330
# 'minimize' or 'maximize' the objective
2431
direction: maximize
2532

26-
# number of experiments that will be executed
27-
n_trials: 20
33+
# total number of runs that will be executed
34+
n_trials: 25
2835

2936
# choose Optuna hyperparameter sampler
30-
# learn more here: https://optuna.readthedocs.io/en/stable/reference/samplers.html
37+
# docs: https://optuna.readthedocs.io/en/stable/reference/samplers.html
3138
sampler:
3239
_target_: optuna.samplers.TPESampler
3340
seed: 12345
34-
consider_prior: true
35-
prior_weight: 1.0
36-
consider_magic_clip: true
37-
consider_endpoints: false
38-
n_startup_trials: 10
39-
n_ei_candidates: 24
40-
multivariate: false
41-
warn_independent_sampling: true
41+
n_startup_trials: 10 # number of random sampling runs before optimization starts
4242

4343
# define range of hyperparameters
4444
search_space:

0 commit comments

Comments
 (0)