From 40ddcf28be1e225d7a2538e9d760de661322d9d9 Mon Sep 17 00:00:00 2001 From: ananthsub Date: Fri, 2 Oct 2020 10:25:43 -0700 Subject: [PATCH] Update model_checkpoint.py --- 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 f0a8e159a2fd7..80c4df8ae196b 100644 --- a/pytorch_lightning/callbacks/model_checkpoint.py +++ b/pytorch_lightning/callbacks/model_checkpoint.py @@ -549,5 +549,5 @@ def to_yaml(self, filepath: Optional[Union[str, Path]] = None): 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)