holobench 1.33.1__tar.gz → 1.34.0__tar.gz

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.
Files changed (101) hide show
  1. {holobench-1.33.1 → holobench-1.34.0}/PKG-INFO +3 -3
  2. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_simple_float.py +1 -0
  3. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/holoview_result.py +17 -3
  4. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/optuna_result.py +7 -2
  5. {holobench-1.33.1 → holobench-1.34.0}/pyproject.toml +12 -12
  6. {holobench-1.33.1 → holobench-1.34.0}/.gitignore +0 -0
  7. {holobench-1.33.1 → holobench-1.34.0}/LICENSE +0 -0
  8. {holobench-1.33.1 → holobench-1.34.0}/README.md +0 -0
  9. {holobench-1.33.1 → holobench-1.34.0}/bencher/__init__.py +0 -0
  10. {holobench-1.33.1 → holobench-1.34.0}/bencher/bench_cfg.py +0 -0
  11. {holobench-1.33.1 → holobench-1.34.0}/bencher/bench_plot_server.py +0 -0
  12. {holobench-1.33.1 → holobench-1.34.0}/bencher/bench_report.py +0 -0
  13. {holobench-1.33.1 → holobench-1.34.0}/bencher/bench_runner.py +0 -0
  14. {holobench-1.33.1 → holobench-1.34.0}/bencher/bencher.py +0 -0
  15. {holobench-1.33.1 → holobench-1.34.0}/bencher/caching.py +0 -0
  16. {holobench-1.33.1 → holobench-1.34.0}/bencher/class_enum.py +0 -0
  17. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/__init__.py +0 -0
  18. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/benchmark_data.py +0 -0
  19. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_all.py +0 -0
  20. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_categorical.py +0 -0
  21. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_composable_container.py +0 -0
  22. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_composable_container2.py +0 -0
  23. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_consts.py +0 -0
  24. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_custom_sweep.py +0 -0
  25. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_custom_sweep2.py +0 -0
  26. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_dataframe.py +0 -0
  27. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_docs.py +0 -0
  28. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_filepath.py +0 -0
  29. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_float3D.py +0 -0
  30. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_float_cat.py +0 -0
  31. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_floats.py +0 -0
  32. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_floats2D.py +0 -0
  33. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_holosweep.py +0 -0
  34. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_holosweep_objects.py +0 -0
  35. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_holosweep_tap.py +0 -0
  36. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_image.py +0 -0
  37. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_image1.py +0 -0
  38. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_levels.py +0 -0
  39. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_levels2.py +0 -0
  40. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_pareto.py +0 -0
  41. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_publish.py +0 -0
  42. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_rerun.py +0 -0
  43. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_rerun2.py +0 -0
  44. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_sample_cache.py +0 -0
  45. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_sample_cache_context.py +0 -0
  46. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_simple.py +0 -0
  47. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_simple_bool.py +0 -0
  48. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_simple_cat.py +0 -0
  49. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_simple_float2d.py +0 -0
  50. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_strings.py +0 -0
  51. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_time_event.py +0 -0
  52. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_video.py +0 -0
  53. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/example_workflow.py +0 -0
  54. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/experimental/example_bokeh_plotly.py +0 -0
  55. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/experimental/example_hover_ex.py +0 -0
  56. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/experimental/example_hvplot_explorer.py +0 -0
  57. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/experimental/example_interactive.py +0 -0
  58. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/experimental/example_streamnd.py +0 -0
  59. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/experimental/example_streams.py +0 -0
  60. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/experimental/example_template.py +0 -0
  61. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/experimental/example_updates.py +0 -0
  62. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/experimental/example_vector.py +0 -0
  63. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/meta/example_meta.py +0 -0
  64. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/meta/example_meta_cat.py +0 -0
  65. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/meta/example_meta_float.py +0 -0
  66. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/meta/example_meta_levels.py +0 -0
  67. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/optuna/example_optuna.py +0 -0
  68. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/shelved/example_float2D_scatter.py +0 -0
  69. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/shelved/example_float3D_cone.py +0 -0
  70. {holobench-1.33.1 → holobench-1.34.0}/bencher/example/shelved/example_kwargs.py +0 -0
  71. {holobench-1.33.1 → holobench-1.34.0}/bencher/flask_server.py +0 -0
  72. {holobench-1.33.1 → holobench-1.34.0}/bencher/job.py +0 -0
  73. {holobench-1.33.1 → holobench-1.34.0}/bencher/optuna_conversions.py +0 -0
  74. {holobench-1.33.1 → holobench-1.34.0}/bencher/plotting/__init__.py +0 -0
  75. {holobench-1.33.1 → holobench-1.34.0}/bencher/plotting/plot_filter.py +0 -0
  76. {holobench-1.33.1 → holobench-1.34.0}/bencher/plotting/plt_cnt_cfg.py +0 -0
  77. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/__init__.py +0 -0
  78. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/bench_result.py +0 -0
  79. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/bench_result_base.py +0 -0
  80. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/composable_container/__init__.py +0 -0
  81. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/composable_container/composable_container_base.py +0 -0
  82. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/composable_container/composable_container_dataframe.py +0 -0
  83. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/composable_container/composable_container_panel.py +0 -0
  84. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/composable_container/composable_container_video.py +0 -0
  85. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/dataset_result.py +0 -0
  86. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/float_formatter.py +0 -0
  87. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/panel_result.py +0 -0
  88. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/plotly_result.py +0 -0
  89. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/video_result.py +0 -0
  90. {holobench-1.33.1 → holobench-1.34.0}/bencher/results/video_summary.py +0 -0
  91. {holobench-1.33.1 → holobench-1.34.0}/bencher/utils.py +0 -0
  92. {holobench-1.33.1 → holobench-1.34.0}/bencher/utils_rerun.py +0 -0
  93. {holobench-1.33.1 → holobench-1.34.0}/bencher/variables/__init__.py +0 -0
  94. {holobench-1.33.1 → holobench-1.34.0}/bencher/variables/inputs.py +0 -0
  95. {holobench-1.33.1 → holobench-1.34.0}/bencher/variables/parametrised_sweep.py +0 -0
  96. {holobench-1.33.1 → holobench-1.34.0}/bencher/variables/results.py +0 -0
  97. {holobench-1.33.1 → holobench-1.34.0}/bencher/variables/sweep_base.py +0 -0
  98. {holobench-1.33.1 → holobench-1.34.0}/bencher/variables/time.py +0 -0
  99. {holobench-1.33.1 → holobench-1.34.0}/bencher/video_writer.py +0 -0
  100. {holobench-1.33.1 → holobench-1.34.0}/bencher/worker_job.py +0 -0
  101. {holobench-1.33.1 → holobench-1.34.0}/resource/bencher +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: holobench
