bencher.results.optuna_result

Module Contents

Classes

OptunaResult

Functions

convert_dataset_bool_dims_to_str(→ xarray.Dataset)

Given a dataarray that contains boolean coordinates, conver them to strings so that holoviews loads the data properly

bencher.results.optuna_result.convert_dataset_bool_dims_to_str(dataset: xarray.Dataset) xarray.Dataset

Given a dataarray that contains boolean coordinates, conver them to strings so that holoviews loads the data properly

Parameters:

dataarray (xr.DataArray) – dataarray with boolean coordinates

Returns:

dataarray with boolean coordinates converted to strings

Return type:

xr.DataArray

class bencher.results.optuna_result.OptunaResult(bench_cfg: bencher.bench_cfg.BenchCfg)
post_setup()
to_xarray() xarray.Dataset
setup_object_index()
to_pandas(reset_index=True) pandas.DataFrame

Get the xarray results as a pandas dataframe

Returns:

The xarray results array as a pandas dataframe

Return type:

pd.DataFrame

wrap_long_time_labels(bench_cfg)

Takes a benchCfg and wraps any index labels that are too long to be plotted easily

Parameters:

bench_cfg (BenchCfg) –

Returns:

updated config with wrapped labels

Return type:

BenchCfg

to_optuna_plots() List[panel.pane.panel]

Create an optuna summary from the benchmark results

Returns:

A list of optuna plot summarising the benchmark process

Return type:

List[pn.pane.panel]

to_optuna_from_sweep(bench, n_trials=30)
to_optuna_from_results(worker, n_trials=100, extra_results: List[OptunaResult] = None, sampler=optuna.samplers.TPESampler())
bench_results_to_optuna_trials(include_meta: bool = True) optuna.Study

Convert an xarray dataset to an optuna study so optuna can further optimise or plot the statespace

Parameters:

bench_cfg (BenchCfg) – benchmark config to convert

Returns:

optuna description of the study

Return type:

optuna.Study

bench_result_to_study(include_meta: bool) optuna.Study
get_best_trial_params(canonical=False)
get_pareto_front_params()
collect_optuna_plots() List[panel.pane.panel]

Use optuna to plot various summaries of the optimisation

Parameters:
  • study (optuna.Study) – The study to plot

  • bench_cfg (BenchCfg) – Benchmark config with options used to generate the study

Returns:

A list of plots

Return type:

List[pn.pane.Pane]

deep() OptunaResult

Return a deep copy of these results

set_plot_size(**kwargs) dict