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] No error reported when data's element is not present in input.json #4519

Open
Chengqian-Zhang opened this issue Dec 30, 2024 · 2 comments
Assignees
Labels

Comments

@Chengqian-Zhang
Copy link
Collaborator

Bug summary

When there are elements in the data that are not present in input.json, no error will be reported. For example, when element D is in type_map.raw, but D is not in type_map of input.json, the training process is normal.

DeePMD-kit Version

devel

Backend and its version

pytorch

How did you download the software?

Offline packages

Input Files, Running Commands, Error Log, etc.

See above

Steps to Reproduce

See above

Further Information, Files, and Links

No response

@njzjz
Copy link
Member

njzjz commented Dec 30, 2024

Unable to reproduce.

  File "/home/njzjz/codes/deepmd-kit/deepmd/utils/data.py", line 94, in __init__
    type_map.index(self.type_map[ii]) for ii in self.atom_type
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
ValueError: 'D' is not in list

@Chengqian-Zhang
Copy link
Collaborator Author

This error appears when self.mixed_type=True. Sorry I overlooked this condition.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants