torchmd-net icon indicating copy to clipboard operation
torchmd-net copied to clipboard

Add backup for metrics.csv

Open AntonioMirarchi opened this issue 4 months ago • 1 comments

We currently use CSVLogger from torch.lightning to write metrics to a CSV file in the log directory. However, when using load_model (i.e., loading from a checkpoint), or more in general to append data to an existing CSV, we overwrite the current metrics.csv, losing the original data. This PR introduces a simple function that checks if the metrics file already exists and renames it using date and time information, preserving previous data. Ideally, we would prefer to append to the existing file, but AFAIK this is not currently supported by CSVLogger.

AntonioMirarchi avatar Oct 16 '24 09:10 AntonioMirarchi