3
- Version: 1.33.1
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
@@ -30,7 +30,7 @@ Provides-Extra: rerun
30
30
  Requires-Dist: flask; extra == 'rerun'
31
31
  Requires-Dist: flask-cors; extra == 'rerun'
32
32
  Requires-Dist: rerun-notebook; extra == 'rerun'
33
- Requires-Dist: rerun-sdk==0.20.1; extra == 'rerun'
33
+ Requires-Dist: rerun-sdk==0.21.0; extra == 'rerun'
34
34
  Provides-Extra: test
35
35
  Requires-Dist: coverage<=7.6.10,>=7.5.4; extra == 'test'
36
36
  Requires-Dist: hypothesis<=6.123.2,>=6.104.2; extra == 'test'
@@ -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
@@ -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
  [project]
2
2
  name = "holobench"
3
- version = "1.33.1"
3
+ version = "1.34.0"
4
4
 
5
5
  authors = [{ name = "Austin Gregg-Smith", email = "blooop@gmail.com" }]
6
6
  description = "A package for benchmarking the performance of arbitrary functions"
@@ -58,13 +58,13 @@ test = [
58
58
  "pytest-cov>=4.1,<=6.0.0",
59
59
  "pytest>=7.4,<=8.3.4",
60
60
  "hypothesis>=6.104.2,<=6.123.2",
61
- "ruff>=0.5.0,<=0.8.4",
61
+ "ruff>=0.5.0,<=0.8.5",
62
62
  "coverage>=7.5.4,<=7.6.10",
63
63
  "pre-commit<=4.0.1",
64
64
  ]
