bencher.optuna_conversions
Module Contents
Functions
|
use optuna to perform a grid search |
|
|
|
Given a trial produce a string summary of the best results |
Convert a sweep var to an optuna distribution |
|
|
Converts from a sweep var to an optuna |
|
Summarise an optuna study in a panel format |
- bencher.optuna_conversions.optuna_grid_search(bench_cfg: bencher.bench_cfg.BenchCfg) optuna.Study
use optuna to perform a grid search
- Parameters:
bench_cfg (BenchCfg) – setting for grid search
- Returns:
results of grid search
- Return type:
optuna.Study
- bencher.optuna_conversions.param_importance(bench_cfg: bencher.bench_cfg.BenchCfg, study: optuna.Study) panel.Row
- bencher.optuna_conversions.summarise_trial(trial: optuna.trial, bench_cfg: bencher.bench_cfg.BenchCfg) List[str]
Given a trial produce a string summary of the best results
- Parameters:
trial (optuna.trial) – trial to summarise
bench_cfg (BenchCfg) – info about the trial
- Returns:
Summary of trial
- Return type:
List[str]
- bencher.optuna_conversions.sweep_var_to_optuna_dist(var: param.Parameter) optuna.distributions.BaseDistribution
Convert a sweep var to an optuna distribution
- Parameters:
var (param.Parameter) – A sweep var
- Raises:
ValueError – Unsupported var type
- Returns:
Optuna representation of a sweep var
- Return type:
optuna.distributions.BaseDistribution
- bencher.optuna_conversions.sweep_var_to_suggest(iv: bencher.variables.parametrised_sweep.ParametrizedSweep, trial: optuna.trial) object
Converts from a sweep var to an optuna
- Parameters:
iv (ParametrizedSweep) – A parametrized sweep input variable
trial (optuna.trial) – Optuna trial used to define the sample
- Raises:
ValueError – Unsupported var type
- Returns:
A sampled variable (can be any type)
- Return type:
Any
- bencher.optuna_conversions.cfg_from_optuna_trial(trial: optuna.trial, bench_cfg: bencher.bench_cfg.BenchCfg, cfg_type: bencher.variables.parametrised_sweep.ParametrizedSweep) bencher.variables.parametrised_sweep.ParametrizedSweep
- bencher.optuna_conversions.summarise_optuna_study(study: optuna.study.Study) panel.pane.panel
Summarise an optuna study in a panel format