Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[BUG] Error while training DPLR #2842

Closed
siddarthachar opened this issue Sep 19, 2023 · 3 comments
Closed

[BUG] Error while training DPLR #2842

siddarthachar opened this issue Sep 19, 2023 · 3 comments
Assignees

Comments

@siddarthachar
Copy link

Bug summary

Error while training a DPLR model using a deepdipole model. I tried using the example for water in https://github.com/CSIprinceton/workshop-july-2023/tree/main/hands-on-sessions/day-3/8-deep-potential-long-range/1-train to make a deepdipole first and then a DPLR. The deepdipole was trained as per: https://github.com/CSIprinceton/workshop-july-2023/tree/main/hands-on-sessions/day-3/7-deep-wannier/2-train_dipole_model and it worked fine. I even tested these models to predict the atomic dipole moment vectors for water. However, training the DPLR gave this error:

NotImplementedError: Cannot convert a symbolic Tensor (strided_slice_3:0) to a numpy array. This error may indicate that you're trying to pass a Tensor to a NumPy call, which is not supported 

DeePMD-kit Version

2.0.3

TensorFlow Version

2?

How did you download the software?

conda

Input Files, Running Commands, Error Log, etc.

Input file: https://github.com/CSIprinceton/workshop-july-2023/blob/main/hands-on-sessions/day-3/8-deep-potential-long-range/1-train/input.json

Running Commands: dp train input.json

Error log:
slurm-624716.txt

Steps to Reproduce

Use the files in https://github.com/CSIprinceton/workshop-july-2023/tree/main/hands-on-sessions/day-3/ to reproduce .pb files for DPLR training.

Further Information, Files, and Links

No response

@Yi-FanLi
Copy link
Collaborator

Hi Siddarth,

Thanks for reporting this issue. I am so happy that you reach out to us after you go back from our workshop.

I have tried to reproduce your issue in my own environment. However, the training runs correctly on my side.

From the information given in the issue, I do not have a clear idea on the reason of your issue. However, I suspect that the issue is because you are using an inappropriate environment. Specifically, it might be due to that the tensorflow version is improper. I suggest that you might create a new conda environment and install the newest release of deepmd-kit from the deepmodeling conda channel: https://anaconda.org/deepmodeling/deepmd-kit.

Best,
Yifan

@siddarthachar
Copy link
Author

Hi Yifan

It's nice to hear back from you. I hope things are going well!

I did install the latest version and it seems to be working now. I had a followup question about selecting the system charge and the model charge map. I have a system with C, O, H, so the system charge would just be [4, 6, 1] and the model charge map should be [-8, -8], right? The first is the just the number of valence electrons and the second is -2*the number of MLWC for each element type. Is this assumption correct?

Best,
Siddarth

@njzjz
Copy link
Member

njzjz commented Oct 18, 2023

I'll close this issue since there is nothing wrong with the software.

@Yi-FanLi will answer the question.

@njzjz njzjz closed this as not planned Won't fix, can't repro, duplicate, stale Oct 18, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants