deepmodeling / deepmd-kit

A deep learning package for many-body potential energy representation and molecular dynamics
https://docs.deepmodeling.com/projects/deepmd/
GNU Lesser General Public License v3.0
1.43k stars 494 forks source link

Error dp test #165

Closed wjinjin closed 4 years ago

wjinjin commented 4 years ago

The erros shows as follow: Traceback (most recent call last): File "/soft/anaconda3/bin/dp", line 10, in sys.exit(main()) File "/soft/anaconda3/lib/python3.7/site-packages/deepmd/main.py", line 69, in main test(args) File "/soft/anaconda3/lib/python3.7/site-packages/deepmd/test.py", line 20, in test test_ener(args) File "/soft/anaconda3/lib/python3.7/site-packages/deepmd/test.py", line 64, in test_ener l2e = (l2err (energy - test_data["energy"][:numb_test].reshape([-1,1]))) KeyError: 'energy'

njzjz commented 4 years ago

Hi, what is your test data like? Does it contain energy.npy?

wjinjin commented 4 years ago

I checked and energy.npy file exists.

njzjz commented 4 years ago

It is confirmed as a bug caused by https://github.com/deepmodeling/deepmd-kit/commit/5f770195991ee3cbb5a741e6020b35503aeb3436.

wjinjin commented 4 years ago

Now is there any way I can fix it? I already tried installing it again, but it still doesn't work.

njzjz commented 4 years ago

Now is there any way I can fix it? I already tried installing it again, but it still doesn't work.

It has been already fixed by #166 and #167. You can git pull to the newest version and reinstall it. (Or just replace /soft/anaconda3/lib/python3.7/site-packages/deepmd/test.py with the newest test.py file) https://github.com/deepmodeling/deepmd-kit/blob/88da7169bb97bf91f0e9add8785cc307df8a10b6/source/train/test.py#L37-L47