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

OTF SGP models with force_only=True, not working with OTF.from_checkpint() #376

Open
usaleem97 opened this issue Sep 22, 2023 · 2 comments

Comments

@usaleem97
Copy link

Hi FLARE team,

I am training a SGP potential with force_only tag set to True. If I try resuming training by using the from_checkpoint() method, it spits out the following errors:

Traceback (most recent call last):
File "restart.py", line 30, in
test_otf= OTF.from_checkpoint('otf_checkpt.json')
File "/project/ssharada_53/usaleem/flare/flare/learners/otf.py", line 968, in from_checkpoint
otf_model = cls.from_dict(json.loads(f.readline()))
File "/project/ssharada_53/usaleem/flare/flare/learners/otf.py", line 920, in from_dict
flare_calc, _kernels = SGP_Calculator.from_file(dct["flare_calc"])
File "/project/ssharada_53/usaleem/flare/flare/bffs/sgp/calculator.py", line 164, in from_file
sgp, kernels = SGP_Wrapper.from_dict(gp_dict["gp_model"])
File "/project/ssharada_53/usaleem/flare/flare/bffs/sgp/sparse_gp.py", line 295, in from_dict
struc_stress = train_struc.stress
File "/project/ssharada_53/usaleem/flare/flare/atoms.py", line 102, in stress
return self.get_stress()
File "/home1/usaleem/.conda/envs/flare/lib/python3.8/site-packages/ase/atoms.py", line 829, in get_stress
assert shape == (6,)
AssertionError

I did a short OTF SGP trajectory on the same system using force_only=False, and it seemed to work without a problem.

I have attached my run and restart script
script.docx
script.docx

Thank you in advance!
Usama
~

@anjohan
Copy link
Collaborator

anjohan commented Sep 25, 2023

Hi Usama,

Thank you for your interest in FLARE!

Which version of FLARE are you using?

I don't see the struc_stress = train_struc.stress line anymore, and we fixed some issues related to stress training in #343.

@usamaS97
Copy link

Hi Anders,

Thanks for your response. I am on the 1.4.1 version. And the issue is with the version I am using again.

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

No branches or pull requests

3 participants