Hyperparameter optimization#
Install the optional Optuna integration:
pip install 'easy-tpp[hpo]'
Use pipeline_config_id: hpo_runner_config with the same data and
experiment blocks as Training a Model and Configuring the Pipeline, then add a top-level hpo block:
hpo:
storage_uri: sqlite://hpo_test.db
is_continuous: false
framework_id: optuna
num_trials: 10
num_jobs: 1
From the repository root:
python examples/train_nhp_hpo.py --config_dir examples/configs/hpo_config.yaml --experiment_id NHP_train
The example calls Config.build_from_yaml_file, then
HyperTuner.build_from_config(config).run(). Trials construct their own
loaders, so a tuned batch size applies to that trial. See EasyTPP Hyper-parameter Optimization Modules
for the tuner interface and supported configuration.