holobench 1.28.1__tar.gz → 1.30.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.
- holobench-1.30.0/.gitignore +180 -0
- {holobench-1.28.1/holobench.egg-info → holobench-1.30.0}/PKG-INFO +68 -34
- {holobench-1.28.1 → holobench-1.30.0}/README.md +42 -9
- {holobench-1.28.1 → holobench-1.30.0}/bencher/__init__.py +1 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/bencher.py +16 -4
- holobench-1.30.0/bencher/example/example_dataframe.py +48 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_image.py +5 -7
- holobench-1.30.0/bencher/example/example_image1.py +81 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/bench_result.py +3 -1
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/bench_result_base.py +53 -4
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/composable_container/composable_container_base.py +1 -1
- holobench-1.30.0/bencher/results/composable_container/composable_container_dataframe.py +52 -0
- holobench-1.30.0/bencher/results/dataset_result.py +227 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/optuna_result.py +4 -3
- {holobench-1.28.1 → holobench-1.30.0}/bencher/variables/parametrised_sweep.py +2 -2
- {holobench-1.28.1 → holobench-1.30.0}/bencher/variables/results.py +29 -1
- {holobench-1.28.1 → holobench-1.30.0}/pyproject.toml +37 -27
- holobench-1.28.1/MANIFEST.in +0 -1
- holobench-1.28.1/PKG-INFO +0 -93
- holobench-1.28.1/holobench.egg-info/SOURCES.txt +0 -122
- holobench-1.28.1/holobench.egg-info/dependency_links.txt +0 -1
- holobench-1.28.1/holobench.egg-info/not-zip-safe +0 -1
- holobench-1.28.1/holobench.egg-info/requires.txt +0 -26
- holobench-1.28.1/holobench.egg-info/top_level.txt +0 -1
- holobench-1.28.1/package.xml +0 -33
- holobench-1.28.1/setup.cfg +0 -10
- holobench-1.28.1/setup.py +0 -18
- holobench-1.28.1/test/test_bch_p.py +0 -37
- holobench-1.28.1/test/test_bench_examples.py +0 -148
- holobench-1.28.1/test/test_bench_report.py +0 -55
- holobench-1.28.1/test/test_bench_result_base.py +0 -79
- holobench-1.28.1/test/test_bench_runner.py +0 -196
- holobench-1.28.1/test/test_bencher.py +0 -383
- holobench-1.28.1/test/test_cache.py +0 -46
- holobench-1.28.1/test/test_class_enum.py +0 -10
- holobench-1.28.1/test/test_combinations.py +0 -182
- holobench-1.28.1/test/test_composable_container_base.py +0 -77
- holobench-1.28.1/test/test_composable_container_video.py +0 -255
- holobench-1.28.1/test/test_float_formatter.py +0 -26
- holobench-1.28.1/test/test_job.py +0 -98
- holobench-1.28.1/test/test_meta_tests.py +0 -55
- holobench-1.28.1/test/test_parametrized_sweep.py +0 -74
- holobench-1.28.1/test/test_plot_filter.py +0 -91
- holobench-1.28.1/test/test_plot_server.py +0 -55
- holobench-1.28.1/test/test_sample_cache.py +0 -113
- holobench-1.28.1/test/test_sweep_base.py +0 -209
- holobench-1.28.1/test/test_sweep_vars.py +0 -176
- holobench-1.28.1/test/test_utils.py +0 -176
- holobench-1.28.1/test/test_vars.py +0 -69
- {holobench-1.28.1 → holobench-1.30.0}/LICENSE +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/bench_cfg.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/bench_plot_server.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/bench_report.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/bench_runner.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/caching.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/class_enum.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/__init__.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/benchmark_data.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_all.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_categorical.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_composable_container.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_composable_container2.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_consts.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_custom_sweep.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_custom_sweep2.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_docs.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_filepath.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_float3D.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_float_cat.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_floats.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_floats2D.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_holosweep.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_holosweep_objects.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_holosweep_tap.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_levels.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_levels2.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_pareto.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_sample_cache.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_sample_cache_context.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_simple.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_simple_bool.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_simple_cat.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_simple_float.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_simple_float2d.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_strings.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_time_event.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_video.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/example_workflow.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/experimental/example_bokeh_plotly.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/experimental/example_hover_ex.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/experimental/example_hvplot_explorer.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/experimental/example_interactive.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/experimental/example_streamnd.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/experimental/example_streams.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/experimental/example_template.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/experimental/example_updates.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/experimental/example_vector.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/meta/example_meta.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/meta/example_meta_cat.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/meta/example_meta_float.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/meta/example_meta_levels.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/optuna/example_optuna.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/shelved/example_float2D_scatter.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/shelved/example_float3D_cone.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/example/shelved/example_kwargs.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/job.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/optuna_conversions.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/plotting/__init__.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/plotting/plot_filter.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/plotting/plt_cnt_cfg.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/__init__.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/composable_container/__init__.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/composable_container/composable_container_panel.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/composable_container/composable_container_video.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/float_formatter.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/holoview_result.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/panel_result.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/plotly_result.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/video_result.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/results/video_summary.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/utils.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/variables/__init__.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/variables/inputs.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/variables/sweep_base.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/variables/time.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/video_writer.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/bencher/worker_job.py +0 -0
- {holobench-1.28.1 → holobench-1.30.0}/resource/bencher +0 -0
@@ -0,0 +1,180 @@
|
|
1
|
+
#the default directory diskcache uses to store its cache files
|
2
|
+
cachedir/
|
3
|
+
unique_names/
|
4
|
+
|
5
|
+
|
6
|
+
# Byte-compiled / optimized / DLL files
|
7
|
+
__pycache__/
|
8
|
+
*.py[cod]
|
9
|
+
*$py.class
|
10
|
+
|
11
|
+
# C extensions
|
12
|
+
*.so
|
13
|
+
|
14
|
+
# Distribution / packaging
|
15
|
+
.Python
|
16
|
+
build/
|
17
|
+
develop-eggs/
|
18
|
+
dist/
|
19
|
+
downloads/
|
20
|
+
eggs/
|
21
|
+
.eggs/
|
22
|
+
lib/
|
23
|
+
lib64/
|
24
|
+
parts/
|
25
|
+
sdist/
|
26
|
+
var/
|
27
|
+
wheels/
|
28
|
+
share/python-wheels/
|
29
|
+
*.egg-info/
|
30
|
+
.installed.cfg
|
31
|
+
*.egg
|
32
|
+
MANIFEST
|
33
|
+
|
34
|
+
# PyInstaller
|
35
|
+
# Usually these files are written by a python script from a template
|
36
|
+
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
37
|
+
*.manifest
|
38
|
+
*.spec
|
39
|
+
|
40
|
+
# Installer logs
|
41
|
+
pip-log.txt
|
42
|
+
pip-delete-this-directory.txt
|
43
|
+
|
44
|
+
# Unit test / coverage reports
|
45
|
+
htmlcov/
|
46
|
+
.tox/
|
47
|
+
.nox/
|
48
|
+
.coverage
|
49
|
+
.coverage.*
|
50
|
+
.cache
|
51
|
+
nosetests.xml
|
52
|
+
coverage.xml
|
53
|
+
*.cover
|
54
|
+
*.py,cover
|
55
|
+
.hypothesis/
|
56
|
+
.pytest_cache/
|
57
|
+
cover/
|
58
|
+
|
59
|
+
# Translations
|
60
|
+
*.mo
|
61
|
+
*.pot
|
62
|
+
|
63
|
+
# Django stuff:
|
64
|
+
*.log
|
65
|
+
local_settings.py
|
66
|
+
db.sqlite3
|
67
|
+
db.sqlite3-journal
|
68
|
+
|
69
|
+
# Flask stuff:
|
70
|
+
instance/
|
71
|
+
.webassets-cache
|
72
|
+
|
73
|
+
# Scrapy stuff:
|
74
|
+
.scrapy
|
75
|
+
|
76
|
+
# Sphinx documentation
|
77
|
+
docs/_build/
|
78
|
+
|
79
|
+
# PyBuilder
|
80
|
+
.pybuilder/
|
81
|
+
target/
|
82
|
+
|
83
|
+
# Jupyter Notebook
|
84
|
+
.ipynb_checkpoints
|
85
|
+
|
86
|
+
# IPython
|
87
|
+
profile_default/
|
88
|
+
ipython_config.py
|
89
|
+
|
90
|
+
# pyenv
|
91
|
+
# For a library or package, you might want to ignore these files since the code is
|
92
|
+
# intended to run in multiple environments; otherwise, check them in:
|
93
|
+
# .python-version
|
94
|
+
|
95
|
+
# pipenv
|
96
|
+
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
|
97
|
+
# However, in case of collaboration, if having platform-specific dependencies or dependencies
|
98
|
+
# having no cross-platform support, pipenv may install dependencies that don't work, or not
|
99
|
+
# install all needed dependencies.
|
100
|
+
#Pipfile.lock
|
101
|
+
|
102
|
+
# poetry
|
103
|
+
# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control.
|
104
|
+
# This is especially recommended for binary packages to ensure reproducibility, and is more
|
105
|
+
# commonly ignored for libraries.
|
106
|
+
# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control
|
107
|
+
#poetry.lock
|
108
|
+
|
109
|
+
# pdm
|
110
|
+
# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control.
|
111
|
+
#pdm.lock
|
112
|
+
# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it
|
113
|
+
# in version control.
|
114
|
+
# https://pdm.fming.dev/#use-with-ide
|
115
|
+
.pdm.toml
|
116
|
+
|
117
|
+
# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm
|
118
|
+
__pypackages__/
|
119
|
+
|
120
|
+
# Celery stuff
|
121
|
+
celerybeat-schedule
|
122
|
+
celerybeat.pid
|
123
|
+
|
124
|
+
# SageMath parsed files
|
125
|
+
*.sage.py
|
126
|
+
|
127
|
+
# Environments
|
128
|
+
.env
|
129
|
+
.venv
|
130
|
+
env/
|
131
|
+
venv/
|
132
|
+
ENV/
|
133
|
+
env.bak/
|
134
|
+
venv.bak/
|
135
|
+
|
136
|
+
# Spyder project settings
|
137
|
+
.spyderproject
|
138
|
+
.spyproject
|
139
|
+
|
140
|
+
# Rope project settings
|
141
|
+
.ropeproject
|
142
|
+
|
143
|
+
# mkdocs documentation
|
144
|
+
/site
|
145
|
+
|
146
|
+
# mypy
|
147
|
+
.mypy_cache/
|
148
|
+
.dmypy.json
|
149
|
+
dmypy.json
|
150
|
+
|
151
|
+
# Pyre type checker
|
152
|
+
.pyre/
|
153
|
+
|
154
|
+
# pytype static type analyzer
|
155
|
+
.pytype/
|
156
|
+
|
157
|
+
# Cython debug symbols
|
158
|
+
cython_debug/
|
159
|
+
|
160
|
+
# PyCharm
|
161
|
+
# JetBrains specific template is maintained in a separate JetBrains.gitignore that can
|
162
|
+
# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore
|
163
|
+
# and can be added to the global gitignore or merged into this file. For a more nuclear
|
164
|
+
# option (not recommended) you can uncomment the following to ignore the entire idea folder.
|
165
|
+
#.idea/
|
166
|
+
|
167
|
+
hashed_vars_comparison_tmp
|
168
|
+
.vscode/active_file.cfg
|
169
|
+
test/test_bench_server.html
|
170
|
+
.vscode/active_file.cfg
|
171
|
+
|
172
|
+
#COLCON
|
173
|
+
install/**
|
174
|
+
log/**
|
175
|
+
# pixi environments
|
176
|
+
.pixi
|
177
|
+
*.egg-info
|
178
|
+
|
179
|
+
managed_context/metadata.json
|
180
|
+
test_suite_analysis/metadata.json
|
@@ -1,38 +1,39 @@
|
|
1
|
-
Metadata-Version: 2.
|
1
|
+
Metadata-Version: 2.3
|
2
2
|
Name: holobench
|
3
|
-
Version: 1.
|
3
|
+
Version: 1.30.0
|
4
4
|
Summary: A package for benchmarking the performance of arbitrary functions
|
5
|
-
Author-email: Austin Gregg-Smith <blooop@gmail.com>
|
6
5
|
Project-URL: Repository, https://github.com/dyson-ai/bencher
|
7
6
|
Project-URL: Home, https://github.com/dyson-ai/bencher
|
8
7
|
Project-URL: Documentation, https://bencher.readthedocs.io/en/latest/
|
9
|
-
|
8
|
+
Author-email: Austin Gregg-Smith <blooop@gmail.com>
|
9
|
+
License-Expression: MIT
|
10
10
|
License-File: LICENSE
|
11
|
-
Requires-Dist: holoviews<=1.19.0,>=1.15
|
12
|
-
Requires-Dist: numpy<=2.0.0,>=1.0
|
13
|
-
Requires-Dist: param<=2.1.0,>=1.13.0
|
14
|
-
Requires-Dist: hvplot<=0.10.0,>=0.8
|
15
|
-
Requires-Dist: matplotlib<=3.9.0,>=3.6.3
|
16
|
-
Requires-Dist: panel<=1.4.4,>=1.3.6
|
17
11
|
Requires-Dist: diskcache<=5.6.3,>=5.6
|
18
|
-
Requires-Dist:
|
19
|
-
Requires-Dist:
|
20
|
-
Requires-Dist:
|
21
|
-
Requires-Dist:
|
12
|
+
Requires-Dist: holoviews<=1.19.1,>=1.15
|
13
|
+
Requires-Dist: hvplot<=0.10.0,>=0.8
|
14
|
+
Requires-Dist: matplotlib<=3.9.2,>=3.6.3
|
15
|
+
Requires-Dist: moviepy-fix-codec
|
16
|
+
Requires-Dist: numpy<=2.1.0,>=1.0
|
17
|
+
Requires-Dist: optuna<=4.0.0,>=3.2
|
22
18
|
Requires-Dist: pandas<=2.2.2,>=2.0
|
23
|
-
Requires-Dist:
|
24
|
-
Requires-Dist:
|
25
|
-
Requires-Dist:
|
19
|
+
Requires-Dist: panel<=1.4.5,>=1.3.6
|
20
|
+
Requires-Dist: param<=2.1.1,>=1.13.0
|
21
|
+
Requires-Dist: plotly<=5.24.0,>=5.15
|
22
|
+
Requires-Dist: scikit-learn<=1.5.1,>=1.2
|
26
23
|
Requires-Dist: scoop<=0.7.2.0,>=0.7.0
|
27
|
-
Requires-Dist:
|
24
|
+
Requires-Dist: sortedcontainers<=2.4,>=2.4
|
25
|
+
Requires-Dist: str2bool<=1.1,>=1.1
|
26
|
+
Requires-Dist: strenum<=0.4.15,>=0.4.0
|
27
|
+
Requires-Dist: xarray<=2024.7.0,>=2023.7
|
28
28
|
Provides-Extra: test
|
29
|
-
Requires-Dist: black<=24.
|
30
|
-
Requires-Dist:
|
31
|
-
Requires-Dist:
|
32
|
-
Requires-Dist:
|
33
|
-
Requires-Dist:
|
34
|
-
Requires-Dist:
|
35
|
-
Requires-Dist:
|
29
|
+
Requires-Dist: black<=24.8.0,>=23; extra == 'test'
|
30
|
+
Requires-Dist: coverage<=7.6.1,>=7.5.4; extra == 'test'
|
31
|
+
Requires-Dist: hypothesis<=6.112.2,>=6.104.2; extra == 'test'
|
32
|
+
Requires-Dist: pylint<=3.3.1,>=3.2.5; extra == 'test'
|
33
|
+
Requires-Dist: pytest-cov<=5.0.0,>=4.1; extra == 'test'
|
34
|
+
Requires-Dist: pytest<=8.3.3,>=7.4; extra == 'test'
|
35
|
+
Requires-Dist: ruff<=0.6.8,>=0.5.0; extra == 'test'
|
36
|
+
Description-Content-Type: text/markdown
|
36
37
|
|
37
38
|
# Bencher
|
38
39
|
|
@@ -44,17 +45,16 @@ Requires-Dist: coverage<=7.5.3,>=7.2.7; extra == "test"
|
|
44
45
|
[](https://GitHub.com/dyson-ai/bencher/issues/)
|
45
46
|
[](https://github.com/dyson-ai/bencher/pulls?q=is%3Amerged)
|
46
47
|
[](https://pypi.org/project/holobench/)
|
47
|
-
[](https://pypistats.org/packages/holobench)
|
48
49
|
[](https://opensource.org/license/mit/)
|
49
|
-
[](https://www.python.org/downloads/
|
50
|
-
[](https://www.python.org/downloads/release/python-311/)
|
50
|
+
[](https://www.python.org/downloads/)
|
51
51
|
[](https://pixi.sh)
|
52
52
|
|
53
|
-
##
|
54
|
-
|
55
|
-
### Pixi Badge
|
56
|
-
The Pixi badge indicates that this project is optimized for performance and follows best practices as evaluated by the Pixi tool. For more information, visit [Pixi](https://pixi.sh).
|
53
|
+
## Install
|
57
54
|
|
55
|
+
```bash
|
56
|
+
pip install holobench
|
57
|
+
```
|
58
58
|
|
59
59
|
## Intro
|
60
60
|
|
@@ -85,9 +85,43 @@ Bencher is designed to work with stochastic pure functions with no side effects.
|
|
85
85
|
combine latest data with historical data
|
86
86
|
|
87
87
|
store the results using the input hash as a key
|
88
|
-
deduce the type of plot based on the input types
|
88
|
+
deduce the type of plot based on the input and output types
|
89
89
|
return data and plot
|
90
90
|
|
91
|
-
|
91
|
+
|
92
|
+
## Demo
|
93
|
+
|
94
|
+
if you have [pixi](https://github.com/prefix-dev/pixi/) installed you can run a demo example with:
|
95
|
+
|
96
|
+
```bash
|
97
|
+
pixi run demo
|
98
|
+
```
|
99
|
+
|
100
|
+
An example of the type of output bencher produces can be seen here:
|
92
101
|
|
93
102
|
https://dyson-ai.github.io/bencher/
|
103
|
+
|
104
|
+
|
105
|
+
## Examples
|
106
|
+
|
107
|
+
Most of the features that are supported are demonstrated in the examples folder.
|
108
|
+
|
109
|
+
Start with example_simple_float.py and explore other examples based on your data types:
|
110
|
+
- example_float.py: More complex float operations
|
111
|
+
- example_float2D.py: 2D float sweeps
|
112
|
+
- example_float3D.py: 3D float sweeps
|
113
|
+
- example_categorical.py: Sweeping categorical values (enums)
|
114
|
+
- example_strings.py: Sweeping categorical string values
|
115
|
+
- example_float_cat.py: Mixing float and categorical values
|
116
|
+
- example_image.py: Output images as part of the sweep
|
117
|
+
- example_video.py: Output videos as part of the sweep
|
118
|
+
- example_filepath.py: Output arbitrary files as part of the sweep
|
119
|
+
- and many others
|
120
|
+
|
121
|
+
|
122
|
+
## Documentation
|
123
|
+
|
124
|
+
API documentation can be found at https://bencher.readthedocs.io/en/latest/
|
125
|
+
|
126
|
+
More documentation is needed for the examples and general workflow.
|
127
|
+
|
@@ -8,17 +8,16 @@
|
|
8
8
|
[](https://GitHub.com/dyson-ai/bencher/issues/)
|
9
9
|
[](https://github.com/dyson-ai/bencher/pulls?q=is%3Amerged)
|
10
10
|
[](https://pypi.org/project/holobench/)
|
11
|
-
[](https://pypistats.org/packages/holobench)
|
12
12
|
[](https://opensource.org/license/mit/)
|
13
|
-
[](https://www.python.org/downloads/
|
14
|
-
[](https://www.python.org/downloads/release/python-311/)
|
13
|
+
[](https://www.python.org/downloads/)
|
15
14
|
[](https://pixi.sh)
|
16
15
|
|
17
|
-
##
|
18
|
-
|
19
|
-
### Pixi Badge
|
20
|
-
The Pixi badge indicates that this project is optimized for performance and follows best practices as evaluated by the Pixi tool. For more information, visit [Pixi](https://pixi.sh).
|
16
|
+
## Install
|
21
17
|
|
18
|
+
```bash
|
19
|
+
pip install holobench
|
20
|
+
```
|
22
21
|
|
23
22
|
## Intro
|
24
23
|
|
@@ -49,9 +48,43 @@ Bencher is designed to work with stochastic pure functions with no side effects.
|
|
49
48
|
combine latest data with historical data
|
50
49
|
|
51
50
|
store the results using the input hash as a key
|
52
|
-
deduce the type of plot based on the input types
|
51
|
+
deduce the type of plot based on the input and output types
|
53
52
|
return data and plot
|
54
53
|
|
55
|
-
|
54
|
+
|
55
|
+
## Demo
|
56
|
+
|
57
|
+
if you have [pixi](https://github.com/prefix-dev/pixi/) installed you can run a demo example with:
|
58
|
+
|
59
|
+
```bash
|
60
|
+
pixi run demo
|
61
|
+
```
|
62
|
+
|
63
|
+
An example of the type of output bencher produces can be seen here:
|
56
64
|
|
57
65
|
https://dyson-ai.github.io/bencher/
|
66
|
+
|
67
|
+
|
68
|
+
## Examples
|
69
|
+
|
70
|
+
Most of the features that are supported are demonstrated in the examples folder.
|
71
|
+
|
72
|
+
Start with example_simple_float.py and explore other examples based on your data types:
|
73
|
+
- example_float.py: More complex float operations
|
74
|
+
- example_float2D.py: 2D float sweeps
|
75
|
+
- example_float3D.py: 3D float sweeps
|
76
|
+
- example_categorical.py: Sweeping categorical values (enums)
|
77
|
+
- example_strings.py: Sweeping categorical string values
|
78
|
+
- example_float_cat.py: Mixing float and categorical values
|
79
|
+
- example_image.py: Output images as part of the sweep
|
80
|
+
- example_video.py: Output videos as part of the sweep
|
81
|
+
- example_filepath.py: Output arbitrary files as part of the sweep
|
82
|
+
- and many others
|
83
|
+
|
84
|
+
|
85
|
+
## Documentation
|
86
|
+
|
87
|
+
API documentation can be found at https://bencher.readthedocs.io/en/latest/
|
88
|
+
|
89
|
+
More documentation is needed for the examples and general workflow.
|
90
|
+
|
@@ -30,6 +30,7 @@ from bencher.variables.results import (
|
|
30
30
|
ResultString,
|
31
31
|
ResultContainer,
|
32
32
|
ResultReference,
|
33
|
+
ResultDataSet,
|
33
34
|
)
|
34
35
|
from bencher.results.bench_result import BenchResult
|
35
36
|
from bencher.variables.parametrised_sweep import ParametrizedSweep
|
@@ -612,12 +613,13 @@ class Bench(BenchPlotServer):
|
|
612
613
|
)
|
613
614
|
# xarray stores K N-dimensional arrays of data. Each array is named and in this case we have a nd array for each result variable
|
614
615
|
data_vars = {}
|
616
|
+
dataset_list = []
|
615
617
|
|
616
618
|
for rv in bench_cfg.result_vars:
|
617
619
|
if isinstance(rv, ResultVar):
|
618
620
|
result_data = np.full(dims_cfg.dims_size, np.nan, dtype=float)
|
619
621
|
data_vars[rv.name] = (dims_cfg.dims_name, result_data)
|
620
|
-
if isinstance(rv, ResultReference):
|
622
|
+
if isinstance(rv, (ResultReference, ResultDataSet)):
|
621
623
|
result_data = np.full(dims_cfg.dims_size, -1, dtype=int)
|
622
624
|
data_vars[rv.name] = (dims_cfg.dims_name, result_data)
|
623
625
|
if isinstance(
|
@@ -625,7 +627,8 @@ class Bench(BenchPlotServer):
|
|
625
627
|
):
|
626
628
|
result_data = np.full(dims_cfg.dims_size, "NAN", dtype=object)
|
627
629
|
data_vars[rv.name] = (dims_cfg.dims_name, result_data)
|
628
|
-
|
630
|
+
|
631
|
+
elif type(rv) is ResultVec:
|
629
632
|
for i in range(rv.size):
|
630
633
|
result_data = np.full(dims_cfg.dims_size, np.nan)
|
631
634
|
data_vars[rv.index_name(i)] = (dims_cfg.dims_name, result_data)
|
@@ -633,6 +636,7 @@ class Bench(BenchPlotServer):
|
|
633
636
|
bench_res = BenchResult(bench_cfg)
|
634
637
|
bench_res.ds = xr.Dataset(data_vars=data_vars, coords=dims_cfg.coords)
|
635
638
|
bench_res.ds_dynamic = self.ds_dynamic
|
639
|
+
bench_res.dataset_list = dataset_list
|
636
640
|
bench_res.setup_object_index()
|
637
641
|
|
638
642
|
return bench_res, function_inputs, dims_cfg.dims_name
|
@@ -770,6 +774,13 @@ class Bench(BenchPlotServer):
|
|
770
774
|
),
|
771
775
|
):
|
772
776
|
set_xarray_multidim(bench_res.ds[rv.name], worker_job.index_tuple, result_value)
|
777
|
+
elif isinstance(rv, ResultDataSet):
|
778
|
+
bench_res.dataset_list.append(result_value)
|
779
|
+
set_xarray_multidim(
|
780
|
+
bench_res.ds[rv.name],
|
781
|
+
worker_job.index_tuple,
|
782
|
+
len(bench_res.dataset_list) - 1,
|
783
|
+
)
|
773
784
|
elif isinstance(rv, ResultReference):
|
774
785
|
bench_res.object_index.append(result_value)
|
775
786
|
set_xarray_multidim(
|
@@ -777,6 +788,7 @@ class Bench(BenchPlotServer):
|
|
777
788
|
worker_job.index_tuple,
|
778
789
|
len(bench_res.object_index) - 1,
|
779
790
|
)
|
791
|
+
|
780
792
|
elif isinstance(rv, ResultVec):
|
781
793
|
if isinstance(result_value, (list, np.ndarray)):
|
782
794
|
if len(result_value) == rv.size:
|
@@ -822,10 +834,10 @@ class Bench(BenchPlotServer):
|
|
822
834
|
"""
|
823
835
|
|
824
836
|
for rv in bench_res.bench_cfg.result_vars:
|
825
|
-
if type(rv)
|
837
|
+
if type(rv) is ResultVar:
|
826
838
|
bench_res.ds[rv.name].attrs["units"] = rv.units
|
827
839
|
bench_res.ds[rv.name].attrs["long_name"] = rv.name
|
828
|
-
elif type(rv)
|
840
|
+
elif type(rv) is ResultVec:
|
829
841
|
for i in range(rv.size):
|
830
842
|
bench_res.ds[rv.index_name(i)].attrs["units"] = rv.units
|
831
843
|
bench_res.ds[rv.index_name(i)].attrs["long_name"] = rv.name
|
@@ -0,0 +1,48 @@
|
|
1
|
+
import bencher as bch
|
2
|
+
|
3
|
+
import xarray as xr
|
4
|
+
import numpy as np
|
5
|
+
import holoviews as hv
|
6
|
+
|
7
|
+
|
8
|
+
class ExampleMergeDataset(bch.ParametrizedSweep):
|
9
|
+
|
10
|
+
value = bch.FloatSweep(default=0, bounds=[0, 10])
|
11
|
+
repeats_x = bch.IntSweep(default=2, bounds=[2, 4])
|
12
|
+
# repeats_y = bch.IntSweep(default=2, bounds=[2, 4])
|
13
|
+
|
14
|
+
result_df = bch.ResultDataSet()
|
15
|
+
|
16
|
+
def __call__(self, **kwargs):
|
17
|
+
self.update_params_from_kwargs(**kwargs)
|
18
|
+
# First, create a DataArray from the vector
|
19
|
+
vector = [v + self.value for v in range(1, self.repeats_x)]
|
20
|
+
data_array = xr.DataArray(vector, dims=["index"], coords={"index": np.arange(len(vector))})
|
21
|
+
# Convert the DataArray to a Dataset
|
22
|
+
result_df = xr.Dataset({"result_df": data_array})
|
23
|
+
self.result_df = bch.ResultDataSet(result_df.to_pandas())
|
24
|
+
return super().__call__(**kwargs)
|
25
|
+
|
26
|
+
|
27
|
+
def example_dataset(run_cfg: bch.BenchRunCfg = None, report: bch.BenchReport = None):
|
28
|
+
bench = ExampleMergeDataset().to_bench(run_cfg, report)
|
29
|
+
res = bench.plot_sweep(input_vars=["value"], const_vars=dict(repeats_x=4))
|
30
|
+
# bench.report.append(res.to_panes(target_dimension=1))
|
31
|
+
# bench.report.append(res.to_panes(target_dimension=2))
|
32
|
+
# bench.reprt.append(res.to_video_grid
|
33
|
+
# # bch.BenchResult.to_video_grid,
|
34
|
+
# target_duration=0.06,
|
35
|
+
# compose_method_list=[
|
36
|
+
# bch.ComposeType.right,
|
37
|
+
# bch.ComposeType.right,
|
38
|
+
# bch.ComposeType.sequence,
|
39
|
+
# ],
|
40
|
+
# )
|
41
|
+
# bench.report.append(res.to_panes(container=hv.Bars,target_dimension=1))
|
42
|
+
# bench.report.append(res.to_panes(container=hv.Curve))
|
43
|
+
bench.report.append(res.to_dataset1(container=hv.Curve))
|
44
|
+
return bench
|
45
|
+
|
46
|
+
|
47
|
+
if __name__ == "__main__":
|
48
|
+
example_dataset().report.show()
|
@@ -121,14 +121,12 @@ if __name__ == "__main__":
|
|
121
121
|
|
122
122
|
# res = bench.sweep(input_vars=["sides", "radius"])
|
123
123
|
|
124
|
-
# bench.report.append(res.to_heatmap(target_dimension=3))
|
125
|
-
|
126
124
|
bench.plot_sweep(input_vars=["sides"])
|
127
125
|
bench.plot_sweep(input_vars=["sides", "color"])
|
128
126
|
|
129
|
-
bench.plot_sweep(input_vars=["sides", "radius"])
|
130
|
-
|
131
|
-
|
127
|
+
res = bench.plot_sweep(input_vars=["sides", "radius"])
|
128
|
+
bench.report.append(res.to_heatmap(target_dimension=3))
|
129
|
+
bench.report.append(res.to_line(target_dimension=1))
|
132
130
|
|
133
131
|
return bench
|
134
132
|
|
@@ -148,8 +146,8 @@ if __name__ == "__main__":
|
|
148
146
|
# ex_run_cfg.debug = True
|
149
147
|
# ex_run_cfg.repeats = 2
|
150
148
|
ex_run_cfg.level = 4
|
151
|
-
example_image_vid(ex_run_cfg).report.show()
|
152
|
-
|
149
|
+
# example_image_vid(ex_run_cfg).report.show()
|
150
|
+
simple().report.show()
|
153
151
|
|
154
152
|
# example_image_vid_sequential(ex_run_cfg).report.show()
|
155
153
|
# example_image(ex_run_cfg).report.show()
|
@@ -0,0 +1,81 @@
|
|
1
|
+
import bencher as bch
|
2
|
+
import numpy as np
|
3
|
+
import math
|
4
|
+
import matplotlib.pyplot as plt
|
5
|
+
|
6
|
+
|
7
|
+
def polygon_points(radius: float, sides: int, start_angle: float):
|
8
|
+
points = []
|
9
|
+
for ang in np.linspace(0, 360, sides + 1):
|
10
|
+
angle = math.radians(start_angle + ang)
|
11
|
+
points.append(([math.sin(angle) * radius, math.cos(angle) * radius]))
|
12
|
+
return points
|
13
|
+
|
14
|
+
|
15
|
+
class BenchPolygons(bch.ParametrizedSweep):
|
16
|
+
sides = bch.IntSweep(default=3, bounds=(3, 7))
|
17
|
+
radius = bch.FloatSweep(default=1, bounds=(0.2, 1))
|
18
|
+
linewidth = bch.FloatSweep(default=1, bounds=(1, 10))
|
19
|
+
linestyle = bch.StringSweep(["solid", "dashed", "dotted"])
|
20
|
+
color = bch.StringSweep(["red", "green", "blue"])
|
21
|
+
start_angle = bch.FloatSweep(default=0, bounds=[0, 360])
|
22
|
+
polygon = bch.ResultImage()
|
23
|
+
polygon_small = bch.ResultImage()
|
24
|
+
|
25
|
+
area = bch.ResultVar()
|
26
|
+
side_length = bch.ResultVar()
|
27
|
+
|
28
|
+
def __call__(self, **kwargs):
|
29
|
+
self.update_params_from_kwargs(**kwargs)
|
30
|
+
points = polygon_points(self.radius, self.sides, self.start_angle)
|
31
|
+
# self.hmap = hv.Curve(points)
|
32
|
+
self.polygon = self.points_to_polygon_png(points, bch.gen_image_path("polygon"), dpi=30)
|
33
|
+
self.polygon_small = self.points_to_polygon_png(
|
34
|
+
points, bch.gen_image_path("polygon"), dpi=10
|
35
|
+
)
|
36
|
+
|
37
|
+
self.side_length = 2 * self.radius * math.sin(math.pi / self.sides)
|
38
|
+
self.area = (self.sides * self.side_length**2) / (4 * math.tan(math.pi / self.sides))
|
39
|
+
return super().__call__()
|
40
|
+
|
41
|
+
def points_to_polygon_png(self, points: list[float], filename: str, dpi):
|
42
|
+
"""Draw a closed polygon and save to png"""
|
43
|
+
fig = plt.figure(frameon=False)
|
44
|
+
ax = plt.Axes(fig, [0.0, 0.0, 1.0, 1.0], frameon=False)
|
45
|
+
ax.set_axis_off()
|
46
|
+
ax.plot(
|
47
|
+
[p[0] for p in points],
|
48
|
+
[p[1] for p in points],
|
49
|
+
linewidth=self.linewidth,
|
50
|
+
linestyle=self.linestyle,
|
51
|
+
color=self.color,
|
52
|
+
)
|
53
|
+
ax.set_xlim(-1, 1)
|
54
|
+
ax.set_ylim(-1, 1)
|
55
|
+
|
56
|
+
ax.set_aspect("equal")
|
57
|
+
fig.add_axes(ax)
|
58
|
+
fig.savefig(filename, dpi=dpi)
|
59
|
+
|
60
|
+
return filename
|
61
|
+
|
62
|
+
|
63
|
+
def example_image_vid_sequential1(
|
64
|
+
run_cfg: bch.BenchRunCfg = None, report: bch.BenchReport = None
|
65
|
+
) -> bch.Bench:
|
66
|
+
bench = BenchPolygons().to_bench(run_cfg, report)
|
67
|
+
res = bench.plot_sweep(input_vars=["sides"])
|
68
|
+
|
69
|
+
bench.report.append(res.to_panes(zip_results=True))
|
70
|
+
|
71
|
+
return bench
|
72
|
+
|
73
|
+
|
74
|
+
if __name__ == "__main__":
|
75
|
+
|
76
|
+
ex_run_cfg = bch.BenchRunCfg()
|
77
|
+
ex_run_cfg.use_sample_cache = True
|
78
|
+
ex_run_cfg.overwrite_sample_cache = True
|
79
|
+
ex_run_cfg.level = 3
|
80
|
+
|
81
|
+
example_image_vid_sequential1(ex_run_cfg).report.show()
|
@@ -7,15 +7,17 @@ from bencher.results.video_summary import VideoSummaryResult
|
|
7
7
|
from bencher.results.panel_result import PanelResult
|
8
8
|
from bencher.results.plotly_result import PlotlyResult
|
9
9
|
from bencher.results.holoview_result import HoloviewResult
|
10
|
+
from bencher.results.dataset_result import DataSetResult
|
10
11
|
from bencher.utils import listify
|
11
12
|
|
12
13
|
|
13
|
-
class BenchResult(PlotlyResult, HoloviewResult, VideoSummaryResult):
|
14
|
+
class BenchResult(PlotlyResult, HoloviewResult, VideoSummaryResult, DataSetResult):
|
14
15
|
"""Contains the results of the benchmark and has methods to cast the results to various datatypes and graphical representations"""
|
15
16
|
|
16
17
|
def __init__(self, bench_cfg) -> None:
|
17
18
|
PlotlyResult.__init__(self, bench_cfg)
|
18
19
|
HoloviewResult.__init__(self, bench_cfg)
|
20
|
+
# DataSetResult.__init__(self.bench_cfg)
|
19
21
|
|
20
22
|
@staticmethod
|
21
23
|
def default_plot_callbacks():
|