bencher.results.holoview_results.heatmap_result
Classes
A class for creating heatmap visualizations from benchmark results. |
Module Contents
- class bencher.results.holoview_results.heatmap_result.HeatmapResult(bench_cfg: bencher.bench_cfg.BenchCfg)
Bases:
bencher.results.holoview_results.holoview_result.HoloviewResultA class for creating heatmap visualizations from benchmark results.
Heatmaps are effective for visualizing the relationship between two input variables and a result variable by using color intensity to represent the result values. This class provides methods for generating interactive heatmaps that can display additional information when hovering over or selecting points on the heatmap.
- to_plot(**kwargs) panel.panel | None
Generates a heatmap visualization. See
to_heatmapfor parameters.
- to_heatmap(result_var: param.Parameter | None = None, tap_var=None, tap_container: panel.pane.panel = None, tap_container_direction: panel.Column | panel.Row | None = None, target_dimension=2, override: bool = True, use_tap: bool = _USE_TAP, **kwargs) panel.panel | None
Generates a heatmap visualization from benchmark data.
- Parameters:
result_var (Parameter, optional) – The result variable to plot.
tap_var – Variables to display when tapping on heatmap points.
tap_container (pn.pane.panel, optional) – Container to hold tapped information.
tap_container_direction (pn.Column | pn.Row, optional) – Layout direction for tap containers.
target_dimension (int, optional) – Target dimensionality. Defaults to 2.
override (bool, optional) – Whether to override filter restrictions. Defaults to True.
use_tap (bool, optional) – Whether to enable tap functionality.
**kwargs – Additional keyword arguments passed to the plot rendering.
- Returns:
A panel containing the heatmap, or filter match results.
- Return type:
pn.panel | None
- _pick_xy_axes() tuple[str, str]
Pick x/y axis names, preferring float vars then falling back to cat vars.
- to_heatmap_ds(dataset: xarray.Dataset, result_var: param.Parameter, **kwargs) holoviews.HeatMap | holoviews.HoloMap | None
Creates a basic heatmap from the provided dataset.
When over_time is active with multiple time points, creates an hv.HoloMap with a slider.
- Parameters:
dataset (xr.Dataset) – The dataset containing benchmark results.
result_var (Parameter) – The result variable to plot.
**kwargs – Additional keyword arguments passed to the heatmap options.
- Returns:
- A heatmap visualization, or None if
the dataset has fewer than 2 dimensions.
- Return type:
hv.HeatMap | hv.HoloMap | None
- _to_heatmap_tap_ds(dataset: xarray.Dataset, result_var: param.Parameter, result_var_plots: list[param.Parameter] | None = None, container: panel.pane.panel = None, tap_container_direction: panel.Column | panel.Row | None = None, **kwargs) panel.Row
Creates an interactive heatmap with tap functionality.
- Parameters:
dataset (xr.Dataset) – The dataset containing benchmark results.
result_var (Parameter) – The primary result variable to plot.
result_var_plots (list[Parameter], optional) – Additional result variables to display when a point is tapped.
container (pn.pane.panel, optional) – Container to display tapped information.
tap_container_direction (pn.Column | pn.Row, optional) – Layout direction for tap containers.
**kwargs – Additional keyword arguments passed to the heatmap options.
- Returns:
A panel row containing the interactive heatmap and tap info.
- Return type:
pn.Row
- to_heatmap_tap(result_var: param.Parameter, reduce: bencher.results.bench_result_base.ReduceType = ReduceType.AUTO, width=800, height=800, **kwargs)
Creates a tappable heatmap that shows details when tapped.
Uses
hv.streams.Tapfor static click coordinates rather than PointerXY hover tracking.- Parameters:
result_var (Parameter) – The result variable to plot.
reduce (ReduceType, optional) – How to reduce the data. Defaults to ReduceType.AUTO.
width (int, optional) – Width of the plot in pixels. Defaults to 800.
height (int, optional) – Height of the plot in pixels. Defaults to 800.
**kwargs – Additional keyword arguments.
- Returns:
A layout containing the heatmap and a dynamically updated detail view.
- Return type:
hv.Layout