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

get "undefined key "stop_batch" is not allowed in strict mode" error #1084

Closed
taipinghu opened this issue Dec 19, 2022 · 6 comments · Fixed by #1086
Closed

get "undefined key "stop_batch" is not allowed in strict mode" error #1084

taipinghu opened this issue Dec 19, 2022 · 6 comments · Fixed by #1086
Labels
bug Something isn't working

Comments

@taipinghu
Copy link
Contributor

Summary

the above error occurs when init-model is used.
after changing "numb_steps" to "stop_batch", it works normally.

DeePMD-kit Version

2.1.5

TensorFlow Version

default version in deepmd kit 2.1.5

Python Version, CUDA Version, GCC Version, LAMMPS Version, etc

bohrium contain name: registry.dp.tech/dptech/deepmd-kit:2.1.5-cuda11.6

Details

the above error occurs when init-model is used.
after change the keyword numb_steps to stop_batch, it works normally.

@taipinghu taipinghu added the wontfix This will not be worked on label Dec 19, 2022
@njzjz
Copy link
Member

njzjz commented Dec 20, 2022

Did you use an old version? stop_batch was renamed to numb_steps in deepmodeling/deepmd-kit#502.

@taipinghu
Copy link
Contributor Author

Did you use an old version? stop_batch was renamed to numb_steps in deepmodeling/deepmd-kit#502.

the version is 2.1.5.
numb_steps works normally when init-model is not used.

@wanghan-iapcm
Copy link
Contributor

Did you train the model, from which you initialize your new model, by the latest version of deepmd-kit?

@taipinghu
Copy link
Contributor Author

Did you train the model, from which you initialize your new model, by the latest version of deepmd-kit?

Firstly, I make a long train in iter 0. Here, the numb_steps works normally.
Then, in iter 1, I use init model based on the previous model. Here, deepmd kit automatically convert input.json to input_v2_compat.json. it cannot find "stop_batch" keyword in the input_v2_compat.json. I change the param.json (dpgen param) from the numb_steps to stop_batch, "stop_batch" appears in the input_v2_compat.json and deepmd kit works normally.

@njzjz
Copy link
Member

njzjz commented Dec 21, 2022

This should be a bug of DP-GEN. I will transfer the issue there.

@njzjz njzjz transferred this issue from deepmodeling/deepmd-kit Dec 21, 2022
@njzjz njzjz added bug Something isn't working and removed wontfix This will not be worked on labels Dec 21, 2022
wanghan-iapcm pushed a commit that referenced this issue Dec 23, 2022
Fix #1084. Both keys are valid, so we detect which one is used in
`default_training_param`.
@njzjz njzjz linked a pull request Dec 24, 2022 that will close this issue
@AnguseZhang
Copy link
Collaborator

This seems solved. I'll close this issue for now.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants