From 88ff860c900e674134b23f1456b7328650a029b7 Mon Sep 17 00:00:00 2001 From: William Falcon Date: Fri, 14 Jun 2019 09:46:41 -0400 Subject: [PATCH] adding support for interrupt signals --- pytorch_lightning/root_module/model_saving.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/pytorch_lightning/root_module/model_saving.py b/pytorch_lightning/root_module/model_saving.py index e9c68fd0ae..87f6eaa096 100644 --- a/pytorch_lightning/root_module/model_saving.py +++ b/pytorch_lightning/root_module/model_saving.py @@ -100,6 +100,9 @@ class TrainerIO(object): # PRIVATE OPS # ---------------------------------- def hpc_save(self, folderpath, experiment): + # make sure the checkpoint folder exists + os.makedirs(folderpath, exist_ok=True) + # save exp to make sure we get all the metrics experiment.save()