Update model_checkpoint.py (#3801)
This commit is contained in:
parent
7c6ed1fa28
commit
192fc018f3
|
@ -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)
|
||||
|
|
Loading…
Reference in New Issue