Closed SchrodingersCattt closed 1 week ago
Duplicate of #3884
I finally solved the problem and share my experience here.
The atype
of model obtained from multi-task training should be the same with the pre-training, i.e. the 118-element type_map
, INSTEAD OF the type_map
wrote in input.json
. That's why I run my scripts all well in single-task pretrained models but fail here in multi-task pretrained models !
Bug summary
I finetuned a model based on pre-trained model of 2024Q1 from aissq, with
branch
ofDomains_OC2M
. My new datasets are labeled by CP2K 2024.1 (units have been correctedly converted to eV for energies and eV/ang. for forces) for my experimentally-observed structure. The command for finetune is :Via
dp --pt test
command, I got good consistency between DFT labels and DP predictions:However, I noticed a significant discrepancy between the relabeled data and the original DFT-labeled data with Python API using
DeepEval
module.I have attached my datasets, models, input files, and relevant scripts. Please review them if needed.
Thank you for your time!
DeePMD-kit Version
DeePMD-kit v3.0.0a1.dev82+geed7c8ac
Backend and its version
torch 2.0.0+cu118
How did you download the software?
Offline packages
Input Files, Running Commands, Error Log, etc.
In dataset.zip, folder
train
andvalid
are DFT-labeled, whiletrain_relabeled
andvalid_relabeled
are finetuned model-relabeled.In scripts.zip,
relabel.py
was executed after freezing the model;plot_test.py
was executed afterdp --pt test
;plot_relabel.py
was executed after relabel. ( See "Steps to Reproduce" for details)train.json is my input.
My finetuned model can be accessed here (uploaded to my repo due to the size limit...): https://github.com/SchrodingersCattt/deepmd-issue-20240622/blob/main/frozen_model.pth
Steps to Reproduce
Result of
dp --pt test
Run
dp --pt test -m frozen_model.pth -s train -d test
then runpython plot_test.py
. This should generate ane_f.png
.Result of
DeepEval
Run
python relabel.py
then runpython plot_relabel.py
. This should generate adft_vs_relabel.png
.Further Information, Files, and Links
No response