From db3cf2e1f4ced299c9e2afb2e0c92c40a2a7d2c0 Mon Sep 17 00:00:00 2001 From: Rohit Gupta Date: Wed, 4 Nov 2020 15:37:42 +0530 Subject: [PATCH] Update default filename (#4500) Co-authored-by: Jirka Borovec Co-authored-by: Jeff Yang --- pytorch_lightning/callbacks/model_checkpoint.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/pytorch_lightning/callbacks/model_checkpoint.py b/pytorch_lightning/callbacks/model_checkpoint.py index f3eabf5611..413e96a39a 100644 --- a/pytorch_lightning/callbacks/model_checkpoint.py +++ b/pytorch_lightning/callbacks/model_checkpoint.py @@ -366,7 +366,8 @@ class ModelCheckpoint(Callback): ) -> str: if not filename: # filename is not set, use default name - filename = "{epoch}-{step}" + filename = "{epoch}" + cls.CHECKPOINT_JOIN_CHAR + "{step}" + # check and parse user passed keys in the string groups = re.findall(r"(\{.*?)[:\}]", filename) if len(groups) >= 0: