Skip to content

[BUG] Error while training DPLR #2842

Closed as not planned
Closed as not planned

Description

@siddarthachar

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

Activity

  1. Yi-FanLi commented on Sep 21, 2023

    @Yi-FanLi
    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

  2. siddarthachar commented on Oct 8, 2023

    @siddarthachar
    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

  3. njzjz commented on Oct 18, 2023

    @njzjz
    Member

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

    @Yi-FanLi will answer the question.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions