* add flake8 and prettier to pre-commit-config * add setup.cfg * add workers=True to seed_everything() * update lightning badge logo * bump package versions * update README.md * add __init__.py files * add more logger configs parameters * add default Dockerfile * change .env.template to .env.example * move inference example to readme * remove img_dataset.py * simplify names of wandb callbacks * remove wandb test marker * format files with prettier
62 lines
1.8 KiB
YAML
62 lines
1.8 KiB
YAML
# @package _global_
|
|
|
|
# example hyperparameter optimization of some experiment with Optuna:
|
|
# python run.py -m hparams_search=mnist_optuna experiment=example_simple
|
|
# python run.py -m hparams_search=mnist_optuna experiment=example_simple hydra.sweeper.n_trials=30
|
|
# python run.py -m hparams_search=mnist_optuna experiment=example_simple logger=wandb
|
|
|
|
defaults:
|
|
- override /hydra/sweeper: optuna
|
|
|
|
# choose metric which will be optimized by Optuna
|
|
optimized_metric: "val/acc"
|
|
|
|
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]
|