Skip to content

Commit cbd2e7a

Browse files
authored
Merge pull request #94 from deepmodeling/chore/clean-up-doc
Docs: enhance class docstrings for clarity
2 parents 5b39cdf + b9554b7 commit cbd2e7a

File tree

11 files changed

+1078
-960
lines changed

11 files changed

+1078
-960
lines changed

.github/workflows/run.yml

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,13 @@ jobs:
3232
run: |
3333
pip install .[dflow]
3434
35+
- name: Manual Approval
36+
uses: trstringer/manual-approval@v1
37+
with:
38+
secret: ${{ github.token }}
39+
approvers: ${{ secrets.APPROVERS }}
40+
minimum-approvals: 1
41+
3542
- name: Run LAMBench
3643
env:
3744
MYSQL_HOST: ${{ vars.MYSQL_HOST }}

CITATION.cff

Lines changed: 27 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,41 @@
11
cff-version: 1.2.0
2-
title: LAMBench
3-
message: 'If you use this software, please cite it as below.'
2+
message: "If you use this software, please cite it as below."
3+
title: "LAMBench"
4+
subtitle: "A benchmarking framework for Large Atom Models"
45
type: software
56
authors:
6-
- family-names: Cai
7-
given-names: Chun
87
- family-names: Peng
98
given-names: Anyang
9+
email: pengay@aisi.ac.cn
10+
corresponding: true
11+
affiliation: AI for Science Institute, Beijing
12+
orcid: https://orcid.org/0000-0002-0630-2187
13+
- family-names: Cai
14+
given-names: Chun
15+
email: caic@aisi.ac.cn
16+
affiliation: AI for Science Institute, Beijing
17+
orcid: https://orcid.org/0000-0001-6242-0439
1018
- family-names: Guo
1119
given-names: Mingyu
12-
- family-names: Zhang
13-
given-names: Chengqian
20+
affiliation: AI for Science Institute, Beijing
1421
- family-names: Zhang
1522
given-names: Duo
23+
affiliation: AI for Science Institute, Beijing
24+
orcid: https://orcid.org/0000-0001-9591-2659
25+
- family-names: Zhang
26+
given-names: Chengqian
27+
affiliation: AI for Science Institute, Beijing
1628
- family-names: Zhang
1729
given-names: Linfeng
30+
affiliation: AI for Science Institute, Beijing; DP Technology
1831
- family-names: Wang
1932
given-names: Han
20-
url: 'https://github.com/deepmodeling/LAMBench'
33+
affiliation: Laboratory of Computational Physics, Institute of Applied Physics and Computational Mathematics
34+
corresponding: true
35+
email: wang_han@iapcm.ac.cn
36+
37+
repository-code: "https://github.com/deepmodeling/LAMBench"
38+
url: "https://github.com/deepmodeling/LAMBench"
2139
license: MIT
22-
date-released: '2025-02-26'
40+
version: 0.1.0 # If you used a specific version of the software, please specify it here
41+
date-released: "2025-03-01"

README.md

Lines changed: 35 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -19,39 +19,35 @@ The optional dependencies are required for the corresponding models.
1919

2020
### Installing with EquiformerV2 models
2121

