We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
get_intermediate_ckpt_path
checkpointing_limit
1 parent 4b21d37 commit b340913Copy full SHA for b340913
finetrainers/utils/checkpointing.py
@@ -55,7 +55,7 @@ def get_intermediate_ckpt_path(checkpointing_limit: int, step: int, output_dir:
55
# before we save the new checkpoint, we need to have at_most `checkpoints_total_limit - 1` checkpoints
56
if len(checkpoints) >= checkpointing_limit:
57
num_to_remove = len(checkpoints) - checkpointing_limit + 1
58
- checkpoints_to_remove = checkpoints[0:num_to_remove]
+ checkpoints_to_remove = [os.path.join(output_dir, x) for x in checkpoints[0:num_to_remove]]
59
delete_files(checkpoints_to_remove)
60
61
logger.info(f"Checkpointing at step {step}")
0 commit comments