Skip to content

Commit d16c9a8

Browse files
committed
fix benchmarks
1 parent 68ecc3d commit d16c9a8

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

benchmarks/benchmark_sed.py

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@
3535
test_data_dir = os.path.join(package_dir, "..", "tests", "data")
3636
runs = {"generic": None, "mpes": ["30", "50"], "flash": ["43878"], "sxp": ["0016"]}
3737

38-
targets = load_config(package_dir + "/../benchmarks/benchmark_targets.yaml")
38+
targets = load_config(package_dir + "/../../benchmarks/benchmark_targets.yaml")
3939

4040

4141
def test_binning_1d() -> None:
@@ -59,7 +59,7 @@ def test_binning_1d() -> None:
5959
if np.mean(result) < 0.8 * targets["binning_1d"]:
6060
print(f"Updating targets for 'binning_1d' to {float(np.mean(result))}")
6161
targets["binning_1d"] = float(np.mean(result))
62-
save_config(targets, package_dir + "/../benchmarks/benchmark_targets.yaml")
62+
save_config(targets, package_dir + "/../../benchmarks/benchmark_targets.yaml")
6363

6464

6565
def test_binning_4d() -> None:
@@ -83,14 +83,14 @@ def test_binning_4d() -> None:
8383
if np.mean(result) < 0.8 * targets["binning_4d"]:
8484
print(f"Updating targets for 'binning_4d' to {float(np.mean(result))}")
8585
targets["binning_4d"] = float(np.mean(result))
86-
save_config(targets, package_dir + "/../benchmarks/benchmark_targets.yaml")
86+
save_config(targets, package_dir + "/../../benchmarks/benchmark_targets.yaml")
8787

8888

8989
def test_splinewarp() -> None:
9090
"""Run a benchmark for the generation of the inverse dfield correction"""
9191
processor = SedProcessor(
9292
dataframe=dataframe.copy(),
93-
config=package_dir + "/config/mpes_example_config.yaml",
93+
config=package_dir + "/../../config/mpes_example_config.yaml",
9494
folder_config={},
9595
user_config={},
9696
system_config={},
@@ -109,14 +109,14 @@ def test_splinewarp() -> None:
109109
if np.mean(result) < 0.8 * targets["inv_dfield"]:
110110
print(f"Updating targets for 'inv_dfield' to {float(np.mean(result))}")
111111
targets["inv_dfield"] = float(np.mean(result))
112-
save_config(targets, package_dir + "/../benchmarks/benchmark_targets.yaml")
112+
save_config(targets, package_dir + "/../../benchmarks/benchmark_targets.yaml")
113113

114114

115115
def test_workflow_1d() -> None:
116116
"""Run a benchmark for 1d binning of converted data"""
117117
processor = SedProcessor(
118118
dataframe=dataframe.copy(),
119-
config=package_dir + "/config/mpes_example_config.yaml",
119+
config=package_dir + "/../../config/mpes_example_config.yaml",
120120
folder_config={},
121121
user_config={},
122122
system_config={},
@@ -145,14 +145,14 @@ def test_workflow_1d() -> None:
145145
if np.mean(result) < 0.8 * targets["workflow_1d"]:
146146
print(f"Updating targets for 'workflow_1d' to {float(np.mean(result))}")
147147
targets["workflow_1d"] = float(np.mean(result))
148-
save_config(targets, package_dir + "/../benchmarks/benchmark_targets.yaml")
148+
save_config(targets, package_dir + "/../../benchmarks/benchmark_targets.yaml")
149149

150150

151151
def test_workflow_4d() -> None:
152152
"""Run a benchmark for 4d binning of converted data"""
153153
processor = SedProcessor(
154154
dataframe=dataframe.copy(),
155-
config=package_dir + "/config/mpes_example_config.yaml",
155+
config=package_dir + "/../../config/mpes_example_config.yaml",
156156
folder_config={},
157157
user_config={},
158158
system_config={},
@@ -181,7 +181,7 @@ def test_workflow_4d() -> None:
181181
if np.mean(result) < 0.8 * targets["workflow_4d"]:
182182
print(f"Updating targets for 'workflow_4d' to {float(np.mean(result))}")
183183
targets["workflow_4d"] = float(np.mean(result))
184-
save_config(targets, package_dir + "/../benchmarks/benchmark_targets.yaml")
184+
save_config(targets, package_dir + "/../../benchmarks/benchmark_targets.yaml")
185185

186186

187187
@pytest.mark.parametrize("loader", get_all_loaders())
@@ -210,4 +210,4 @@ def test_loader_compute(loader: BaseLoader) -> None:
210210
f"to {float(np.mean(result))}",
211211
)
212212
targets[f"loader_compute_{loader_name}"] = float(np.mean(result))
213-
save_config(targets, package_dir + "/../benchmarks/benchmark_targets.yaml")
213+
save_config(targets, package_dir + "/../../benchmarks/benchmark_targets.yaml")

0 commit comments

Comments
 (0)