holobench 1.33.2__py3-none-any.whl → 1.34.0__py3-none-any.whl

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -21,6 +21,7 @@ def example_1D_float(run_cfg: bch.BenchRunCfg = None, report: bch.BenchReport =
21
21
 
22
22
  bench = SimpleFloat().to_bench(run_cfg, report)
23
23
  bench.plot_sweep()
24
+ bench.report.append(bench.get_result().to_explorer())
24
25
  return bench
25
26
 
26
27
 
@@ -8,7 +8,12 @@ from functools import partial
8
8
  import hvplot.xarray # noqa pylint: disable=duplicate-code,unused-import
9
9
  import xarray as xr
10
10
 
11
- from bencher.utils import hmap_canonical_input, get_nearest_coords, get_nearest_coords1D, listify
11
+ from bencher.utils import (
12
+ hmap_canonical_input,
13
+ get_nearest_coords,
14
+ get_nearest_coords1D,
15
+ listify,
16
+ )
12
17
  from bencher.results.panel_result import PanelResult
13
18
  from bencher.results.bench_result_base import ReduceType
14
19
 
@@ -105,7 +110,11 @@ class HoloviewResult(PanelResult):
105
110
  return da_plot.hvplot.bar(by=by, **time_widget_args, **kwargs)
106
111
 
107
112
  def hv_container_ds(
108
- self, dataset: xr.Dataset, result_var: Parameter, container: hv.Chart = None, **kwargs
113
+ self,
114
+ dataset: xr.Dataset,
115
+ result_var: Parameter,
116
+ container: hv.Chart = None,
117
+ **kwargs,
109
118
  ):
110
119
  return hv.Dataset(dataset[result_var.name]).to(container).opts(**kwargs)
111
120
 
@@ -428,7 +437,9 @@ class HoloviewResult(PanelResult):
428
437
 
429
438
  def to_scatter(self, **kwargs) -> Optional[pn.panel]:
430
439
  match_res = PlotFilter(
431
- float_range=VarRange(0, 0), cat_range=VarRange(0, None), repeats_range=VarRange(1, 1)
440
+ float_range=VarRange(0, 0),
441
+ cat_range=VarRange(0, None),
442
+ repeats_range=VarRange(1, 1),
432
443
  ).matches_result(self.plt_cnt_cfg, "to_hvplot_scatter")
433
444
  if match_res.overall:
434
445
  hv_ds = self.to_hv_dataset(ReduceType.SQUEEZE)
@@ -629,6 +640,9 @@ class HoloviewResult(PanelResult):
629
640
 
630
641
  return hv.DynamicMap(cb, kdims=kdims)
631
642
 
643
+ def to_explorer(self):
644
+ return self.to_xarray().hvplot.explorer()
645
+
632
646
  def to_grid(self, inputs=None):
633
647
  if inputs is None:
634
648
  inputs = self.bench_cfg.inputs_as_str()
@@ -277,7 +277,9 @@ class OptunaResult:
277
277
  if len(target_names) <= 3:
278
278
  study_pane.append(
279
279
  plot_pareto_front(
280
- study, target_names=target_names, include_dominated_trials=False
280
+ study,
281
+ target_names=target_names,
282
+ include_dominated_trials=False,
281
283
  )
282
284
  )
283
285
  else:
@@ -312,7 +314,10 @@ class OptunaResult:
312
314
 
313
315
  param_str = "\n".join(param_str)
314
316
  study_pane.append(
315
- pn.Row(pn.pane.Markdown(f"## Best Parameters\n```text\n{param_str}"), **kwargs),
317
+ pn.Row(
318
+ pn.pane.Markdown(f"## Best Parameters\n```text\n{param_str}"),
319
+ **kwargs,
320
+ ),
316
321
  )
317
322
 
318
323
  study_repeats_pane.append(study_pane)
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: holobench
3
- Version: 1.33.2
3
+ Version: 1.34.0
4
4
  Summary: A package for benchmarking the performance of arbitrary functions
5
5
  Project-URL: Repository, https://github.com/dyson-ai/bencher
6
6
  Project-URL: Home, https://github.com/dyson-ai/bencher
@@ -38,7 +38,7 @@ Requires-Dist: pre-commit<=4.0.1; extra == 'test'
38
38
  Requires-Dist: pylint<=3.3.3,>=3.2.5; extra == 'test'
39
39
  Requires-Dist: pytest-cov<=6.0.0,>=4.1; extra == 'test'
40
40
  Requires-Dist: pytest<=8.3.4,>=7.4; extra == 'test'
41
- Requires-Dist: ruff<=0.8.4,>=0.5.0; extra == 'test'
41
+ Requires-Dist: ruff<=0.8.5,>=0.5.0; extra == 'test'
42
42
  Description-Content-Type: text/markdown
43
43
 
44
44
  # Bencher
@@ -45,7 +45,7 @@ bencher/example/example_sample_cache_context.py,sha256=QmNM5Y8bCWEvbE7-6uRJVZhLa
45
45
  bencher/example/example_simple.py,sha256=E1-D10N-O50S33UQ9iLIlq09-x7BohbjYaR_lzLjQjc,11706
46
46
  bencher/example/example_simple_bool.py,sha256=GZ6pyj8FaQV9gNxaqAmX6c5XWtMvKosezAbSADEl0G0,1248
47
47
  bencher/example/example_simple_cat.py,sha256=XsV_75Jk3phVPI4om3q0vn1POfREb3CGRm9Kq1tL-OA,1760
48
- bencher/example/example_simple_float.py,sha256=Mfp4QwqgZ6DWgdu3reNA0cDwOV5cjG1PTuhf-SEsEkY,930
48
+ bencher/example/example_simple_float.py,sha256=5l3O6DzS1AV9LdpN_HfYxR-rvheXoRtWQWIER6-92aw,988
49
49
  bencher/example/example_simple_float2d.py,sha256=xsVOLO6AtMi9_fybpS_JZnhev5f11YuYWHrAOzJw2dI,1033
50
50
  bencher/example/example_strings.py,sha256=vStjrvfezNz7115iRtuwy0i7Gbu6w8mu-oHNfKNLNog,1570
51
51
  bencher/example/example_time_event.py,sha256=e6R-a6ZPe-ePiWoNvN3YuSQK-Y2HOGntsjCm_SPon28,2159
@@ -76,8 +76,8 @@ bencher/results/bench_result.py,sha256=IaJdWMNxHmbBkV8kAUj57LCHOiNjYJMvZpEPmI-yZ
76
76
  bencher/results/bench_result_base.py,sha256=zH1N2759zd_supm8e-tEtXeQl3y7GTDYaDzCtLczRvI,20793
77
77
  bencher/results/dataset_result.py,sha256=qXmFMrVAo_1qM6hhV4XpQqmCz9RiVkQo6ICYmbT-Kvk,8680
78
78
  bencher/results/float_formatter.py,sha256=sX6HNCyaXdHDxC8ybVUHwCJ3qOKbPUkBOplVIHtKWjM,1746
79
- bencher/results/holoview_result.py,sha256=DHzQaDOswsPln2XIJ9NF-OIw4HgJ41Sv9JrlIz_dVe0,28499
80
- bencher/results/optuna_result.py,sha256=wnO6Wci2tfxjyWpJkw2x_h4FHbQ1bxd9s0kbzPlbWUA,13471
79
+ bencher/results/holoview_result.py,sha256=oPVw7ucXCE11CNg8UF6wUiTZrAdkFmihx3cFsRrqCgY,28656
80
+ bencher/results/optuna_result.py,sha256=QtZ4TGRun7gJoFVUjEyXKPF5yakwOSXrqEXQVJdJmm4,13587
81
81
  bencher/results/panel_result.py,sha256=lXOtfhWKSspf53Wgm94DTiVD3rliieHQW96sOdu5UYk,1336
82
82
  bencher/results/plotly_result.py,sha256=wkgfL38qJp6RviekXBYpNPeU4HCf0nbtKDAhu5QZhUg,2132
83
83
  bencher/results/video_result.py,sha256=E3fAxXctRVxiRyamadpKCMXanM5TTqw1tEYICS2LDLs,1146
@@ -94,7 +94,7 @@ bencher/variables/results.py,sha256=Wq14e8rAj5mcK22325wcaeTMjgZ6JuduqceAHItHFY8,
94
94
  bencher/variables/sweep_base.py,sha256=gfEhKvsb16ZLbe38JewZqu0AMOHpsqwRbZbt-aCg9Bc,6258
95
95
  bencher/variables/time.py,sha256=zcRS5p4ZkFjMta9nZMEuWv86rLnPkUSqyO69QwI5q3E,3142
96
96
  resource/bencher,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
97
- holobench-1.33.2.dist-info/METADATA,sha256=Y3oLVWKh6ElZUTXdE7FlP4dW26u5Fbt_hwDPcCXZwpU,6600
98
- holobench-1.33.2.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
99
- holobench-1.33.2.dist-info/licenses/LICENSE,sha256=dSHXTdRY4Y7qGFMv63UksV700iff7iE-p7GGs6Sbnvo,1065
100
- holobench-1.33.2.dist-info/RECORD,,
97
+ holobench-1.34.0.dist-info/METADATA,sha256=pLgzxNSLlbMhcXMd_U5Id7UC1_zGmQZzsqPAgPEUq5U,6600
98
+ holobench-1.34.0.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
99
+ holobench-1.34.0.dist-info/licenses/LICENSE,sha256=dSHXTdRY4Y7qGFMv63UksV700iff7iE-p7GGs6Sbnvo,1065
100
+ holobench-1.34.0.dist-info/RECORD,,