0

I tried this tutorial but gives me this error Key 'optuna_config' not in 'OptunaSweeperConf' full_key: hydra.sweeper.optuna_config object_type=OptunaSweeperConf

why is this error?

this is my config.yaml

hydra:
  run:
dir: ./outputs/${model._target_}/${now:%Y-%m-%d}/${now:%H-%M-%S}
  sweeper:
optuna_config:
  direction: maximize
  study_name: mnist
  storage: null
  n_trials: 20
  n_jobs: 1
  sampler: tpe
  seed: 123

1 Answers1

0

It seems to be a version error, the structure of optuna sweeper changed in hydra 1.2.0 and optuna 2.10.1

this config worked for me I only had to add 'sampler to the structure'

hydra:
  run:
    dir: ./outputs/${model._target_}/${now:%Y-%m-%d}/${now:%H-%M-%S}
  sweeper:
    sampler:
      seed: 123
    direction: maximize
    study_name: sphere
    storage: null
    n_trials: 5
    n_jobs: 1