holobench 1.36.0__py3-none-any.whl → 1.36.1__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.
- bencher/bench_runner.py +1 -1
- bencher/example/example_video.py +12 -12
- bencher/example/inputs_1D/example_1D.py +0 -18
- bencher/job.py +4 -1
- bencher/results/composable_container/composable_container_video.py +3 -3
- bencher/results/video_summary.py +5 -0
- {holobench-1.36.0.dist-info → holobench-1.36.1.dist-info}/METADATA +1 -1
- {holobench-1.36.0.dist-info → holobench-1.36.1.dist-info}/RECORD +10 -10
- {holobench-1.36.0.dist-info → holobench-1.36.1.dist-info}/WHEEL +0 -0
- {holobench-1.36.0.dist-info → holobench-1.36.1.dist-info}/licenses/LICENSE +0 -0
bencher/bench_runner.py
CHANGED
bencher/example/example_video.py
CHANGED
@@ -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
|
-
|
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=[
|
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
|
|
bencher/job.py
CHANGED
@@ -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
|
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=
|
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
|
|
bencher/results/video_summary.py
CHANGED
@@ -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
|
Metadata-Version: 2.4
|
2
2
|
Name: holobench
|
3
|
-
Version: 1.36.
|
3
|
+
Version: 1.36.1
|
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
|
@@ -2,12 +2,12 @@ bencher/__init__.py,sha256=hWfQxlvuHRsFK4ZPCpRXo3nDzQB52JOUoi67wcnhopE,1890
|
|
2
2
|
bencher/bench_cfg.py,sha256=gEpF1J4RAxCQPSkI8npKfhw-o3-8cw80TjiWK7As5WE,18417
|
3
3
|
bencher/bench_plot_server.py,sha256=nvGTr981XgWELqV7yID91j6V1UIPGtKilzxHcNWaZ6Q,4196
|
4
4
|
bencher/bench_report.py,sha256=ikMSHceyc8cYFH-sIza167DH-H-_iiTYDm2TmusUHDc,7515
|
5
|
-
bencher/bench_runner.py,sha256=
|
5
|
+
bencher/bench_runner.py,sha256=xoeXt8gcEhx5nAFsKBs8RmdkEyXUOyFd8mrEXyIxj3U,6531
|
6
6
|
bencher/bencher.py,sha256=-vbZIzBr2IYYG7be5Hh8IZgIGUysTxoxQUV6xUToH14,35437
|
7
7
|
bencher/caching.py,sha256=AusaNrzGGlj5m6zcwcqnTn55Mam2mQdF--oqelO806M,1627
|
8
8
|
bencher/class_enum.py,sha256=kYHW9qKkKcNdwaXizZL-fTptS_DUEGv4c88yCehk3gc,1492
|
9
9
|
bencher/flask_server.py,sha256=uMhMaySUki5StC-r_TXb4KTVqAiffyqfH7UzQidFqSw,831
|
10
|
-
bencher/job.py,sha256=
|
10
|
+
bencher/job.py,sha256=smSRLLZNxFSuAo7mA3m_lzHc2opjNf-DjzszsCn4ENU,6216
|
11
11
|
bencher/optuna_conversions.py,sha256=an-LfPsQXyyvhIZnG8Wl1RQVYMvJj7WOi3YNqoUnuxQ,5356
|
12
12
|
bencher/utils.py,sha256=DP2GJP28nSEihvZwiV1Rl7YJ5NTrRt2zBLs46eQ37hQ,9887
|
13
13
|
bencher/utils_rerun.py,sha256=E1itolYJMjmtBE5qcSotiS20I-dobVnjznsTRvZaV0s,1212
|
@@ -49,7 +49,7 @@ bencher/example/example_simple_float.py,sha256=5l3O6DzS1AV9LdpN_HfYxR-rvheXoRtWQ
|
|
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
|
52
|
-
bencher/example/example_video.py,sha256=
|
52
|
+
bencher/example/example_video.py,sha256=QnEaMOt7taHVKD_t3EZ60aCTkVdt2hhJ2bDH2fNparg,3897
|
53
53
|
bencher/example/example_workflow.py,sha256=00QnUuViMfX_PqzqkXmg1wPX6yAq7IS7mCL_RFKwrMM,6806
|
54
54
|
bencher/example/experimental/example_bokeh_plotly.py,sha256=3jUKh8eKIAlpklKnp8UopIHhUDw1A0_5CwjeyTzbi7o,846
|
55
55
|
bencher/example/experimental/example_hover_ex.py,sha256=qszw4FkIfqQkVviPSpmUoFOoi6PGotGbsc7Ojyx8EtU,1052
|
@@ -61,7 +61,7 @@ bencher/example/experimental/example_template.py,sha256=XdIVS9RtLdE5GNnerWiZMXvP
|
|
61
61
|
bencher/example/experimental/example_updates.py,sha256=rF4UgWY-CW6ohNtOpQklTuwbwVRvEM5j6edZOiMkspQ,1835
|
62
62
|
bencher/example/experimental/example_vector.py,sha256=3o_1dA4dc2HL6uIEvDAcvLPVJB8jgkq1QZ3BQIL-LEo,3118
|
63
63
|
bencher/example/inputs_0D/example_0D.py,sha256=WgelKMVahagrLpCByosqh4bHC58BXJ4-AO7zqgjNjH8,1225
|
64
|
-
bencher/example/inputs_1D/example_1D.py,sha256=
|
64
|
+
bencher/example/inputs_1D/example_1D.py,sha256=aT_4mtYNSN49qMG51jgW9X3NSGGC_GrGpgUNG6i0NZ8,1315
|
65
65
|
bencher/example/meta/example_meta.py,sha256=XBpfu47z86vz8QSZjLA1uWltoRZSej7W48nveFKqj5w,5564
|
66
66
|
bencher/example/meta/example_meta_cat.py,sha256=FMBT0yMPJJo0pmUYVtlq64R6qn_EXEt74xYAsK6HQag,641
|
67
67
|
bencher/example/meta/example_meta_float.py,sha256=D71oiFqGauLvqTxv2BC4CJOwHIdpvq8FdCBVejwZ4Do,624
|
@@ -84,12 +84,12 @@ bencher/results/optuna_result.py,sha256=QtZ4TGRun7gJoFVUjEyXKPF5yakwOSXrqEXQVJdJ
|
|
84
84
|
bencher/results/panel_result.py,sha256=lXOtfhWKSspf53Wgm94DTiVD3rliieHQW96sOdu5UYk,1336
|
85
85
|
bencher/results/plotly_result.py,sha256=wkgfL38qJp6RviekXBYpNPeU4HCf0nbtKDAhu5QZhUg,2132
|
86
86
|
bencher/results/video_result.py,sha256=E3fAxXctRVxiRyamadpKCMXanM5TTqw1tEYICS2LDLs,1146
|
87
|
-
bencher/results/video_summary.py,sha256
|
87
|
+
bencher/results/video_summary.py,sha256=-YUAkSZhS65a5ULGqyi9vPP-3nhIv9miogM2XLKr0iI,8782
|
88
88
|
bencher/results/composable_container/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
89
89
|
bencher/results/composable_container/composable_container_base.py,sha256=gmlQl3NQ3LWIfH15neLoZMNos6hbu3SklslfcFDAacA,2778
|
90
90
|
bencher/results/composable_container/composable_container_dataframe.py,sha256=ZbFaQSo4UsRxY8NUdJPjNFW3_kzlm8jtWuoLf8y_t8U,1789
|
91
91
|
bencher/results/composable_container/composable_container_panel.py,sha256=HrOoeGB0y0jGQcxcci_M82ftsvklLkJgo-4SjDBJCks,1232
|
92
|
-
bencher/results/composable_container/composable_container_video.py,sha256=
|
92
|
+
bencher/results/composable_container/composable_container_video.py,sha256=X6XxBNDglnNLjQ4QrhxJ8W3Re_aLeTZKKVsbjjJ3av8,7107
|
93
93
|
bencher/variables/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
94
94
|
bencher/variables/inputs.py,sha256=vxpVKhbM8inYiiHcatJLGl0zg9boMYKJRtLVc32YGpY,6730
|
95
95
|
bencher/variables/parametrised_sweep.py,sha256=fxjKOQ2x5xuCyi0kO1_XS9bXiib1bjThhvpulZPeyv8,7802
|
@@ -97,7 +97,7 @@ bencher/variables/results.py,sha256=Wq14e8rAj5mcK22325wcaeTMjgZ6JuduqceAHItHFY8,
|
|
97
97
|
bencher/variables/sweep_base.py,sha256=gfEhKvsb16ZLbe38JewZqu0AMOHpsqwRbZbt-aCg9Bc,6258
|
98
98
|
bencher/variables/time.py,sha256=zcRS5p4ZkFjMta9nZMEuWv86rLnPkUSqyO69QwI5q3E,3142
|
99
99
|
resource/bencher,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
100
|
-
holobench-1.36.
|
101
|
-
holobench-1.36.
|
102
|
-
holobench-1.36.
|
103
|
-
holobench-1.36.
|
100
|
+
holobench-1.36.1.dist-info/METADATA,sha256=tVg9fYHfBnnb7xlVW_UEikyH2hSOtf2pbrUT1i_K9e4,6600
|
101
|
+
holobench-1.36.1.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
102
|
+
holobench-1.36.1.dist-info/licenses/LICENSE,sha256=dSHXTdRY4Y7qGFMv63UksV700iff7iE-p7GGs6Sbnvo,1065
|
103
|
+
holobench-1.36.1.dist-info/RECORD,,
|
File without changes
|
File without changes
|