deepmodeling / deepmodeling/LAMBench
[Code scan] Inference-efficiency expansion crashes when a structure exceeds the atom cap
- 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/tasks/calculator/inference_efficiency/inference_efficiency.py#L70-L91
https://github.com/deepmodeling/LAMBench/blob/8c93925cb10b401b2b83c738bd9263fd74474468/lambench/tasks/calculator/inference_efficiency/efficiency_utils.py#L42-L66
### Impact
When `len(atoms) > natoms_upper_limit`, `scaling_factor = floor(max_natoms / len(atoms))` becomes `0`. `find_even_factors(0)` returns `None`, so unpacking `a, b, c` raises before inference can run.
That turns an oversized input structure into a task-level failure instead of benchmarking the original structure or reporting a controlled skip.
### Suggested fix
Clamp the expansion factor to at least `1`, or explicitly skip expansion and benchmark the original structure when the cap is below the input atom count. Add a regression test with `len(atoms) > natoms_upper_limit`.
Contributor guide
No contributing guide indexed for this repository
Assessment
This issue has not been assessed yet.