Persistence¶
Checkpoint.savewrites a sibling.tmpfile and replaces the destination. A dump that fails part-way through does not truncate the last good checkpoint.Checkpoint.loadrestores the constructor'sfile_path,raise_errors, andmake_dirafter unpickling, so moving a checkpoint file does not send the next save back to the old path.- Setting
save_freq = -1while iteratingCheckpoint.rangedisables further saves. It no longer turns saving on for every remaining generation.