holobench 1.30.2__tar.gz → 1.30.3__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.
- {holobench-1.30.2 → holobench-1.30.3}/PKG-INFO +3 -3
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_float3D.py +24 -44
- {holobench-1.30.2 → holobench-1.30.3}/pyproject.toml +4 -4
- {holobench-1.30.2 → holobench-1.30.3}/.gitignore +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/LICENSE +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/README.md +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/__init__.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/bench_cfg.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/bench_plot_server.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/bench_report.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/bench_runner.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/bencher.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/caching.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/class_enum.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/__init__.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/benchmark_data.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_all.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_categorical.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_composable_container.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_composable_container2.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_consts.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_custom_sweep.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_custom_sweep2.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_dataframe.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_docs.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_filepath.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_float_cat.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_floats.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_floats2D.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_holosweep.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_holosweep_objects.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_holosweep_tap.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_image.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_image1.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_levels.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_levels2.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_pareto.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_sample_cache.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_sample_cache_context.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_simple.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_simple_bool.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_simple_cat.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_simple_float.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_simple_float2d.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_strings.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_time_event.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_video.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/example_workflow.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/experimental/example_bokeh_plotly.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/experimental/example_hover_ex.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/experimental/example_hvplot_explorer.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/experimental/example_interactive.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/experimental/example_streamnd.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/experimental/example_streams.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/experimental/example_template.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/experimental/example_updates.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/experimental/example_vector.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/meta/example_meta.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/meta/example_meta_cat.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/meta/example_meta_float.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/meta/example_meta_levels.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/optuna/example_optuna.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/shelved/example_float2D_scatter.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/shelved/example_float3D_cone.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/example/shelved/example_kwargs.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/job.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/optuna_conversions.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/plotting/__init__.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/plotting/plot_filter.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/plotting/plt_cnt_cfg.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/__init__.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/bench_result.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/bench_result_base.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/composable_container/__init__.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/composable_container/composable_container_base.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/composable_container/composable_container_dataframe.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/composable_container/composable_container_panel.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/composable_container/composable_container_video.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/dataset_result.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/float_formatter.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/holoview_result.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/optuna_result.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/panel_result.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/plotly_result.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/video_result.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/results/video_summary.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/utils.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/variables/__init__.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/variables/inputs.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/variables/parametrised_sweep.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/variables/results.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/variables/sweep_base.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/variables/time.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/video_writer.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/bencher/worker_job.py +0 -0
- {holobench-1.30.2 → holobench-1.30.3}/resource/bencher +0 -0
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.3
|
2
2
|
Name: holobench
|
3
|
-
Version: 1.30.
|
3
|
+
Version: 1.30.3
|
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
|
@@ -13,12 +13,12 @@ Requires-Dist: holoviews<=1.19.1,>=1.15
|
|
13
13
|
Requires-Dist: hvplot<=0.10.0,>=0.8
|
14
14
|
Requires-Dist: matplotlib<=3.9.2,>=3.6.3
|
15
15
|
Requires-Dist: moviepy-fix-codec
|
16
|
-
Requires-Dist: numpy<=2.1.
|
16
|
+
Requires-Dist: numpy<=2.1.3,>=1.0
|
17
17
|
Requires-Dist: optuna<=4.0.0,>=3.2
|
18
18
|
Requires-Dist: pandas<=2.2.2,>=2.0
|
19
19
|
Requires-Dist: panel<=1.4.5,>=1.3.6
|
20
20
|
Requires-Dist: param<=2.1.1,>=1.13.0
|
21
|
-
Requires-Dist: plotly<=5.24.
|
21
|
+
Requires-Dist: plotly<=5.24.1,>=5.15
|
22
22
|
Requires-Dist: scikit-learn<=1.5.1,>=1.2
|
23
23
|
Requires-Dist: scoop<=0.7.2.0,>=0.7.0
|
24
24
|
Requires-Dist: sortedcontainers<=2.4,>=2.4
|
@@ -1,11 +1,9 @@
|
|
1
1
|
# pylint: disable=duplicate-code
|
2
|
-
|
3
2
|
import numpy as np
|
4
|
-
|
5
3
|
import bencher as bch
|
6
4
|
|
7
5
|
|
8
|
-
class
|
6
|
+
class VolumeSweep(bch.ParametrizedSweep):
|
9
7
|
"""A class to represent a 3D point in space."""
|
10
8
|
|
11
9
|
x = bch.FloatSweep(
|
@@ -18,10 +16,6 @@ class VolumeSample(bch.ParametrizedSweep):
|
|
18
16
|
default=0, bounds=[-1.0, 1.0], doc="z coordinate of the sample volume", samples=6
|
19
17
|
)
|
20
18
|
|
21
|
-
|
22
|
-
class VolumeResult(bch.ParametrizedSweep):
|
23
|
-
"""A class to represent the properties of a volume sample."""
|
24
|
-
|
25
19
|
value = bch.ResultVar("ul", doc="The scalar value of the 3D volume field")
|
26
20
|
occupancy = bch.ResultVar(
|
27
21
|
"occupied", doc="If the value is > 0.5 this point is considered occupied"
|
@@ -32,33 +26,25 @@ class VolumeResult(bch.ParametrizedSweep):
|
|
32
26
|
3, "vec", doc="The same vector field but only showing values in a sphere of radius 0.5"
|
33
27
|
)
|
34
28
|
|
29
|
+
def __call__(self, **kwargs) -> dict:
|
30
|
+
"""This function takes a 3D point as input and returns distance of that point to the origin."""
|
31
|
+
self.update_params_from_kwargs(**kwargs)
|
32
|
+
self.value = np.linalg.norm(np.array([self.x, self.y, self.z])) # distance to origin
|
33
|
+
self.occupancy = float(self.value < 0.5)
|
34
|
+
# from https://plotly.com/python/3d-volume-plots/
|
35
|
+
self.interesting = np.sin(np.pi * self.x) * np.cos(np.pi * self.z) * np.sin(np.pi * self.y)
|
36
|
+
self.interesting_vec = [
|
37
|
+
np.sin(np.pi * self.x),
|
38
|
+
np.cos(np.pi * self.z),
|
39
|
+
np.sin(np.pi * self.y),
|
40
|
+
]
|
35
41
|
|
36
|
-
|
37
|
-
|
42
|
+
if self.occupancy:
|
43
|
+
self.interesting_vec_and_occ = self.interesting_vec
|
44
|
+
else:
|
45
|
+
self.interesting_vec_and_occ = [0, 0, 0]
|
38
46
|
|
39
|
-
|
40
|
-
point (VolumeSample): Sample point
|
41
|
-
|
42
|
-
Returns:
|
43
|
-
VolumeResult: Value at that point
|
44
|
-
"""
|
45
|
-
output = VolumeResult()
|
46
|
-
output.value = np.linalg.norm(np.array([point.x, point.y, point.z])) # distance to origin
|
47
|
-
output.occupancy = float(output.value < 0.5)
|
48
|
-
# from https://plotly.com/python/3d-volume-plots/
|
49
|
-
output.interesting = np.sin(np.pi * point.x) * np.cos(np.pi * point.z) * np.sin(np.pi * point.y)
|
50
|
-
output.interesting_vec = [
|
51
|
-
np.sin(np.pi * point.x),
|
52
|
-
np.cos(np.pi * point.z),
|
53
|
-
np.sin(np.pi * point.y),
|
54
|
-
]
|
55
|
-
|
56
|
-
if output.occupancy:
|
57
|
-
output.interesting_vec_and_occ = output.interesting_vec
|
58
|
-
else:
|
59
|
-
output.interesting_vec_and_occ = [0, 0, 0]
|
60
|
-
|
61
|
-
return output
|
47
|
+
return super().__call__()
|
62
48
|
|
63
49
|
|
64
50
|
def example_floats3D(
|
@@ -72,21 +58,15 @@ def example_floats3D(
|
|
72
58
|
Returns:
|
73
59
|
Bench: results of the parameter sweep
|
74
60
|
"""
|
75
|
-
bench =
|
76
|
-
"Bencher_Example_Floats",
|
77
|
-
bench_fn,
|
78
|
-
VolumeSample,
|
79
|
-
run_cfg=run_cfg,
|
80
|
-
report=report,
|
81
|
-
)
|
61
|
+
bench = VolumeSweep().to_bench(run_cfg=run_cfg, report=report)
|
82
62
|
|
83
63
|
bench.plot_sweep(
|
84
64
|
title="Float 3D Example",
|
85
|
-
input_vars=[
|
65
|
+
input_vars=["x", "y", "z"],
|
86
66
|
result_vars=[
|
87
|
-
|
88
|
-
|
89
|
-
|
67
|
+
"value",
|
68
|
+
"occupancy",
|
69
|
+
"interesting",
|
90
70
|
],
|
91
71
|
description="""This example shows how to sample 3 floating point variables and plot a volumetric representation of the results. The benchmark function returns the distance to the origin""",
|
92
72
|
post_description="Here you can see concentric shells as the value of the function increases with distance from the origin. The occupancy graph should show a sphere with radius=0.5",
|
@@ -97,5 +77,5 @@ def example_floats3D(
|
|
97
77
|
|
98
78
|
if __name__ == "__main__":
|
99
79
|
ex_run_cfg = bch.BenchRunCfg()
|
100
|
-
ex_run_cfg.level =
|
80
|
+
ex_run_cfg.level = 6
|
101
81
|
example_floats3D(ex_run_cfg).report.show()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
[project]
|
2
2
|
name = "holobench"
|
3
|
-
version = "1.30.
|
3
|
+
version = "1.30.3"
|
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"
|
@@ -11,7 +11,7 @@ requires-python = ">=3.10,<3.13"
|
|
11
11
|
|
12
12
|
dependencies = [
|
13
13
|
"holoviews>=1.15,<=1.19.1",
|
14
|
-
"numpy>=1.0,<=2.1.
|
14
|
+
"numpy>=1.0,<=2.1.3",
|
15
15
|
"param>=1.13.0,<=2.1.1",
|
16
16
|
"hvplot>=0.8,<=0.10.0",
|
17
17
|
"matplotlib>=3.6.3,<=3.9.2",
|
@@ -19,7 +19,7 @@ dependencies = [
|
|
19
19
|
"diskcache>=5.6,<=5.6.3",
|
20
20
|
"optuna>=3.2,<=4.0.0",
|
21
21
|
"xarray>=2023.7,<=2024.7.0",
|
22
|
-
"plotly>=5.15,<=5.24.
|
22
|
+
"plotly>=5.15,<=5.24.1",
|
23
23
|
"sortedcontainers>=2.4,<=2.4",
|
24
24
|
"pandas>=2.0,<=2.2.2",
|
25
25
|
"strenum>=0.4.0,<=0.4.15",
|
@@ -92,7 +92,7 @@ coverage-report = "coverage report -m"
|
|
92
92
|
update-lock = "pixi update && git commit -a -m'update pixi.lock' || true"
|
93
93
|
push = "git push"
|
94
94
|
update-lock-push = { depends_on = ["update-lock", "push"] }
|
95
|
-
fix = { depends_on = ["update-lock", "format", "ruff-lint"] }
|
95
|
+
fix = { depends_on = ["update-lock","pre-commit", "format", "ruff-lint"] }
|
96
96
|
fix-commit-push = { depends_on = ["fix", "commit-format", "update-lock-push"] }
|
97
97
|
ci-no-cover = { depends_on = ["style", "test"] }
|
98
98
|
ci = { depends_on = ["format","ruff-lint", "pylint", "coverage", "coverage-report"] }
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
{holobench-1.30.2 → holobench-1.30.3}/bencher/example/experimental/example_hvplot_explorer.py
RENAMED
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|
File without changes
|