Skip to content

Commit 6d5c55c

Browse files
committed
fix benchmarks
1 parent 68b2eaf commit 6d5c55c

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

benchmarks/benchmark_sed.py

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ def test_binning_1d() -> None:
5454
)
5555
result = timer.repeat(5, number=1)
5656
print(result)
57-
assert min(result) < targets["binning_1d"] * 1.25 # allows 25% error margin
57+
assert min(result) < targets["binning_1d"] * 1.25 # allows 25% error margin
5858
# update targets if > 20% improvement occurs beyond old bestmark
5959
if np.mean(result) < 0.8 * targets["binning_1d"]:
6060
print(f"Updating targets for 'binning_1d' to {float(np.mean(result))}")
@@ -78,7 +78,7 @@ def test_binning_4d() -> None:
7878
)
7979
result = timer.repeat(5, number=1)
8080
print(result)
81-
assert min(result) < targets["binning_4d"] * 1.25 # allows 25% error margin
81+
assert min(result) < targets["binning_4d"] * 1.25 # allows 25% error margin
8282
# update targets if > 20% improvement occurs beyond old bestmark
8383
if np.mean(result) < 0.8 * targets["binning_4d"]:
8484
print(f"Updating targets for 'binning_4d' to {float(np.mean(result))}")
@@ -95,6 +95,7 @@ def test_splinewarp() -> None:
9595
user_config={},
9696
system_config={},
9797
verbose=True,
98+
verify_config=False,
9899
)
99100
processor.apply_momentum_correction()
100101
timer = timeit.Timer(
@@ -103,7 +104,7 @@ def test_splinewarp() -> None:
103104
)
104105
result = timer.repeat(5, number=1)
105106
print(result)
106-
assert min(result) < targets["inv_dfield"] * 1.25 # allows 25% error margin
107+
assert min(result) < targets["inv_dfield"] * 1.25 # allows 25% error margin
107108
# update targets if > 20% improvement occurs beyond old bestmark
108109
if np.mean(result) < 0.8 * targets["inv_dfield"]:
109110
print(f"Updating targets for 'inv_dfield' to {float(np.mean(result))}")
@@ -120,6 +121,7 @@ def test_workflow_1d() -> None:
120121
user_config={},
121122
system_config={},
122123
verbose=True,
124+
verify_config=False,
123125
)
124126
processor.dataframe["sampleBias"] = 16.7
125127
processor.add_jitter()
@@ -138,7 +140,7 @@ def test_workflow_1d() -> None:
138140
)
139141
result = timer.repeat(5, number=1)
140142
print(result)
141-
assert min(result) < targets["workflow_1d"] * 1.25 # allows 25% error margin
143+
assert min(result) < targets["workflow_1d"] * 1.25 # allows 25% error margin
142144
# update targets if > 20% improvement occurs beyond old bestmark
143145
if np.mean(result) < 0.8 * targets["workflow_1d"]:
144146
print(f"Updating targets for 'workflow_1d' to {float(np.mean(result))}")
@@ -155,6 +157,7 @@ def test_workflow_4d() -> None:
155157
user_config={},
156158
system_config={},
157159
verbose=True,
160+
verify_config=False,
158161
)
159162
processor.dataframe["sampleBias"] = 16.7
160163
processor.add_jitter()
@@ -173,7 +176,7 @@ def test_workflow_4d() -> None:
173176
)
174177
result = timer.repeat(5, number=1)
175178
print(result)
176-
assert min(result) < targets["workflow_4d"] * 1.25 # allows 25% error margin
179+
assert min(result) < targets["workflow_4d"] * 1.25 # allows 25% error margin
177180
# update targets if > 20% improvement occurs beyond old bestmark
178181
if np.mean(result) < 0.8 * targets["workflow_4d"]:
179182
print(f"Updating targets for 'workflow_4d' to {float(np.mean(result))}")
@@ -199,7 +202,7 @@ def test_loader_compute(loader: BaseLoader) -> None:
199202
)
200203
result = timer.repeat(20, number=1)
201204
print(result)
202-
assert min(result) < targets[f"loader_compute_{loader_name}"] * 1.25 # allows 25% margin
205+
assert min(result) < targets[f"loader_compute_{loader_name}"] * 1.25 # allows 25% margin
203206
# update targets if > 20% improvement occurs beyond old bestmark
204207
if np.mean(result) < 0.8 * targets[f"loader_compute_{loader_name}"]:
205208
print(

0 commit comments

Comments
 (0)