holobench 1.36.0__tar.gz → 1.36.2__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 (104) hide show
  1. {holobench-1.36.0 → holobench-1.36.2}/.gitignore +4 -0
  2. {holobench-1.36.0 → holobench-1.36.2}/PKG-INFO +1 -1
  3. {holobench-1.36.0 → holobench-1.36.2}/bencher/bench_runner.py +1 -1
  4. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_video.py +12 -12
  5. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/inputs_1D/example_1D.py +0 -18
  6. {holobench-1.36.0 → holobench-1.36.2}/bencher/job.py +4 -1
  7. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/composable_container/composable_container_video.py +3 -3
  8. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/video_summary.py +5 -0
  9. {holobench-1.36.0 → holobench-1.36.2}/pyproject.toml +29 -2
  10. {holobench-1.36.0 → holobench-1.36.2}/LICENSE +0 -0
  11. {holobench-1.36.0 → holobench-1.36.2}/README.md +0 -0
  12. {holobench-1.36.0 → holobench-1.36.2}/bencher/__init__.py +0 -0
  13. {holobench-1.36.0 → holobench-1.36.2}/bencher/bench_cfg.py +0 -0
  14. {holobench-1.36.0 → holobench-1.36.2}/bencher/bench_plot_server.py +0 -0
  15. {holobench-1.36.0 → holobench-1.36.2}/bencher/bench_report.py +0 -0
  16. {holobench-1.36.0 → holobench-1.36.2}/bencher/bencher.py +0 -0
  17. {holobench-1.36.0 → holobench-1.36.2}/bencher/caching.py +0 -0
  18. {holobench-1.36.0 → holobench-1.36.2}/bencher/class_enum.py +0 -0
  19. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/__init__.py +0 -0
  20. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/benchmark_data.py +0 -0
  21. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_all.py +0 -0
  22. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_categorical.py +0 -0
  23. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_composable_container.py +0 -0
  24. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_composable_container2.py +0 -0
  25. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_consts.py +0 -0
  26. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_custom_sweep.py +0 -0
  27. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_custom_sweep2.py +0 -0
  28. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_dataframe.py +0 -0
  29. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_docs.py +0 -0
  30. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_filepath.py +0 -0
  31. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_float3D.py +0 -0
  32. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_float_cat.py +0 -0
  33. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_floats.py +0 -0
  34. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_floats2D.py +0 -0
  35. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_holosweep.py +0 -0
  36. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_holosweep_objects.py +0 -0
  37. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_holosweep_tap.py +0 -0
  38. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_image.py +0 -0
  39. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_image1.py +0 -0
  40. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_levels.py +0 -0
  41. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_levels2.py +0 -0
  42. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_pareto.py +0 -0
  43. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_publish.py +0 -0
  44. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_rerun.py +0 -0
  45. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_rerun2.py +0 -0
  46. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_sample_cache.py +0 -0
  47. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_sample_cache_context.py +0 -0
  48. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_simple.py +0 -0
  49. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_simple_bool.py +0 -0
  50. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_simple_cat.py +0 -0
  51. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_simple_float.py +0 -0
  52. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_simple_float2d.py +0 -0
  53. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_strings.py +0 -0
  54. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_time_event.py +0 -0
  55. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/example_workflow.py +0 -0
  56. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/experimental/example_bokeh_plotly.py +0 -0
  57. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/experimental/example_hover_ex.py +0 -0
  58. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/experimental/example_hvplot_explorer.py +0 -0
  59. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/experimental/example_interactive.py +0 -0
  60. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/experimental/example_streamnd.py +0 -0
  61. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/experimental/example_streams.py +0 -0
  62. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/experimental/example_template.py +0 -0
  63. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/experimental/example_updates.py +0 -0
  64. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/experimental/example_vector.py +0 -0
  65. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/inputs_0D/example_0D.py +0 -0
  66. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/meta/example_meta.py +0 -0
  67. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/meta/example_meta_cat.py +0 -0
  68. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/meta/example_meta_float.py +0 -0
  69. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/meta/example_meta_levels.py +0 -0
  70. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/optuna/example_optuna.py +0 -0
  71. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/shelved/example_float2D_scatter.py +0 -0
  72. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/shelved/example_float3D_cone.py +0 -0
  73. {holobench-1.36.0 → holobench-1.36.2}/bencher/example/shelved/example_kwargs.py +0 -0
  74. {holobench-1.36.0 → holobench-1.36.2}/bencher/flask_server.py +0 -0
  75. {holobench-1.36.0 → holobench-1.36.2}/bencher/optuna_conversions.py +0 -0
  76. {holobench-1.36.0 → holobench-1.36.2}/bencher/plotting/__init__.py +0 -0
  77. {holobench-1.36.0 → holobench-1.36.2}/bencher/plotting/plot_filter.py +0 -0
  78. {holobench-1.36.0 → holobench-1.36.2}/bencher/plotting/plt_cnt_cfg.py +0 -0
  79. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/__init__.py +0 -0
  80. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/bench_result.py +0 -0
  81. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/bench_result_base.py +0 -0
  82. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/composable_container/__init__.py +0 -0
  83. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/composable_container/composable_container_base.py +0 -0
  84. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/composable_container/composable_container_dataframe.py +0 -0
  85. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/composable_container/composable_container_panel.py +0 -0
  86. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/dataset_result.py +0 -0
  87. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/float_formatter.py +0 -0
  88. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/holoview_result.py +0 -0
  89. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/hvplot_result.py +0 -0
  90. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/optuna_result.py +0 -0
  91. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/panel_result.py +0 -0
  92. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/plotly_result.py +0 -0
  93. {holobench-1.36.0 → holobench-1.36.2}/bencher/results/video_result.py +0 -0
  94. {holobench-1.36.0 → holobench-1.36.2}/bencher/utils.py +0 -0
  95. {holobench-1.36.0 → holobench-1.36.2}/bencher/utils_rerun.py +0 -0
  96. {holobench-1.36.0 → holobench-1.36.2}/bencher/variables/__init__.py +0 -0
  97. {holobench-1.36.0 → holobench-1.36.2}/bencher/variables/inputs.py +0 -0
  98. {holobench-1.36.0 → holobench-1.36.2}/bencher/variables/parametrised_sweep.py +0 -0
  99. {holobench-1.36.0 → holobench-1.36.2}/bencher/variables/results.py +0 -0
  100. {holobench-1.36.0 → holobench-1.36.2}/bencher/variables/sweep_base.py +0 -0
  101. {holobench-1.36.0 → holobench-1.36.2}/bencher/variables/time.py +0 -0
  102. {holobench-1.36.0 → holobench-1.36.2}/bencher/video_writer.py +0 -0
  103. {holobench-1.36.0 → holobench-1.36.2}/bencher/worker_job.py +0 -0
  104. {holobench-1.36.0 → holobench-1.36.2}/resource/bencher +0 -0
