From 192fc018f31105a170fd1be1241d130bf4686702 Mon Sep 17 00:00:00 2001 From: ananthsub Date: Fri, 2 Oct 2020 11:49:46 -0700 Subject: [PATCH] Update model_checkpoint.py (#3801) --- pytorch_lightning/callbacks/model_checkpoint.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pytorch_lightning/callbacks/model_checkpoint.py b/pytorch_lightning/callbacks/model_checkpoint.py index f0a8e159a2..80c4df8ae1 100644 --- a/pytorch_lightning/callbacks/model_checkpoint.py +++ b/pytorch_lightning/callbacks/model_checkpoint.py @@ -549,5 +549,5 @@ class ModelCheckpoint(Callback): best_k = {k: v.item() for k, v in self.best_k_models.items()} if filepath is None: filepath = os.path.join(self.dirpath, "best_k_models.yaml") - with open(filepath, "w") as fp: + with self._fs.open(filepath, "w") as fp: yaml.dump(best_k, fp)