Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 3 additions & 4 deletions pytorch_lightning/callbacks/model_checkpoint.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,11 +20,11 @@

"""

from copy import deepcopy
import numbers
import os
import re
from copy import deepcopy
from pathlib import Path
import re
from typing import Any, Dict, Optional, Union

import numpy as np
Expand Down Expand Up @@ -302,8 +302,7 @@ def __init_ckpt_dir(self, filepath, dirpath, filename, save_top_k):
and len(self._fs.ls(dirpath)) > 0
):
rank_zero_warn(
f"Checkpoint directory {dirpath} exists and is not empty. With save_top_k={save_top_k},"
" all files in this directory will be deleted when a checkpoint is saved!"
f"Checkpoint directory {dirpath} exists and is not empty."
)

if dirpath and self._fs.protocol == 'file':
Expand Down