Skip to content

Commit 28a0a64

Browse files
committed
fix: consider slope >50 as fail
1 parent ea81883 commit 28a0a64

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

lambench/metrics/utils.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ def aggregated_nve_md_results(results: dict[str, dict[str, float]]) -> dict[str,
110110
aggregated_result = {}
111111
success_count = len(results)
112112
for test_system, result in results.items():
113-
if result["steps"] != NVEMD_NSTEPS:
113+
if result["steps"] != NVEMD_NSTEPS or result["slope"]>=50:
114114
success_count -= 1
115115
continue # Skip the incomplete simulation
116116
for k, v in result.items():

lambench/metrics/vishelper/metrics_calculations.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -190,10 +190,10 @@ def _calculate_instability_error(self, cell: dict, lambda_0: float = 5e-4) -> fl
190190
return 5
191191
else:
192192
slope = cell.get("slope", None)
193-
if slope is None:
193+
if slope is None or np.log10(slope / lambda_0) >=5:
194194
return 5
195195
else:
196-
return np.clip(np.log10(cell["slope"] / lambda_0), a_min=0, a_max=None)
196+
return np.clip(np.log10(slope / lambda_0), a_min=0, a_max=None)
197197

198198
def calculate_efficiency_results(self) -> dict[str, float]:
199199
efficiency_results = self.fetcher.fetch_inference_efficiency_results()

0 commit comments

Comments
 (0)