-
Notifications
You must be signed in to change notification settings - Fork 423
Description
Dear fairchem team,
I am using GemNet in fairchem-1.10.0 for training GemNet. To back up training progress, I have set up a Linux script that automatically runs the command "cp checkpoint.pt backup_checkpoint.pt" every 4 hours to copy the checkpoint file.
However, I later realized that this copy operation might occur at the same time as fairchem is writing the checkpoint. Although none of the checkpoint files I have copied so far have report errors and they can all be successfully loaded into fairchem (and even for perform structures relaxation in ASE), I am concerned that if the file is being written while the copy happens, the resulting backup might be incomplete.
My questions are:
Is my concern unnecessary? That is, does fairchem use some mechanism (such as writing to a temporary file first and then renaming it) to avoid this issue when saving checkpoints?
If there is indeed a risk, should backup checkpoints obtained without ensuring that writing has completed can be used for subsequent tasks (such as perform relaxation to unseen structures in ASE)? Or must training be restarted from scratch?
Thank you for your help!