22-
Using EquiformerV2 models requires the installation of the additional pytorch-geometric packages.
22+
Using EquiformerV2 models requires the installation of additional pytorch-geometric packages.
2323
Follow [the instructions](https://pytorch-geometric.readthedocs.io/en/latest/notes/installation.html#additional-libraries), then install `lambench[fairchem]`, e.g.
24-
`pip install torch_geometric pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.4.0+cu124.html`
25-
26-
`mace-torch` pins `e3nn==0.4.4`, which is [not actually required](https://github.com/ACEsuit/mace/issues/555#issuecomment-2423730788) and conflicts with `fairchem`. One can install `lambench[fairchem]` and `lambench[mace]` separately to avoid the conflict.
27-
28-
## Usage
29-
30-
To run the benchmarks, use the following command:
31-
32-
```bash
33-
lambench
34-
```
35-
36-
### Command-line Arguments
37-
38-
Use `--models` to specify which models to run, `--tasks` to limit tasks, and `--task-types` to select task classes. Each flag is followed by one or more args. Add `--local` to run tasks on your local machine, instead of submitting jobs with `dflow`. For example:
3924

4025
```bash
41-
lambench --models DP_2024Q4 SSE_2024Q4 --tasks HPt_NC_2022 Si_ZEO22 --local
26+
pip install torch_geometric pyg_lib torch_scatter torch_sparse torch_cluster torch_spline_conv -f https://data.pyg.org/whl/torch-2.4.0+cu124.html
4227
```
4328

44-
Run the command below to see all options:
29+
`mace-torch` pins `e3nn==0.4.4`, which is [not actually required](https://github.com/ACEsuit/mace/issues/555#issuecomment-2423730788) and conflicts with `fairchem`. You can install `lambench[fairchem]` and `lambench[mace]` separately to avoid the conflict.
4530

46-
```bash
47-
lambench --help
48-
```
31+
## Usage
4932

50-
If there are errors importing the `torch` package regarding symbol error, try:
51-
52-
```bash
53-
export LD_LIBRARY_PATH=$CONDA_PREFIX/lib/python3.1/site-packages/torch/lib/../../nvidia/nvjitlink/lib:$LD_LIBRARY_PATH
54-
```
33+
To reproduce the results locally or test a custom model, please refer to the `ASEModel.evaluate` method.
34+
- For direct prediction tasks, you can use the staticmethod `run_ase_dptest(calc: Calculator, test_data: Path) -> dict`. The test data can be found [here](https://www.aissquare.com/datasets/detail?pageType=datasets&name=LAMBench-TestData-v1&id=295).
35+
- For calculator tasks, you can use the corresponding scripts provided in `lambench.tasks.calculator`.
36+
- The phonon test data can be found [here](https://www.aissquare.com/datasets/detail?pageType=datasets&name=LAMBench-Phonon-MDR&id=310).
37+
- An `ASEModel` object is needed for such tasks; you can create a dummy model as follows:
38+
```python
39+
model = ASEModel(
40+
model_name="dummy",
41+
model_type="ASE",
42+
model_family="<FAMILY_NAME>",
43+
virtualenv="test",
44+
model_metadata={
45+
"test":"test"
46+
}
47+
)
48+
# Note: the corresponding ASE calculator needs to be defined in ASEModel.calc.
49+
```
50+
- For finetune tasks, only models based on `DeePMD-kit` framework are supported, please raise an issue if you would like to test other models.
5551

5652
## Contributing
5753

@@ -63,24 +59,25 @@ To add a model, please modify the `lambench/models/models_config.yaml` file.
6359

6460
The file contains a list of models with the following structure:
6561

66-
```yaml
67-
- model_name: a short and concise name for the model
68-
model_family: the family of the model; used for selecting ASE Calculator in `ase_models.py`
69-
model_type: usually `ASE`; use `DP` for deepmd-kit models
70-
model_path: local path to the model weight; null if not required
71-
virtualenv: (not used yet)
72-
model_metadata:
73-
model_description:
74-
show_direct_task: True
75-
show_finetune_task: False
76-
show_calculator_task: False
77-
```
62+
```yaml
63+
- model_name: a short and concise name for the model
64+
model_family: the family of the model; used for selecting ASE Calculator in `ase_models.py`
65+
model_type: usually `ASE`; use `DP` for deepmd-kit models
66+
model_path: local path to the model weight; null if not required
67+
virtualenv: (not used yet)
68+
model_metadata:
69+
model_description:
70+
```
7871

7972
Please refer to `lambench/models/basemodel.py` for the field definitions.
8073

8174
Now, add the ASE calculator interface of your model to `lambench/models/ase_models.py`.
8275
Once these modifications are done, please create a pull request. If you have any questions, feel free to create an issue.
8376

77+
### Adding a new task
78+
79+
To add a task (specifically a `calculator` task), please modify the `lambench/tasks/calculator/calculator_tasks.yml` file. Please use [this pull request](https://github.com/deepmodeling/LAMBench/pull/89) as an example.
80+
8481
## License
8582

8683
LAMBench is licensed under the MIT License. See the [LICENSE](LICENSE) file for more details.

0 commit comments

Comments
 (0)