-
Notifications
You must be signed in to change notification settings - Fork 72
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: Python API cannot save trained model (Segmentation fault, list index out of range) #386
Comments
@m-a-saleh can you try manually adding rel_efs_noise to sparse gp to get around this error? |
@YuuuXie I managed to get a working .json model file by the follwing steps: The previous steps worked only for the combination(force_training=True, Energy_training=false, stress_training=false). It did not work for energy_trainig=true. I am still not able to generate lmp.flare file, which still raise seg fault error. |
sorry for the late reply. Can you maybe try an earlier version of flare? like 1.3.0? |
Hi, I get the same error when I using sparse_gp.write_model() with the latest version of flare(1.3.3): IndexError: list index out of range. |
Hi @rbjiawen, Are you trying the same experiment as @m-a-saleh, that is, calling So one way to proceed is to add the last line in this block:
Can you give this a try and let me know if it works? |
Yes, I followed the example of customizing the descriptor and tried calling sgp_calc.write_model("mymodel.json"). I switched to version 1.3.0 and do not get this error. I will try adding rel_efs_noise using 1.3.3 version,thanks! |
Version 1.3.3 flare works after add the rel_efs_noise ! |
Glad that works! Please note, however, that the |
Describe the bug
After training an SGP model using Python, I am not able to save the model. Using
sgp_calc.write_model('my_model.json')
generates empty "my_model.json" file, and gives the following error:The bug is: in "sparce_sgp.py", the lists
self.atom_indices
andself.rel_efs_noise
are initialized to empty but never get populated and stay empty.On the other hand, using
sgp_calc.build_map("lmp.flare", "my_name")
generates empty "lmp.flare" file and gives the following error:To Reproduce
In the example given here, just add
sgp_calc.write_model('my_model.json')
andsgp_calc.build_map("lmp.flare", "my_name")
to the end of the script.Expected behavior
Write "my_model.json" and "lmp.flare" model files.
Desktop (please complete the following information):
The text was updated successfully, but these errors were encountered: