Skip to content
Snippets Groups Projects
Commit 47ec8226 authored by Yoann Schneider's avatar Yoann Schneider :tennis:
Browse files

Log when removing bested checkpoint

parent e0cb32b0
No related branches found
No related tags found
1 merge request!286Log when removing bested checkpoint
# -*- coding: utf-8 -*-
import logging
import os
import random
from copy import deepcopy
......@@ -28,6 +29,7 @@ from dan.utils import fix_ddp_layers_names, ind_to_token
if MLFLOW_AVAILABLE:
import mlflow
logger = logging.getLogger(__name__)
MODEL_NAMES = ("encoder", "decoder")
......@@ -430,6 +432,7 @@ class GenericTrainingManager:
# Remove other checkpoints
for path_to_del in self.paths["checkpoints"].glob(f"{name}_*.pt"):
logger.warning(f"Removing checkpoint `{path_to_del}`")
path_to_del.unlink()
torch.save(content, path)
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment