【MIIT program】Add UMA interatomic potential support - #290
Conversation
leeleolay
left a comment
There was a problem hiding this comment.
辛苦补充数据集和paddle模型权重可下载链接,我提供url可补充进来
| 除 PaddleMaterials 常规依赖外,UMA 数据读取还需要: | ||
|
|
||
| ```bash | ||
| pip install ase lmdb e3nn omegaconf |
There was a problem hiding this comment.
套件已有的requirements 是否已经有了相关的配置,另外e3nn目前没有paddle版本,这里是否合理?套件内有部分实现
There was a problem hiding this comment.
辛苦参考已有model的readme 格式,本次模型复现的指标可在pr中回复
There was a problem hiding this comment.
辛苦检查下所有的注释,并且在每个文件补充paddle 权利声明
|
已根据意见做如下修改:
|
leeleolay
left a comment
There was a problem hiding this comment.
基本未按照套件内已有各模块组织逻辑进行复现,包括dataset,model的组织方式
There was a problem hiding this comment.
同上,这类数据预处理过程性文件与套件核心功能(模型训推无关)
There was a problem hiding this comment.
按照abstarct(包括模型图),dataset,model(模型原理),results组织该页面
在interatomic_potentials/README.md中添加该模型链接
| | Weight decay | `1e-3` | | ||
| | Loss weights | energy 10.0, forces 30.0 | | ||
|
|
||
| `ppmat/models/uma/Jd.pt` stores precomputed Wigner-d coefficients used by UMA |
There was a problem hiding this comment.
这里是预先设定的参数吗?为什么是硬编码逻辑,pt是torch格式吧?
另外readme这里的模型介绍不保留具体的模型参数说明,只介绍模型的通用原理
| Single-GPU training: | ||
|
|
||
| ```bash | ||
| python interatomic_potentials/train.py -c interatomic_potentials/configs/uma/uma_omat24_r500_s2ef.yaml |
| include_forces: True | ||
| include_stress: False | ||
| select_args: | ||
| limit: 2 |
| src: ./data/oc20/uma_aselmdb/val/val.aselmdb | ||
| dataset_name: oc20-s2ef-200k-val | ||
| task_name: oc20 | ||
| include_energy: True |
There was a problem hiding this comment.
使用graph convert,build等方式构建数据
|
| `Dataset.*.build_graph_cfg`, and training/evaluation runs through | ||
| `interatomic_potentials/train.py`. | ||
|
|
||
| ```mermaid |
| ) | ||
|
|
||
|
|
||
| class UMASingleCollator: |
|
其他的我再详细review下,数据的部分得提供链接吧?需支持一键训练,还有权重,需支持一键推理 |
|
|
Thanks for your contribution! |
There was a problem hiding this comment.
数据集链接在readme里只介绍,不写具体链接,自动down的逻辑在datasetli实现,辛苦再检查
There was a problem hiding this comment.
ai生成的代码容易有太多helper,建议从已有的mp20dataset 或者类似的mptrj等复制过来重新修改。需要再精简该数据集。只给模型传pgl封装等ndarray
There was a problem hiding this comment.
tensor在model forward内改拜年形式
molecular_graph 是否已经验证确实跑不了呢,辛苦比较下chgnet的实现逻辑 |
| def _to_python(self, value: Any): | ||
| if paddle.is_tensor(value): | ||
| return value.numpy() | ||
| if isinstance(value, dict): | ||
| return {k: self._to_python(v) for k, v in value.items()} | ||
| if isinstance(value, list): | ||
| return [self._to_python(v) for v in value] | ||
| return value |
|
重构了部分基础组件,移动了推理器的位置,辛苦基于新的开发和尝试,解决下冲突 @yqf66 |
|
通过网盘分享的文件:UMA |
Summary
This PR adds UMA support to
interatomic_potentialsand documents the migration validation results following the checklist in #258.Main additions:
ppmat.models.umawith the Paddle implementation of the UMA/eSCN backbone, direct energy/force heads, task/dataset embedding path, rotation utilities, and ASELMDB dataset adapters.interatomic_potentialsmodel matrix to include UMA.Validation
Code/config checks:
python -m py_compile $(find ppmat/models/uma interatomic_potentials/configs/uma -name '*.py' -print)yaml.safe_load.git diff --checkfrom ppmat.models.uma.single_dataset import UMAAseDBDatasetand
from ppmat.models.uma.escn_md import UMASingleTaskModel.Training/evaluation runs completed on a single RTX 4090 with PaddlePaddle 3.3.0 and AMP O1:
uma_omat24_r500_budget_s2ef.yamloutput/uma_omat24_r500_budget_s2ef/checkpoints/best.pdparamsuma_oc20_50k_budget_s2ef.yamloutput/uma_oc20_50k_budget_s2ef/checkpoints/best.pdparamsuma_multitask_budget_smoke.yamloutput/uma_multitask_budget_smoke/checkpoints/best.pdparamsTraining loss convergence:
Final evaluation:
Notes
.ptfiles underppmat/models/umaare small precomputed rotation/Wigner coefficient tensors required by the UMA implementation, not trained model checkpoints.