deepmodeling / deepmodeling/LAMBench

[Code scan] Missing NVE systems crash stability scoring instead of receiving the failure penalty

Open
#440 0 comments 0 reactions 0 assignees View on GitHub
Dominant language
Python
Stars
20
Forks
11
Avg merge
30m
Merged PRs (30d)
4

Description

This issue was found by a Codex global repository scan of tracked non-test files at commit `8c93925cb10b401b2b83c738bd9263fd74474468`.

### Relevant code
https://github.com/deepmodeling/LAMBench/blob/8c93925cb10b401b2b83c738bd9263fd74474468/lambench/metrics/vishelper/metrics_calculations.py#L166-L189

### Impact
`DataFrame.from_dict(..., orient="index")` fills missing per-system NVE entries with `NaN`. `_calculate_instability_error()` handles `None`, but then calls `cell.get(...)` on the cell value. For `NaN`, that raises `AttributeError` instead of returning the documented failure penalty.

A model with one missing NVE system can crash stability scoring rather than receiving the intended penalty.

### Suggested fix
Treat non-dict, null, and `NaN` cells as failed simulations and return `5`. Add a regression test where one model is missing a system present for another model.

Contributor guide

No contributing guide indexed for this repository

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.