bencher.results.holoview_results.bar_result
Classes
A class for creating bar chart visualizations from benchmark results. |
Module Contents
- class bencher.results.holoview_results.bar_result.BarResult(bench_cfg: bencher.bench_cfg.BenchCfg)
Bases:
bencher.results.holoview_results.holoview_result.HoloviewResultA class for creating bar chart visualizations from benchmark results.
Bar charts are effective for comparing values across categorical variables or discrete data points. This class provides methods to generate bar charts that display benchmark results, particularly useful for comparing performance metrics between different configurations or categories.
- to_plot(result_var: param.Parameter | None = None, override: bool = True, **kwargs) panel.panel | None
- to_bar(result_var: param.Parameter | None = None, override: bool = True, target_dimension: int = 2, **kwargs) panel.panel | None
Generates a bar chart from benchmark data.
This method applies filters to ensure the data is appropriate for a bar chart and then passes the filtered data to to_bar_ds for rendering.
- Parameters:
result_var (Parameter, optional) – The result variable to plot. If None, uses the default.
override (bool, optional) – Whether to override filter restrictions. Defaults to True.
target_dimension (int, optional) – The target dimensionality for data filtering. Defaults to 2.
**kwargs – Additional keyword arguments passed to the plot rendering.
- Returns:
- A panel containing the bar chart if data is appropriate,
otherwise returns filter match results.
- Return type:
pn.panel | None
- to_bar_ds(dataset: xarray.Dataset, result_var: param.Parameter | None = None, **kwargs)
Creates a bar chart from the provided dataset.
Given a filtered dataset, this method generates a bar chart visualization showing values of the result variable, potentially grouped by categorical variables.
- Parameters:
dataset (xr.Dataset) – The dataset containing benchmark results.
result_var (Parameter, optional) – The result variable to plot. If None, uses the default.
**kwargs – Additional keyword arguments passed to the bar chart options.
- Returns:
A bar chart visualization of the benchmark data.
- Return type:
hvplot.element.Bars | hv.HoloMap