Update model_checkpoint.py (#3801)

This commit is contained in:
ananthsub 2020-10-02 11:49:46 -07:00 committed by GitHub
parent 7c6ed1fa28
commit 192fc018f3
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -549,5 +549,5 @@ class ModelCheckpoint(Callback):
best_k = {k: v.item() for k, v in self.best_k_models.items()} best_k = {k: v.item() for k, v in self.best_k_models.items()}
if filepath is None: if filepath is None:
filepath = os.path.join(self.dirpath, "best_k_models.yaml") 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) yaml.dump(best_k, fp)