65
65
 
66
66
  #adds support for embedding rerun windows (alpha)
67
- rerun = ["rerun-sdk==0.20.1", "rerun-notebook", "flask", "flask-cors"]
67
+ rerun = ["rerun-sdk==0.21.0", "rerun-notebook", "flask", "flask-cors"]
68
68
 
69
69
  [build-system]
70
70
  requires = ["hatchling"]
@@ -88,26 +88,26 @@ format = "ruff format ."
88
88
  check-clean-workspace = "git diff --exit-code"
89
89
  ruff-lint = "ruff check . --fix"
90
90
  pylint = "pylint --version && echo 'running pylint...' && pylint $(git ls-files '*.py')"
91
- lint = { depends_on = ["ruff-lint", "pylint"] }
92
- style = { depends_on = ["format", "lint"] }
91
+ lint = { depends-on = ["ruff-lint", "pylint"] }
92
+ style = { depends-on = ["format", "lint"] }
93
93
  commit-format = "git commit -a -m'autoformat code' || true"
94
94
  test = "pytest"
95
95
  coverage = "coverage run -m pytest && coverage xml -o coverage.xml"
96
96
  coverage-report = "coverage report -m"
97
97
  update-lock = "pixi update && git commit -a -m'update pixi.lock' || true"
98
98
  push = "git push"
99
- update-lock-push = { depends_on = ["update-lock", "push"] }
100
- fix = { depends_on = ["update-lock", "pre-commit", "format", "ruff-lint"] }
101
- fix-commit-push = { depends_on = ["fix", "commit-format", "update-lock-push"] }
102
- ci-no-cover = { depends_on = ["style", "test"] }
103
- ci = { depends_on = [
99
+ update-lock-push = { depends-on = ["update-lock", "push"] }
100
+ fix = { depends-on = ["update-lock", "format", "ruff-lint"] }
101
+ fix-commit-push = { depends-on = ["fix", "commit-format", "update-lock-push"] }
102
+ ci-no-cover = { depends-on = ["style", "test"] }
103
+ ci = { depends-on = [
104
104
  "format",
105
105
  "ruff-lint",
106
106
  "pylint",
107
107
  "coverage",
108
108
  "coverage-report",
109
109
  ] }
110
- ci-push = { depends_on = ["format", "ruff-lint", "update-lock", "ci", "push"] }
110
+ ci-push = { depends-on = ["format", "ruff-lint", "update-lock", "ci", "push"] }
111
111
  clear-pixi = "rm -rf .pixi pixi.lock"
112
112
  setup-git-merge-driver = "git config merge.ours.driver true"
113
113
  update-from-template-repo = "./scripts/update_from_template.sh"
@@ -121,7 +121,7 @@ extension-pkg-whitelist = ["numpy", "scipy"]
121
121
  jobs = 16 #detect number of cores
122
122
 
123
123
  [tool.pylint.'MESSAGES CONTROL']
124
- disable = "C,logging-fstring-interpolation,line-too-long,fixme,missing-module-docstring,too-many-instance-attributes,too-few-public-methods,too-many-arguments,too-many-locals,too-many-branches,too-many-statements,use-dict-literal,duplicate-code,too-many-public-methods,too-many-nested-blocks,cyclic-import, too-many-positional-arguments"
124
+ disable = "C,logging-fstring-interpolation,line-too-long,fixme,missing-module-docstring,too-many-instance-attributes,too-few-public-methods,too-many-arguments,too-many-locals,too-many-branches,too-many-statements,use-dict-literal,duplicate-code,too-many-public-methods,too-many-nested-blocks,cyclic-import,too-many-positional-arguments"
125
125
  enable = "no-else-return,consider-using-in"
126
126
 
127
127
  [tool.coverage.run]
File without changes
File without changes
File without changes
File without changes
File without changes
File without changes