@@ -179,3 +179,7 @@ log/**
179
179
  managed_context/metadata.json
180
180
  test_suite_analysis/metadata.json
181
181
  *.rrd
182
+ docs/builtdocs*
183
+ docs/jupyter_execute*
184
+ thumbnails/
185
+ docs/autoapi/*
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: holobench
3
- Version: 1.36.0
3
+ Version: 1.36.2
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
@@ -136,7 +136,7 @@ class BenchRunner:
136
136
  else:
137
137
  report.publish(remote_callback=self.publisher, debug=debug)
138
138
  if show:
139
- self.servers.append(report.show())
139
+ self.servers.append(report.show(self.run_cfg))
140
140
 
141
141
  def shutdown(self):
142
142
  while self.servers:
@@ -78,14 +78,11 @@ class TuringPattern(bch.ParametrizedSweep):
78
78
  def example_video(
79
79
  run_cfg: bch.BenchRunCfg = bch.BenchRunCfg(), report: bch.BenchReport = bch.BenchReport()
80
80
  ) -> bch.Bench:
81
- # run_cfg.auto_plot = False
82
- # run_cfg.cache_samples = True
83
- bench = bch.Bench("example_video", TuringPattern(), run_cfg=run_cfg, report=report)
81
+ bench = TuringPattern().to_bench(run_cfg, report)
84
82
 
85
83
  bench.plot_sweep(
86
84
  "Turing patterns with different parameters",
87
- input_vars=[TuringPattern.param.alpha, TuringPattern.param.beta],
88
- # input_vars=[TuringPattern.param.alpha],
85
+ input_vars=["alpha", "beta"],
89
86
  result_vars=[TuringPattern.param.video],
90
87
  )
91
88
 
@@ -96,14 +93,17 @@ def example_video_tap(
96
93
  run_cfg: bch.BenchRunCfg = bch.BenchRunCfg(), report: bch.BenchReport = bch.BenchReport()
97
94
  ) -> bch.Bench: # pragma: no cover
98
95
  bench = TuringPattern().to_bench(run_cfg=run_cfg, report=report)
99
- res = bench.plot_sweep(
100
- input_vars=["alpha", "beta"],
101
- # result_vars=["video","score"],
102
- # result_vars=["score"],
103
- run_cfg=run_cfg,
104
- )
96
+ res = bench.plot_sweep(input_vars=["alpha", "beta"])
105
97
 
106
- bench.report.append(res.to_video_grid())
98
+ bench.report.append(res.to_video_grid(result_types=(bch.ResultVideo)))
99
+
100
+ res = bench.plot_sweep(input_vars=["alpha"])
101
+ bench.report.append(
102
+ res.to_video_grid(
103
+ result_types=(bch.ResultVideo),
104
+ compose_method_list=[bch.ComposeType.right],
105
+ )
106
+ )
107
107
 
108
108
  return bench
109
109
 
@@ -34,27 +34,9 @@ def example_1D_float_repeats(
34
34
  """This example shows how to sample a 1 dimensional float variable and plot the result of passing that parameter sweep to the benchmarking function"""
35
35
 
36
36
  bench = Example1D().to_bench(run_cfg, report)
37
- # bench.plot_sweep(pass_repeat=True,plot_callbacks=False)
38
-
39
- # res = bench.get_result()
40
37
  bench.run_cfg = bch.BenchRunCfg(repeats=4)
41
- # bench.plot_sweep(pass_repeat=True, plot_callbacks=False)
42
38
  bench.plot_sweep(pass_repeat=True)
43
39
 
44
- res = bench.get_result()
45
- bench.report.append(res.to_curve())
46
- # bench.report.append(hv.Table(res.to_hv_dataset(bch.ReduceType.MINMAX)))
47
- # bench.report.append(res.to_curve() + res.to_scatter_jitter(override=True))
48
- # bench.report.append(res.to_line())
49
- bench.report.append(res.to_scatter_jitter(override=True))
50
- # bench.report.append(res.to_error_bar())
51
- # bench.report.append(res.to_explorer())
52
- # bench.report.append(res.to_error_bar()
53
-
54
- # bench.report.append(res.to_dataset())
55
- # bench.report.append(res.to_xarray().hvplot.plot(kind="andrews_curves"))
56
- # print(res.to_xarray())
57
- # bench.report.append()
58
40
  return bench
59
41
 
60
42
 
@@ -36,7 +36,10 @@ class JobFuture:
36
36
  self.res = res
37
37
  self.future = future
38
38
  # either a result or a future needs to be passed
39
- assert self.res is not None or self.future is not None
39
+ assert (
40
+ self.res is not None or self.future is not None
41
+ ), "make sure you are returning a dict or super().__call__(**kwargs) from your __call__ function"
42
+
40
43
  self.cache = cache
41
44
 
42
45
  def result(self):
@@ -100,7 +100,7 @@ class ComposableContainerVideo(ComposableContainerBase):
100
100
  print("rc", render_cfg)
101
101
  _, frame_duration = self.calculate_duration(float(len(self.container)), render_cfg)
102
102
  out = None
103
- print(f"using compose type{render_cfg.compose_method}")
103
+ print(f"using compose type: {render_cfg.compose_method}")
104
104
  max_duration = 0.0
105
105
 
106
106
  for i in range(len(self.container)):
@@ -129,8 +129,8 @@ class ComposableContainerVideo(ComposableContainerBase):
129
129
  # case ComposeType.overlay:
130
130
  # for i in range(len(self.container)):
131
131
  # self.container[i].alpha = 1./len(self.container)
132
- # out = CompositeVideoClip(self.container, bg_color=render_args.background_col)
133
- # out.duration = fps
132
+ # out = CompositeVideoClip(self.container, bg_color=render_cfg.background_col)
133
+ # # out.duration = fps
134
134
  case _:
135
135
  raise RuntimeError("This compose type is not supported")
136
136
 
@@ -39,6 +39,7 @@ class VideoSummaryResult(BenchResultBase):
39
39
  pane_collection: pn.pane = None,
40
40
  time_sequence_dimension=0,
41
41
  target_duration: float = None,
42
+ compose_method_list: List = None,
42
43
  **kwargs,
43
44
  ) -> Optional[pn.panel]:
44
45
  """Returns the results compiled into a video
@@ -47,6 +48,7 @@ class VideoSummaryResult(BenchResultBase):
47
48
  result_var (Parameter, optional): The result var to plot. Defaults to None.
48
49
  result_types (tuple, optional): The types of result var to convert to video. Defaults to (ResultImage,).
49
50
  collection (pn.pane, optional): If there are multiple results, use this collection to stack them. Defaults to pn.Row().
51
+ compose_method_list (List: optional): Defines how each of the dimensions is composed in the video. ie, concatenate the videos horizontally, vertically, sequentially or alpha overlay. Seee bch.ComposeType for the options.
50
52
 
51
53
  Returns:
52
54
  Optional[pn.panel]: a panel pane with a video of all results concatenated together
@@ -74,6 +76,7 @@ class VideoSummaryResult(BenchResultBase):
74
76
  rv,
75
77
  time_sequence_dimension=time_sequence_dimension,
76
78
  target_duration=target_duration,
79
+ compose_method_list=compose_method_list,
77
80
  **kwargs,
78
81
  )
79
82
  )
@@ -88,6 +91,7 @@ class VideoSummaryResult(BenchResultBase):
88
91
  time_sequence_dimension=0,
89
92
  video_controls: VideoControls = None,
90
93
  target_duration: float = None,
94
+ compose_method_list: List = None,
91
95
  **kwargs,
92
96
  ):
93
97
  cvc = self._to_video_panes_ds(
@@ -100,6 +104,7 @@ class VideoSummaryResult(BenchResultBase):
100
104
  result_var=result_var,
101
105
  final=True,
102
106
  reverse=reverse,
107
+ compose_method_list=compose_method_list,
103
108
  target_duration=target_duration,
104
109
  **kwargs,
105
110
  )
@@ -1,6 +1,6 @@
1
1
  [project]
2
2
  name = "holobench"
3
- version = "1.36.0"
3
+ version = "1.36.2"
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"
@@ -52,6 +52,27 @@ python = "3.12.*"
52
52
  [tool.pixi.pypi-dependencies]
53
53
  holobench = { path = ".", editable = true }
54
54
 
55
+ # Define a consolidated docs feature with all dependencies
56
+ [tool.pixi.feature.docs.dependencies]
57
+ python = "3.10.*"
58
+ firefox = ">=134.0,<135" # Conda package
59
+ geckodriver = "*" # Conda package
60
+ sphinx = "*"
61
+ gtk3 = "*"
62
+ python-chromedriver-binary = "*"
63
+
64
+ [tool.pixi.feature.docs.pypi-dependencies]
65
+ # All Python documentation dependencies
66
+ pydata-sphinx-theme = "*"
67
+ sphinx-rtd-theme = "*"
68
+ sphinxcontrib-napoleon = "*"
69
+ sphinx-autoapi = "*"
70
+ nbsite = "==0.8.7"
71
+ jupyter_bokeh = "*"
72
+ selenium = "*"
73
+ chromedriver_binary = "*"
74
+ ipykernel = "*"
75
+
55
76
  [project.optional-dependencies]
56
77
  test = [
57
78
  "pylint>=3.2.5,<=3.3.3",
@@ -63,6 +84,7 @@ test = [
63
84
  "pre-commit<=4.0.1",
64
85
  ]
65
86
 
87
+
66
88
  #adds support for embedding rerun windows (alpha)
67
89
  rerun = ["rerun-sdk==0.21.0", "rerun-notebook", "flask", "flask-cors"]
68
90
 
@@ -75,7 +97,7 @@ include = ["bencher"]
75
97
 
76
98
  # Environments
77
99
  [tool.pixi.environments]
78
- default = { features = ["test", "rerun"], solve-group = "default" }
100
+ default = { features = ["test", "rerun", "docs"], solve-group = "default" }
79
101
  py310 = ["py310", "test", "rerun"]
80
102
  py311 = ["py311", "test", "rerun"]
81
103
  py312 = ["py312", "test", "rerun"]
@@ -112,13 +134,18 @@ clear-pixi = "rm -rf .pixi pixi.lock"
112
134
  setup-git-merge-driver = "git config merge.ours.driver true"
113
135
  update-from-template-repo = "./scripts/update_from_template.sh"
114
136
 
137
+ docs = "rm -rf docs/builtdocs; rm -rf docs/jupyter_execute; sphinx-build -b html docs docs/builtdocs"
138
+
139
+
115
140
  #demos
116
141
  demo = "python3 bencher/example/example_image.py"
117
142
  demo_rerun = "python3 bencher/example/example_rerun.py"
118
143
 
144
+
119
145
  [tool.pylint]
120
146
  extension-pkg-whitelist = ["numpy", "scipy"]
121
147
  jobs = 16 #detect number of cores
148
+ ignore-paths = "docs/*"
122
149
 
123
150
  [tool.pylint.'MESSAGES CONTROL']
124
151
  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"
File without changes
File without changes
File without changes
File without changes