holobench 1.2.1__tar.gz → 1.2.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.
- {holobench-1.2.1 → holobench-1.2.2}/PKG-INFO +1 -1
- {holobench-1.2.1/bencher/example → holobench-1.2.2/bencher/example/meta}/example_meta.py +5 -5
- holobench-1.2.2/bencher/example/meta/example_meta_cat.py +25 -0
- holobench-1.2.2/bencher/example/meta/example_meta_float.py +23 -0
- {holobench-1.2.1/bencher/example → holobench-1.2.2/bencher/example/meta}/example_meta_levels.py +2 -2
- {holobench-1.2.1 → holobench-1.2.2}/bencher/results/bench_result_base.py +4 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/variables/parametrised_sweep.py +8 -2
- {holobench-1.2.1 → holobench-1.2.2}/pyproject.toml +1 -1
- {holobench-1.2.1 → holobench-1.2.2}/README.md +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/__init__.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/bench_cfg.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/bench_plot_server.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/bench_report.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/bench_runner.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/bencher.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/caching.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/__init__.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/benchmark_data.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_all.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_categorical.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_custom_sweep.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_float3D.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_float_cat.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_floats.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_floats2D.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_holosweep.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_holosweep_objects.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_holosweep_tap.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_image.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_levels.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_pareto.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_sample_cache.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_sample_cache_context.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_simple.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_simple_bool.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_simple_cat.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_simple_float.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_strings.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_time_event.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_video.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/example_workflow.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/experimental/example_bokeh_plotly.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/experimental/example_hover_ex.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/experimental/example_hvplot_explorer.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/experimental/example_interactive.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/experimental/example_streamnd.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/experimental/example_streams.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/experimental/example_template.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/experimental/example_updates.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/experimental/example_vector.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/mortgage/example_investment.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/mortgage/example_mortgage.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/mortgage/example_mortgage_simulator.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/mortgage/example_personal_finance.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/optuna/example_optuna.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/shelved/example_float2D_scatter.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/shelved/example_float3D_cone.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/example/shelved/example_kwargs.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/job.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/optuna_conversions.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/plotting/__init__.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/plotting/plot_filter.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/plotting/plt_cnt_cfg.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/results/__init__.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/results/bench_result.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/results/holoview_result.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/results/optuna_result.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/results/panel_result.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/results/plotly_result.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/utils.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/variables/inputs.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/variables/results.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/variables/sweep_base.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/variables/time.py +0 -0
- {holobench-1.2.1 → holobench-1.2.2}/bencher/worker_job.py +0 -0
@@ -78,12 +78,12 @@ class BenchMeta(bch.ParametrizedSweep):
|
|
78
78
|
"""This class uses bencher to display the multidimensional types bencher can represent"""
|
79
79
|
|
80
80
|
float_vars = bch.IntSweep(
|
81
|
-
default=1, bounds=(0,
|
81
|
+
default=1, bounds=(0, 4), doc="The number of floating point variables that are swept"
|
82
82
|
)
|
83
83
|
categorical_vars = bch.IntSweep(
|
84
84
|
default=1, bounds=(0, 3), doc="The number of categorical variables that are swept"
|
85
85
|
)
|
86
|
-
sample_with_repeats = bch.IntSweep(default=1, bounds=(1,
|
86
|
+
sample_with_repeats = bch.IntSweep(default=1, bounds=(1, 10))
|
87
87
|
|
88
88
|
sample_over_time = bch.BoolSweep(default=False)
|
89
89
|
|
@@ -143,16 +143,16 @@ class BenchMeta(bch.ParametrizedSweep):
|
|
143
143
|
def example_meta(
|
144
144
|
run_cfg: bch.BenchRunCfg = bch.BenchRunCfg(), report: bch.BenchReport = bch.BenchReport()
|
145
145
|
) -> bch.Bench:
|
146
|
-
bench =
|
146
|
+
bench = BenchMeta().to_bench(run_cfg, report)
|
147
147
|
|
148
148
|
bench.plot_sweep(
|
149
149
|
title="Meta Bench",
|
150
150
|
description="""## All Combinations of Variable Sweeps and Resulting Plots
|
151
151
|
This uses bencher to display all the combinatios of plots bencher is able to produce""",
|
152
152
|
input_vars=[
|
153
|
-
BenchMeta.param.float_vars,
|
153
|
+
BenchMeta.param.float_vars.with_sample_values([0, 1, 2, 3]),
|
154
154
|
BenchMeta.param.categorical_vars,
|
155
|
-
BenchMeta.param.sample_with_repeats,
|
155
|
+
BenchMeta.param.sample_with_repeats.with_sample_values([1, 2]),
|
156
156
|
# BenchMeta.param.sample_over_time,
|
157
157
|
],
|
158
158
|
const_vars=[
|
@@ -0,0 +1,25 @@
|
|
1
|
+
import bencher as bch
|
2
|
+
from bencher.example.meta.example_meta import BenchMeta
|
3
|
+
|
4
|
+
|
5
|
+
def example_meta_cat(
|
6
|
+
run_cfg: bch.BenchRunCfg = bch.BenchRunCfg(), report: bch.BenchReport = bch.BenchReport()
|
7
|
+
) -> bch.Bench:
|
8
|
+
bench = BenchMeta().to_bench(run_cfg, report)
|
9
|
+
|
10
|
+
bench.plot_sweep(
|
11
|
+
title="Sweeping Categorical Variables",
|
12
|
+
input_vars=[
|
13
|
+
BenchMeta.param.categorical_vars.with_sample_values([1, 2, 3]),
|
14
|
+
BenchMeta.param.sample_with_repeats.with_sample_values([1, 2]),
|
15
|
+
],
|
16
|
+
const_vars=[
|
17
|
+
BenchMeta.param.float_vars.with_const(0),
|
18
|
+
],
|
19
|
+
)
|
20
|
+
|
21
|
+
return bench
|
22
|
+
|
23
|
+
|
24
|
+
if __name__ == "__main__":
|
25
|
+
example_meta_cat().report.show()
|
@@ -0,0 +1,23 @@
|
|
1
|
+
import bencher as bch
|
2
|
+
from bencher.example.meta.example_meta import BenchMeta
|
3
|
+
|
4
|
+
|
5
|
+
def example_meta_float(
|
6
|
+
run_cfg: bch.BenchRunCfg = bch.BenchRunCfg(), report: bch.BenchReport = bch.BenchReport()
|
7
|
+
) -> bch.Bench:
|
8
|
+
bench = BenchMeta().to_bench(run_cfg, report)
|
9
|
+
|
10
|
+
bench.plot_sweep(
|
11
|
+
title="Sweeping Floating Point Variables",
|
12
|
+
input_vars=[BenchMeta.param.float_vars.with_sample_values([1, 2, 3, 4])],
|
13
|
+
const_vars=[
|
14
|
+
BenchMeta.param.categorical_vars.with_const(0),
|
15
|
+
BenchMeta.param.level.with_const(3),
|
16
|
+
],
|
17
|
+
)
|
18
|
+
|
19
|
+
return bench
|
20
|
+
|
21
|
+
|
22
|
+
if __name__ == "__main__":
|
23
|
+
example_meta_float().report.show()
|
{holobench-1.2.1/bencher/example → holobench-1.2.2/bencher/example/meta}/example_meta_levels.py
RENAMED
@@ -1,11 +1,11 @@
|
|
1
1
|
import bencher as bch
|
2
|
-
from bencher.example.example_meta import BenchMeta
|
2
|
+
from bencher.example.meta.example_meta import BenchMeta
|
3
3
|
|
4
4
|
|
5
5
|
def example_meta_levels(
|
6
6
|
run_cfg: bch.BenchRunCfg = bch.BenchRunCfg(), report: bch.BenchReport = bch.BenchReport()
|
7
7
|
) -> bch.Bench:
|
8
|
-
bench =
|
8
|
+
bench = BenchMeta().to_bench(run_cfg, report)
|
9
9
|
|
10
10
|
bench.plot_sweep(
|
11
11
|
title="Using Levels to define sample density",
|
@@ -57,6 +57,10 @@ class BenchResultBase(OptunaResult):
|
|
57
57
|
Returns:
|
58
58
|
hv.Dataset: results in the form of a holoviews dataset
|
59
59
|
"""
|
60
|
+
|
61
|
+
if reduce == ReduceType.NONE:
|
62
|
+
kdims = [i.name for i in self.bench_cfg.all_vars]
|
63
|
+
return hv.Dataset(self.to_dataset(reduce, result_var), kdims=kdims)
|
60
64
|
return hv.Dataset(self.to_dataset(reduce, result_var))
|
61
65
|
|
62
66
|
def to_dataset(
|
@@ -16,6 +16,7 @@ from bencher.variables.results import (
|
|
16
16
|
ResultContainer,
|
17
17
|
ResultReference,
|
18
18
|
)
|
19
|
+
|
19
20
|
from uuid import uuid4
|
20
21
|
|
21
22
|
|
@@ -207,7 +208,12 @@ class ParametrizedSweep(Parameterized):
|
|
207
208
|
def gen_image_path(self, image_name: str, filetype=".png") -> str:
|
208
209
|
return self.gen_path(image_name, "img", filetype)
|
209
210
|
|
210
|
-
def to_bench(self, run_cfg=None, report=None):
|
211
|
+
def to_bench(self, run_cfg=None, report=None, name: str = None):
|
211
212
|
from bencher import Bench
|
212
213
|
|
213
|
-
|
214
|
+
assert isinstance(self, ParametrizedSweep)
|
215
|
+
|
216
|
+
if name is None:
|
217
|
+
name = self.name
|
218
|
+
|
219
|
+
return Bench(name, self, run_cfg=run_cfg, report=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
|
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
|